Summary: | [GLIB] REGRESSION(r277158) imported/w3c/web-platform-tests/xhr/FormData-append.html is crashing | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Diego Pino <dpino> | ||||||||||
Component: | New Bugs | Assignee: | Diego Pino <dpino> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | benjamin, bugs-noreply, cdumez, cgarcia, cmarcelo, ews-watchlist, webkit-bug-importer, zdobersek | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Diego Pino
2021-05-07 18:00:57 PDT
Created attachment 428068 [details]
Patch
Note that fileSystemRepresentation() seems wrong for the glib port. It returns CString() instead of CString("") when the string is the empty string. It should only return CString() is the String is null. (In reply to Chris Dumez from comment #2) > Note that fileSystemRepresentation() seems wrong for the glib port. It > returns CString() instead of CString("") when the string is the empty > string. It should only return CString() is the String is null. Maybe fixing Glib's fileSystemRepresentation() would mean we wouldn't need those isEmpty() checks in all FileSystem functions, unless glib ports are really calling those functions will null Strings.. Created attachment 428076 [details]
Patch
(In reply to Chris Dumez from comment #3) > (In reply to Chris Dumez from comment #2) > > Note that fileSystemRepresentation() seems wrong for the glib port. It > > returns CString() instead of CString("") when the string is the empty > > string. It should only return CString() is the String is null. > > Maybe fixing Glib's fileSystemRepresentation() would mean we wouldn't need > those isEmpty() checks in all FileSystem functions, unless glib ports are > really calling those functions will null Strings.. Thanks for the pointer. I also agree fixing this error at GLib is a better fix. Patch updated. Created attachment 428077 [details]
Patch
Comment on attachment 428077 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428077&action=review > Source/WTF/wtf/glib/FileSystemGlib.cpp:77 > + return CString("", 0); I think this should be: If (path.isNull()) Return { }; If (path.isEmpty()) Return CString(“”); Seems weird to return an empty string if the input string was null. Comment on attachment 428077 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428077&action=review > Source/WTF/wtf/glib/FileSystemGlib.cpp:77 > + return CString("", 0); I think this should be: If (path.isNull()) Return { }; If (path.isEmpty()) Return CString(“”); Seems weird to return an empty string if the input string was null. Created attachment 428083 [details]
Patch
Committed r277229 (237498@main): <https://commits.webkit.org/237498@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 428083 [details]. |