Title: [202424] trunk/Source/WebKit2
Revision
202424
Author
[email protected]
Date
2016-06-24 10:05:46 -0700 (Fri, 24 Jun 2016)

Log Message

IDB tests crashing attempting to register sandbox extensions for blob files.
https://bugs.webkit.org/show_bug.cgi?id=159094.

Reviewed by Sam Weinig.

Already tested by storage/indexeddb/modern/handle-user-delete.html

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::preregisterSandboxExtensionsIfNecessary): Check whether the IDBResultData actually contains
  a getResult before trying to access it.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (202423 => 202424)


--- trunk/Source/WebKit2/ChangeLog	2016-06-24 16:57:08 UTC (rev 202423)
+++ trunk/Source/WebKit2/ChangeLog	2016-06-24 17:05:46 UTC (rev 202424)
@@ -1,3 +1,16 @@
+2016-06-24  Brady Eidson  <[email protected]>
+
+        IDB tests crashing attempting to register sandbox extensions for blob files.
+        https://bugs.webkit.org/show_bug.cgi?id=159094.
+
+        Reviewed by Sam Weinig.
+        
+        Already tested by storage/indexeddb/modern/handle-user-delete.html
+
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
+        (WebKit::preregisterSandboxExtensionsIfNecessary): Check whether the IDBResultData actually contains
+          a getResult before trying to access it.
+
 2016-06-23  Brady Eidson  <[email protected]>
 
         Retrieving Blobs from IndexedDB using cursors fails in WK2 (Sandboxing)

Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp (202423 => 202424)


--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp	2016-06-24 16:57:08 UTC (rev 202423)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp	2016-06-24 17:05:46 UTC (rev 202424)
@@ -249,6 +249,12 @@
 
 static void preregisterSandboxExtensionsIfNecessary(const WebIDBResult& result)
 {
+    auto resultType = result.resultData().type();
+    if (resultType != IDBResultType::GetRecordSuccess && resultType != IDBResultType::OpenCursorSuccess && resultType != IDBResultType::IterateCursorSuccess) {
+        ASSERT(resultType == IDBResultType::Error);
+        return;
+    }
+
     const auto& filePaths = result.resultData().getResult().value().blobFilePaths();
 
     ASSERT(filePaths.size() == result.handles().size());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to