Title: [277229] trunk/Source/WTF
Revision
277229
Author
[email protected]
Date
2021-05-08 09:54:09 -0700 (Sat, 08 May 2021)

Log Message

[GLIB] REGRESSION(r277158) imported/w3c/web-platform-tests/xhr/FormData-append.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=225551

Reviewed by Chris Dumez.

* wtf/FileSystem.cpp:
(WTF::FileSystemImpl::fileIsDirectory): Remove unnecessary path.isEmpty check.
* wtf/glib/FileSystemGlib.cpp:
(WTF::FileSystemImpl::fileSystemRepresentation): Return empty CString if path is empty.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (277228 => 277229)


--- trunk/Source/WTF/ChangeLog	2021-05-08 15:03:15 UTC (rev 277228)
+++ trunk/Source/WTF/ChangeLog	2021-05-08 16:54:09 UTC (rev 277229)
@@ -1,3 +1,15 @@
+2021-05-08  Diego Pino Garcia  <[email protected]>
+
+        [GLIB] REGRESSION(r277158) imported/w3c/web-platform-tests/xhr/FormData-append.html is crashing
+        https://bugs.webkit.org/show_bug.cgi?id=225551
+
+        Reviewed by Chris Dumez.
+
+        * wtf/FileSystem.cpp:
+        (WTF::FileSystemImpl::fileIsDirectory): Remove unnecessary path.isEmpty check.
+        * wtf/glib/FileSystemGlib.cpp:
+        (WTF::FileSystemImpl::fileSystemRepresentation): Return empty CString if path is empty.
+
 2021-05-07  Chris Dumez  <[email protected]>
 
         Port FileSystem::pathGetFileName() & Filesystem::directoryName() to std::filesystem

Modified: trunk/Source/WTF/wtf/FileSystem.cpp (277228 => 277229)


--- trunk/Source/WTF/wtf/FileSystem.cpp	2021-05-08 15:03:15 UTC (rev 277228)
+++ trunk/Source/WTF/wtf/FileSystem.cpp	2021-05-08 16:54:09 UTC (rev 277229)
@@ -598,8 +598,6 @@
 
 bool fileIsDirectory(const String& path, ShouldFollowSymbolicLinks shouldFollowSymbolicLinks)
 {
-    if (path.isEmpty())
-        return false;
     std::error_code ec;
     std::filesystem::file_status fileStatus;
     if (shouldFollowSymbolicLinks == ShouldFollowSymbolicLinks::Yes)

Modified: trunk/Source/WTF/wtf/glib/FileSystemGlib.cpp (277228 => 277229)


--- trunk/Source/WTF/wtf/glib/FileSystemGlib.cpp	2021-05-08 15:03:15 UTC (rev 277228)
+++ trunk/Source/WTF/wtf/glib/FileSystemGlib.cpp	2021-05-08 16:54:09 UTC (rev 277229)
@@ -73,8 +73,10 @@
 
 CString fileSystemRepresentation(const String& path)
 {
+    if (path.isNull())
+        return { };
     if (path.isEmpty())
-        return { };
+        return CString("");
 
     CString utf8 = path.utf8();
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to