Diff
Modified: branches/safari-601-branch/LayoutTests/ChangeLog (193089 => 193090)
--- branches/safari-601-branch/LayoutTests/ChangeLog 2015-12-03 18:45:36 UTC (rev 193089)
+++ branches/safari-601-branch/LayoutTests/ChangeLog 2015-12-03 18:45:44 UTC (rev 193090)
@@ -1,5 +1,19 @@
2015-12-02 Timothy Hatcher <[email protected]>
+ Merge r188353. rdar://problem/23221163
+
+ 2015-08-12 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Not receiving responses for async request IndexedDB.requestDatabaseNames
+ https://bugs.webkit.org/show_bug.cgi?id=147844
+
+ Reviewed by Brian Burg.
+
+ * inspector/indexeddb/requestDatabaseNames-expected.txt: Added.
+ * inspector/indexeddb/requestDatabaseNames.html: Added.
+
+2015-12-02 Timothy Hatcher <[email protected]>
+
Merge r188283. rdar://problem/23221163
2015-08-11 Brian Burg <[email protected]>
Added: branches/safari-601-branch/LayoutTests/inspector/indexeddb/requestDatabaseNames-expected.txt (0 => 193090)
--- branches/safari-601-branch/LayoutTests/inspector/indexeddb/requestDatabaseNames-expected.txt (rev 0)
+++ branches/safari-601-branch/LayoutTests/inspector/indexeddb/requestDatabaseNames-expected.txt 2015-12-03 18:45:44 UTC (rev 193090)
@@ -0,0 +1,11 @@
+CONSOLE MESSAGE: line 10: Created Database 'Database1'
+CONSOLE MESSAGE: line 10: Created Database 'Database2'
+
+PASS: No IndexedDB databases should exist initially
+Created Database 'Database1'
+PASS: A single IndexedDB database should exist
+["Database1"]
+Created Database 'Database2'
+PASS: Two IndexedDB databases should exist
+["Database1","Database2"]
+
Added: branches/safari-601-branch/LayoutTests/inspector/indexeddb/requestDatabaseNames.html (0 => 193090)
--- branches/safari-601-branch/LayoutTests/inspector/indexeddb/requestDatabaseNames.html (rev 0)
+++ branches/safari-601-branch/LayoutTests/inspector/indexeddb/requestDatabaseNames.html 2015-12-03 18:45:44 UTC (rev 193090)
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script>
+function createDatabase(name)
+{
+ var request = window.indexedDB.open(name, 1);
+ request.addEventListener('success', function() {
+ console.log(`Created Database '${name}'`);
+ });
+}
+
+function test()
+{
+ var steps = [
+ {
+ action: function() {
+ IndexedDBAgent.requestDatabaseNames(WebInspector.frameResourceManager.mainFrame.securityOrigin, function(error, names) {
+ InspectorTest.expectNoError(error);
+ InspectorTest.expectThat(names.length === 0, "No IndexedDB databases should exist initially");
+ InspectorTest.evaluateInPage("createDatabase('Database1')");
+ });
+ }
+ },
+ {
+ action: function() {
+ IndexedDBAgent.requestDatabaseNames(WebInspector.frameResourceManager.mainFrame.securityOrigin, function(error, names) {
+ InspectorTest.expectNoError(error);
+ InspectorTest.expectThat(names.length === 1, "A single IndexedDB database should exist");
+ InspectorTest.log(JSON.stringify(names));
+ InspectorTest.evaluateInPage("createDatabase('Database2')");
+ });
+ }
+ },
+ {
+ action: function() {
+ IndexedDBAgent.requestDatabaseNames(WebInspector.frameResourceManager.mainFrame.securityOrigin, function(error, names) {
+ InspectorTest.expectNoError(error);
+ InspectorTest.expectThat(names.length === 2, "Two IndexedDB databases should exist");
+ InspectorTest.log(JSON.stringify(names));
+ next();
+ });
+ }
+ }
+ ];
+
+ function next() {
+ var step = steps.shift();
+ if (!step) {
+ InspectorTest.completeTest();
+ return;
+ }
+ step.action();
+ }
+
+ WebInspector.logManager.addEventListener(WebInspector.LogManager.Event.MessageAdded, function(event) {
+ InspectorTest.log(event.data.message.messageText);
+ next();
+ });
+
+ InspectorTest.log("");
+ next();
+}
+</script>
+</head>
+<body _onload_="runTest()">
+</body>
+</html>
Modified: branches/safari-601-branch/LayoutTests/platform/mac-wk1/TestExpectations (193089 => 193090)
--- branches/safari-601-branch/LayoutTests/platform/mac-wk1/TestExpectations 2015-12-03 18:45:36 UTC (rev 193089)
+++ branches/safari-601-branch/LayoutTests/platform/mac-wk1/TestExpectations 2015-12-03 18:45:44 UTC (rev 193090)
@@ -57,6 +57,7 @@
http/tests/security/no-indexeddb-from-sandbox.html
crypto/subtle/rsa-indexeddb.html
crypto/subtle/rsa-indexeddb-non-exportable.html
+inspector/indexeddb
# But since it is disabled at runtime, we should make sure it is correctly disabled
storage/indexeddb/properties-disabled-at-runtime.html [ Pass ]
Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Test.js (193089 => 193090)
--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Test.js 2015-12-03 18:45:36 UTC (rev 193089)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Test.js 2015-12-03 18:45:44 UTC (rev 193090)
@@ -155,6 +155,16 @@
this.evaluateInPage("InspectorTestProxy.debugLog(unescape('" + escape(JSON.stringify(message)) + "'))");
}
+// Appends a message in the test document if there was an error, and attempts to complete the test.
+InspectorTest.expectNoError = function(error)
+{
+ if (error) {
+ InspectorTest.log("PROTOCOL ERROR: " + error);
+ InspectorTest.completeTest();
+ throw "PROTOCOL ERROR";
+ }
+}
+
InspectorTest.completeTest = function()
{
if (InspectorTest.dumpMessagesToConsole)
Modified: branches/safari-601-branch/Source/WebKit2/ChangeLog (193089 => 193090)
--- branches/safari-601-branch/Source/WebKit2/ChangeLog 2015-12-03 18:45:36 UTC (rev 193089)
+++ branches/safari-601-branch/Source/WebKit2/ChangeLog 2015-12-03 18:45:44 UTC (rev 193090)
@@ -1,3 +1,19 @@
+2015-12-02 Timothy Hatcher <[email protected]>
+
+ Merge r188353. rdar://problem/23221163
+
+ 2015-08-12 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Not receiving responses for async request IndexedDB.requestDatabaseNames
+ https://bugs.webkit.org/show_bug.cgi?id=147844
+
+ Reviewed by Brian Burg.
+
+ * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
+ (WebKit::WebIDBFactoryBackend::getDatabaseNames):
+ This method should not return without calling either the success
+ or error callbacks. In this case, it can succeed with an empty list.
+
2015-12-01 Timothy Hatcher <[email protected]>
Merge r186724. rdar://problem/23221163
Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp (193089 => 193090)
--- branches/safari-601-branch/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp 2015-12-03 18:45:36 UTC (rev 193089)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp 2015-12-03 18:45:44 UTC (rev 193090)
@@ -98,15 +98,14 @@
return;
}
- auto recentNameIterator = sharedRecentDatabaseNameMap().find(securityOriginIdentifier);
- if (recentNameIterator == sharedRecentDatabaseNameMap().end())
- return;
-
RefPtr<DOMStringList> databaseNames = DOMStringList::create();
- HashSet<String>& foundNames = recentNameIterator->value;
- for (const String& name : foundNames)
- databaseNames->append(name);
+ auto recentNameIterator = sharedRecentDatabaseNameMap().find(securityOriginIdentifier);
+ if (recentNameIterator != sharedRecentDatabaseNameMap().end()) {
+ HashSet<String>& foundNames = recentNameIterator->value;
+ for (const String& name : foundNames)
+ databaseNames->append(name);
+ }
callbacks->onSuccess(databaseNames.release());
}