Title: [173016] trunk/Source/WebCore
- Revision
- 173016
- Author
- [email protected]
- Date
- 2014-08-27 13:31:35 -0700 (Wed, 27 Aug 2014)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (173015 => 173016)
--- trunk/Source/WebCore/ChangeLog 2014-08-27 20:19:33 UTC (rev 173015)
+++ trunk/Source/WebCore/ChangeLog 2014-08-27 20:31:35 UTC (rev 173016)
@@ -1,3 +1,14 @@
+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-08-27 Beth Dakin <[email protected]>
overflow:scroll elements should not latch to the body if the body is
Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (173015 => 173016)
--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp 2014-08-27 20:19:33 UTC (rev 173015)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp 2014-08-27 20:31:35 UTC (rev 173016)
@@ -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