Title: [275379] trunk/Source/WTF
- Revision
- 275379
- Author
- [email protected]
- Date
- 2021-04-01 13:59:15 -0700 (Thu, 01 Apr 2021)
Log Message
REGRESSION(r275267): [GTK][WPE] 12 new crashes on service-workers layout tests
https://bugs.webkit.org/show_bug.cgi?id=224059
Reviewed by Carlos Alberto Lopez Perez.
Have the glib implementation of FileSystem::writeToFile() return early when the size to
write is 0, instead of calling g_output_stream_write_all(). It appears that passing a
NULL buffer to g_output_stream_write_all() crashes, even if size is 0.
* wtf/glib/FileSystemGlib.cpp:
(WTF::FileSystemImpl::writeToFile):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (275378 => 275379)
--- trunk/Source/WTF/ChangeLog 2021-04-01 20:56:44 UTC (rev 275378)
+++ trunk/Source/WTF/ChangeLog 2021-04-01 20:59:15 UTC (rev 275379)
@@ -1,3 +1,17 @@
+2021-04-01 Chris Dumez <[email protected]>
+
+ REGRESSION(r275267): [GTK][WPE] 12 new crashes on service-workers layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=224059
+
+ Reviewed by Carlos Alberto Lopez Perez.
+
+ Have the glib implementation of FileSystem::writeToFile() return early when the size to
+ write is 0, instead of calling g_output_stream_write_all(). It appears that passing a
+ NULL buffer to g_output_stream_write_all() crashes, even if size is 0.
+
+ * wtf/glib/FileSystemGlib.cpp:
+ (WTF::FileSystemImpl::writeToFile):
+
2021-03-31 Jiewen Tan <[email protected]>
Allow ASCWebKitSPISupport to be used on macOS
Modified: trunk/Source/WTF/wtf/glib/FileSystemGlib.cpp (275378 => 275379)
--- trunk/Source/WTF/wtf/glib/FileSystemGlib.cpp 2021-04-01 20:56:44 UTC (rev 275378)
+++ trunk/Source/WTF/wtf/glib/FileSystemGlib.cpp 2021-04-01 20:59:15 UTC (rev 275379)
@@ -407,6 +407,9 @@
int writeToFile(PlatformFileHandle handle, const char* data, int length)
{
+ if (!length)
+ return 0;
+
gsize bytesWritten;
g_output_stream_write_all(g_io_stream_get_output_stream(G_IO_STREAM(handle)),
data, length, &bytesWritten, nullptr, nullptr);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes