Title: [173543] branches/safari-600.1.4.11-branch/Source/WebCore
Revision
173543
Author
[email protected]
Date
2014-09-11 15:14:19 -0700 (Thu, 11 Sep 2014)

Log Message

Merged r173016. <rdar://problem/18120176>

Modified Paths

Diff

Modified: branches/safari-600.1.4.11-branch/Source/WebCore/ChangeLog (173542 => 173543)


--- branches/safari-600.1.4.11-branch/Source/WebCore/ChangeLog	2014-09-11 22:08:54 UTC (rev 173542)
+++ branches/safari-600.1.4.11-branch/Source/WebCore/ChangeLog	2014-09-11 22:14:19 UTC (rev 173543)
@@ -1,7 +1,22 @@
+2014-09-11  Babak Shafiei  <[email protected]>
+
+        Merge r173016.
+
+    2014-08-27  Timothy Hatcher  <[email protected]>
+
+            Web Inspector: Crash when you open Web Inspector in a private window (due to IndexedDB)
+            https://bugs.webkit.org/show_bug.cgi?id=136293
+
+            Reviewed by Joseph Pecoraro.
+
+            * inspector/InspectorIndexedDBAgent.cpp:
+            (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): Null check idbRequest from
+            IDBFactory::getDatabaseNames, which can return null now after r172603 in private browsing.
+
 2014-09-10  Babak Shafiei  <[email protected]>
 
         Merge r173345.
-        
+
     2014-09-05  Tim Horton  <[email protected]>
 
             [iOS] Work around bug 136593 by disabling the PDFDocumentImage live resize optimization there

Modified: branches/safari-600.1.4.11-branch/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (173542 => 173543)


--- branches/safari-600.1.4.11-branch/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp	2014-09-11 22:08:54 UTC (rev 173542)
+++ branches/safari-600.1.4.11-branch/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp	2014-09-11 22:14:19 UTC (rev 173543)
@@ -583,10 +583,8 @@
 static Document* assertDocument(ErrorString* errorString, Frame* frame)
 {
     Document* document = frame ? frame->document() : nullptr;
-
     if (!document)
         *errorString = "No document for given frame found";
-
     return document;
 }
 
@@ -597,8 +595,8 @@
         *errorString = "No IndexedDB factory for given frame found";
         return nullptr;
     }
+
     IDBFactory* idbFactory = DOMWindowIndexedDatabase::indexedDB(domWindow);
-
     if (!idbFactory)
         *errorString = "No IndexedDB factory for given frame found";
 
@@ -611,16 +609,18 @@
     Document* document = assertDocument(errorString, frame);
     if (!document)
         return;
+
     IDBFactory* idbFactory = assertIDBFactory(errorString, document);
     if (!idbFactory)
         return;
 
     ExceptionCode ec = 0;
     RefPtr<IDBRequest> idbRequest = idbFactory->getDatabaseNames(document, ec);
-    if (ec) {
+    if (!idbRequest || ec) {
         requestCallback->sendFailure("Could not obtain database names.");
         return;
     }
+
     idbRequest->addEventListener(eventNames().successEvent, GetDatabaseNamesCallback::create(requestCallback, document->securityOrigin()->toRawString()), false);
 }
 
@@ -630,6 +630,7 @@
     Document* document = assertDocument(errorString, frame);
     if (!document)
         return;
+
     IDBFactory* idbFactory = assertIDBFactory(errorString, document);
     if (!idbFactory)
         return;
@@ -644,6 +645,7 @@
     Document* document = assertDocument(errorString, frame);
     if (!document)
         return;
+
     IDBFactory* idbFactory = assertIDBFactory(errorString, document);
     if (!idbFactory)
         return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to