[Webkit-unassigned] [Bug 133904] New: convertToUTF8String converts null string to empty string

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 14 09:37:43 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=133904

           Summary: convertToUTF8String converts null string to empty
                    string
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: Hamish.K.Mackenzie at gmail.com


This means it is not possible to use functions like webkit_dom_css_style_declaration_get_property_value to tell if a property has no value (or is just set to the empty string).

I think it could be fixed with...

 gchar* convertToUTF8String(WTF::String const& s)
 {
+    if (!s) return 0;
     return g_strdup(s.utf8().data());
 }

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list