Title: [263093] trunk
Revision
263093
Author
[email protected]
Date
2020-06-16 08:19:10 -0700 (Tue, 16 Jun 2020)

Log Message

Unreviewed, reverting r263079.

Broke Internal builds.

Reverted changeset:

"IndexedDB: Support IDBFactory databases method"
https://bugs.webkit.org/show_bug.cgi?id=211043
https://trac.webkit.org/changeset/263079

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (263092 => 263093)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,3 +1,15 @@
+2020-06-16  Truitt Savell  <[email protected]>
+
+        Unreviewed, reverting r263079.
+
+        Broke Internal builds.
+
+        Reverted changeset:
+
+        "IndexedDB: Support IDBFactory databases method"
+        https://bugs.webkit.org/show_bug.cgi?id=211043
+        https://trac.webkit.org/changeset/263079
+
 2020-06-16  Darryl Pogue  <[email protected]>
 
         IndexedDB: Support IDBFactory databases method

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/get-databases.any-expected.txt (263092 => 263093)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/get-databases.any-expected.txt	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/get-databases.any-expected.txt	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,7 +1,7 @@
 
-PASS Ensure that databases() returns a promise. 
-PASS Enumerate one database. 
-PASS Enumerate multiple databases. 
-PASS Make sure an empty list is returned for the case of no databases. 
-FAIL Ensure that databases() doesn't pick up changes that haven't commited. assert_equals: The result of databases() should be only those databases which have been created at the time of calling, regardless of versionchange transactions currently running. expected 1 but got 2
+FAIL Ensure that databases() returns a promise. promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
+FAIL Enumerate one database. promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
+FAIL Enumerate multiple databases. promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
+FAIL Make sure an empty list is returned for the case of no databases. promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
+FAIL Ensure that databases() doesn't pick up changes that haven't commited. promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/get-databases.any.worker-expected.txt (263092 => 263093)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/get-databases.any.worker-expected.txt	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/get-databases.any.worker-expected.txt	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,7 +1,7 @@
 
-PASS Ensure that databases() returns a promise. 
-PASS Enumerate one database. 
-PASS Enumerate multiple databases. 
-PASS Make sure an empty list is returned for the case of no databases. 
-FAIL Ensure that databases() doesn't pick up changes that haven't commited. assert_equals: The result of databases() should be only those databases which have been created at the time of calling, regardless of versionchange transactions currently running. expected 1 but got 2
+FAIL Ensure that databases() returns a promise. promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
+FAIL Enumerate one database. promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
+FAIL Enumerate multiple databases. promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
+FAIL Make sure an empty list is returned for the case of no databases. promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
+FAIL Ensure that databases() doesn't pick up changes that haven't commited. promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory-databases-opaque-origin-expected.txt (263092 => 263093)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory-databases-opaque-origin-expected.txt	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory-databases-opaque-origin-expected.txt	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,4 +1,4 @@
 
-PASS IDBFactory.databases() in non-sandboxed iframe should not reject 
-PASS IDBFactory.databases() in sandboxed iframe should reject 
+FAIL IDBFactory.databases() in non-sandboxed iframe should not reject assert_equals: IDBFactory.databases() should not reject expected "no exception" but got "indexedDB.databases undefined"
+FAIL IDBFactory.databases() in sandboxed iframe should reject assert_equals: Promise should be rejected with SecurityError expected "SecurityError" but got "indexedDB.databases undefined"
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory-origin-isolation-expected.txt (263092 => 263093)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory-origin-isolation-expected.txt	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory-origin-isolation-expected.txt	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,3 +1,3 @@
 
-PASS Test to make sure that origins have separate locking schemes 
+FAIL Test to make sure that origins have separate locking schemes promise_test: Unhandled rejection with value: object "TypeError: indexedDB.databases is not a function. (In 'indexedDB.databases()', 'indexedDB.databases' is undefined)"
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idlharness.any-expected.txt (263092 => 263093)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idlharness.any-expected.txt	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idlharness.any-expected.txt	2020-06-16 15:19:10 UTC (rev 263093)
@@ -52,7 +52,7 @@
 PASS IDBFactory interface: existence and properties of interface prototype object's @@unscopables property 
 PASS IDBFactory interface: operation open(DOMString, optional unsigned long long) 
 PASS IDBFactory interface: operation deleteDatabase(DOMString) 
-PASS IDBFactory interface: operation databases() 
+FAIL IDBFactory interface: operation databases() assert_own_property: interface prototype object missing non-static operation expected property "databases" missing
 PASS IDBFactory interface: operation cmp(any, any) 
 PASS IDBFactory must be primary interface of [object IDBFactory] 
 PASS Stringification of [object IDBFactory] 
@@ -60,7 +60,7 @@
 PASS IDBFactory interface: calling open(DOMString, optional unsigned long long) on [object IDBFactory] with too few arguments must throw TypeError 
 PASS IDBFactory interface: [object IDBFactory] must inherit property "deleteDatabase(DOMString)" with the proper type 
 PASS IDBFactory interface: calling deleteDatabase(DOMString) on [object IDBFactory] with too few arguments must throw TypeError 
-PASS IDBFactory interface: [object IDBFactory] must inherit property "databases()" with the proper type 
+FAIL IDBFactory interface: [object IDBFactory] must inherit property "databases()" with the proper type assert_inherits: property "databases" not found in prototype chain
 PASS IDBFactory interface: [object IDBFactory] must inherit property "cmp(any, any)" with the proper type 
 PASS IDBFactory interface: calling cmp(any, any) on [object IDBFactory] with too few arguments must throw TypeError 
 PASS IDBDatabase interface: existence and properties of interface object 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idlharness.any.worker-expected.txt (263092 => 263093)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idlharness.any.worker-expected.txt	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idlharness.any.worker-expected.txt	2020-06-16 15:19:10 UTC (rev 263093)
@@ -52,7 +52,7 @@
 PASS IDBFactory interface: existence and properties of interface prototype object's @@unscopables property 
 PASS IDBFactory interface: operation open(DOMString, optional unsigned long long) 
 PASS IDBFactory interface: operation deleteDatabase(DOMString) 
-PASS IDBFactory interface: operation databases() 
+FAIL IDBFactory interface: operation databases() assert_own_property: interface prototype object missing non-static operation expected property "databases" missing
 PASS IDBFactory interface: operation cmp(any, any) 
 PASS IDBFactory must be primary interface of [object IDBFactory] 
 PASS Stringification of [object IDBFactory] 
@@ -60,7 +60,7 @@
 PASS IDBFactory interface: calling open(DOMString, optional unsigned long long) on [object IDBFactory] with too few arguments must throw TypeError 
 PASS IDBFactory interface: [object IDBFactory] must inherit property "deleteDatabase(DOMString)" with the proper type 
 PASS IDBFactory interface: calling deleteDatabase(DOMString) on [object IDBFactory] with too few arguments must throw TypeError 
-PASS IDBFactory interface: [object IDBFactory] must inherit property "databases()" with the proper type 
+FAIL IDBFactory interface: [object IDBFactory] must inherit property "databases()" with the proper type assert_inherits: property "databases" not found in prototype chain
 PASS IDBFactory interface: [object IDBFactory] must inherit property "cmp(any, any)" with the proper type 
 PASS IDBFactory interface: calling cmp(any, any) on [object IDBFactory] with too few arguments must throw TypeError 
 PASS IDBDatabase interface: existence and properties of interface object 

Modified: trunk/Source/WebCore/ChangeLog (263092 => 263093)


--- trunk/Source/WebCore/ChangeLog	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/ChangeLog	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,3 +1,15 @@
+2020-06-16  Truitt Savell  <[email protected]>
+
+        Unreviewed, reverting r263079.
+
+        Broke Internal builds.
+
+        Reverted changeset:
+
+        "IndexedDB: Support IDBFactory databases method"
+        https://bugs.webkit.org/show_bug.cgi?id=211043
+        https://trac.webkit.org/changeset/263079
+
 2020-06-16  Antti Koivisto  <[email protected]>
 
         O(n^2) behavior in media query resolution

Modified: trunk/Source/WebCore/Headers.cmake (263092 => 263093)


--- trunk/Source/WebCore/Headers.cmake	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Headers.cmake	2020-06-16 15:19:10 UTC (rev 263093)
@@ -40,7 +40,6 @@
 
     Modules/indexeddb/IDBActiveDOMObject.h
     Modules/indexeddb/IDBDatabaseIdentifier.h
-    Modules/indexeddb/IDBDatabaseNameAndVersionRequest.h
     Modules/indexeddb/IDBGetAllResult.h
     Modules/indexeddb/IDBGetResult.h
     Modules/indexeddb/IDBKey.h
@@ -73,7 +72,6 @@
     Modules/indexeddb/shared/IDBCursorInfo.h
     Modules/indexeddb/shared/IDBCursorRecord.h
     Modules/indexeddb/shared/IDBDatabaseInfo.h
-    Modules/indexeddb/shared/IDBDatabaseNameAndVersion.h
     Modules/indexeddb/shared/IDBError.h
     Modules/indexeddb/shared/IDBGetAllRecordsData.h
     Modules/indexeddb/shared/IDBGetRecordData.h

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBActiveDOMObject.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/IDBActiveDOMObject.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBActiveDOMObject.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -50,7 +50,7 @@
         ASSERT(&originThread() == &object.originThread());
 
         if (canCurrentThreadAccessThreadLocalData(object.originThread())) {
-            (object.*method)(std::forward<Arguments>(arguments)...);
+            (object.*method)(arguments...);
             return;
         }
 

Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseNameAndVersionRequest.cpp (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseNameAndVersionRequest.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseNameAndVersionRequest.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2020 Darryl Pogue ([email protected])
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "IDBDatabaseNameAndVersionRequest.h"
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include "IDBConnectionProxy.h"
-#include "ScriptExecutionContext.h"
-#include <wtf/IsoMallocInlines.h>
-
-namespace WebCore {
-
-WTF_MAKE_ISO_ALLOCATED_IMPL(IDBDatabaseNameAndVersionRequest);
-
-Ref<IDBDatabaseNameAndVersionRequest> IDBDatabaseNameAndVersionRequest::create(ScriptExecutionContext& context, IDBClient::IDBConnectionProxy& connectionProxy, InfoCallback&& callback)
-{
-    return adoptRef(*new IDBDatabaseNameAndVersionRequest(context, connectionProxy, WTFMove(callback)));
-}
-
-IDBDatabaseNameAndVersionRequest::IDBDatabaseNameAndVersionRequest(ScriptExecutionContext& context, IDBClient::IDBConnectionProxy& connectionProxy, InfoCallback&& callback)
-    : IDBActiveDOMObject(&context)
-    , m_connectionProxy(connectionProxy)
-    , m_resourceIdentifier(connectionProxy)
-    , m_callback(WTFMove(callback))
-{
-    ASSERT(canCurrentThreadAccessThreadLocalData(originThread()));
-
-    suspendIfNeeded();
-}
-
-IDBDatabaseNameAndVersionRequest::~IDBDatabaseNameAndVersionRequest()
-{
-    ASSERT(canCurrentThreadAccessThreadLocalData(originThread()));
-}
-
-void IDBDatabaseNameAndVersionRequest::complete(Optional<Vector<IDBDatabaseNameAndVersion>>&& databases)
-{
-    ASSERT(canCurrentThreadAccessThreadLocalData(originThread()));
-
-    if (auto callback = WTFMove(m_callback))
-        callback(WTFMove(databases));
-}
-
-const char* IDBDatabaseNameAndVersionRequest::activeDOMObjectName() const
-{
-    ASSERT(canCurrentThreadAccessThreadLocalData(originThread()));
-    return "IDBDatabaseNameAndVersionRequest";
-}
-
-bool IDBDatabaseNameAndVersionRequest::virtualHasPendingActivity() const
-{
-    ASSERT(canCurrentThreadAccessThreadLocalData(originThread()) || Thread::mayBeGCThread());
-    return true;
-}
-
-void IDBDatabaseNameAndVersionRequest::stop()
-{
-    ASSERT(canCurrentThreadAccessThreadLocalData(originThread()));
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)

Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseNameAndVersionRequest.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseNameAndVersionRequest.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseNameAndVersionRequest.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2020 Darryl Pogue ([email protected])
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include "IDBActiveDOMObject.h"
-#include "IDBDatabaseNameAndVersion.h"
-#include "IDBResourceIdentifier.h"
-#include <wtf/Forward.h>
-#include <wtf/Function.h>
-#include <wtf/IsoMalloc.h>
-#include <wtf/Ref.h>
-#include <wtf/ThreadSafeRefCounted.h>
-
-namespace WebCore {
-
-class ScriptExecutionContext;
-
-namespace IDBClient {
-class IDBConnectionProxy;
-}
-
-class IDBDatabaseNameAndVersionRequest final : public ThreadSafeRefCounted<IDBDatabaseNameAndVersionRequest>, public IDBActiveDOMObject {
-    WTF_MAKE_ISO_ALLOCATED(IDBDatabaseNameAndVersionRequest);
-public:
-    using InfoCallback = Function<void(Optional<Vector<IDBDatabaseNameAndVersion>>&&)>;
-
-    static Ref<IDBDatabaseNameAndVersionRequest> create(ScriptExecutionContext&, IDBClient::IDBConnectionProxy&, InfoCallback&&);
-
-    ~IDBDatabaseNameAndVersionRequest();
-
-    const IDBResourceIdentifier& resourceIdentifier() const { return m_resourceIdentifier; }
-
-    using ThreadSafeRefCounted<IDBDatabaseNameAndVersionRequest>::ref;
-    using ThreadSafeRefCounted<IDBDatabaseNameAndVersionRequest>::deref;
-
-    void complete(Optional<Vector<IDBDatabaseNameAndVersion>>&&);
-
-private:
-    IDBDatabaseNameAndVersionRequest(ScriptExecutionContext&, IDBClient::IDBConnectionProxy&, InfoCallback&&);
-
-    // ActiveDOMObject.
-    bool virtualHasPendingActivity() const final;
-    const char* activeDOMObjectName() const final;
-    void stop() final;
-
-    Ref<IDBClient::IDBConnectionProxy> m_connectionProxy;
-    IDBResourceIdentifier m_resourceIdentifier;
-    InfoCallback m_callback;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -34,10 +34,10 @@
 #include "IDBDatabaseIdentifier.h"
 #include "IDBKey.h"
 #include "IDBOpenDBRequest.h"
-#include "JSIDBFactory.h"
 #include "Logging.h"
 #include "Page.h"
 #include "ScriptExecutionContext.h"
+#include "SecurityOrigin.h"
 
 
 namespace WebCore {
@@ -133,43 +133,11 @@
     return first->compare(second.get());
 }
 
-void IDBFactory::databases(ScriptExecutionContext& context, IDBDatabasesResponsePromise&& promise)
+void IDBFactory::getAllDatabaseNames(const SecurityOrigin& mainFrameOrigin, const SecurityOrigin& openingOrigin, Function<void (const Vector<String>&)>&& callback)
 {
-    LOG(IndexedDB, "IDBFactory::databases");
-
-    if (shouldThrowSecurityException(context)) {
-        promise.reject(SecurityError);
-        return;
-    }
-
-    ASSERT(context.securityOrigin());
-
-    m_connectionProxy->getAllDatabaseNamesAndVersions(context, [promise = WTFMove(promise)](auto&& result) mutable {
-        if (!result) {
-            promise.reject(Exception { UnknownError });
-            return;
-        }
-
-        promise.resolve(WTF::map(*result, [](auto&& info) {
-            return IDBFactory::DatabaseInfo { WTFMove(info.name), info.version };
-        }));
-    });
+    m_connectionProxy->getAllDatabaseNames(mainFrameOrigin, openingOrigin, WTFMove(callback));
 }
 
-void IDBFactory::getAllDatabaseNames(ScriptExecutionContext& context, Function<void(const Vector<String>&)>&& callback)
-{
-    m_connectionProxy->getAllDatabaseNamesAndVersions(context, [callback = WTFMove(callback)](auto&& result) mutable {
-        if (!result) {
-            callback({ });
-            return;
-        }
-
-        callback(WTF::map(*result, [](auto&& info) {
-            return WTFMove(info.name);
-        }));
-    });
-}
-
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -28,7 +28,6 @@
 #if ENABLE(INDEXED_DATABASE)
 
 #include "ExceptionOr.h"
-#include "JSDOMPromiseDeferred.h"
 #include <wtf/Function.h>
 #include <wtf/Forward.h>
 #include <wtf/Ref.h>
@@ -55,22 +54,13 @@
     static Ref<IDBFactory> create(IDBClient::IDBConnectionProxy&);
     ~IDBFactory();
 
-    struct DatabaseInfo {
-        String name;
-        uint64_t version;
-    };
-
     ExceptionOr<Ref<IDBOpenDBRequest>> open(ScriptExecutionContext&, const String& name, Optional<uint64_t> version);
     ExceptionOr<Ref<IDBOpenDBRequest>> deleteDatabase(ScriptExecutionContext&, const String& name);
 
     ExceptionOr<short> cmp(JSC::JSGlobalObject&, JSC::JSValue first, JSC::JSValue second);
 
-    using IDBDatabasesResponsePromise = DOMPromiseDeferred<IDLSequence<IDLDictionary<IDBFactory::DatabaseInfo>>>;
+    WEBCORE_EXPORT void getAllDatabaseNames(const SecurityOrigin& mainFrameOrigin, const SecurityOrigin& openingOrigin, WTF::Function<void (const Vector<String>&)>&&);
 
-    void databases(ScriptExecutionContext&, IDBDatabasesResponsePromise&&);
-
-    WEBCORE_EXPORT void getAllDatabaseNames(ScriptExecutionContext&, Function<void(const Vector<String>&)>&&);
-
 private:
     explicit IDBFactory(IDBClient::IDBConnectionProxy&);
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl	2020-06-16 15:19:10 UTC (rev 263093)
@@ -29,14 +29,5 @@
 ] interface IDBFactory {
     [CallWith=ScriptExecutionContext, MayThrowException] IDBOpenDBRequest open(DOMString name, optional [EnforceRange] unsigned long long version);
     [CallWith=ScriptExecutionContext, MayThrowException] IDBOpenDBRequest deleteDatabase(DOMString name);
-    [CallWith=ScriptExecutionContext] Promise<sequence<IDBDatabaseInfo>> databases();
     [CallWith=GlobalObject, MayThrowException] short cmp(any first, any second);
 };
-
-[
-    Conditional=INDEXED_DATABASE,
-    JSGenerateToJSObject,
-] dictionary IDBDatabaseInfo {
-    DOMString name;
-    unsigned long long version;
-};

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -30,8 +30,6 @@
 
 #include "IDBCursorInfo.h"
 #include "IDBDatabase.h"
-#include "IDBDatabaseNameAndVersion.h"
-#include "IDBDatabaseNameAndVersionRequest.h"
 #include "IDBGetRecordData.h"
 #include "IDBIterateCursorData.h"
 #include "IDBKeyRangeData.h"
@@ -471,15 +469,6 @@
         auto result = IDBResultData::error(requestIdentifier, error);
         request->performCallbackOnOriginThread(*request, &IDBOpenDBRequest::requestCompleted, result);
     }
-
-    Vector<IDBResourceIdentifier> infoCallbackIdentifiers;
-    {
-        Locker<Lock> lock(m_databaseInfoMapLock);
-        infoCallbackIdentifiers = copyToVector(m_databaseInfoCallbacks.keys());
-    }
-
-    for (auto& requestIdentifier : infoCallbackIdentifiers)
-        didGetAllDatabaseNamesAndVersions(requestIdentifier, { });
 }
 
 void IDBConnectionProxy::scheduleMainThreadTasks()
@@ -507,38 +496,14 @@
         task->performTask();
 }
 
-void IDBConnectionProxy::getAllDatabaseNamesAndVersions(ScriptExecutionContext& context, Function<void(Optional<Vector<IDBDatabaseNameAndVersion>>&&)>&& callback)
+void IDBConnectionProxy::getAllDatabaseNames(const SecurityOrigin& mainFrameOrigin, const SecurityOrigin& openingOrigin, Function<void (const Vector<String>&)>&& callback)
 {
-    ClientOrigin origin { context.securityOrigin()->data(), context.topOrigin().data() };
+    // This method is only meant to be called by the web inspector on the main thread.
+    RELEASE_ASSERT(isMainThread());
 
-    IDBDatabaseNameAndVersionRequest* request;
-    {
-        Locker<Lock> locker(m_databaseInfoMapLock);
-        auto newRequest = IDBDatabaseNameAndVersionRequest::create(context, *this, WTFMove(callback));
-        ASSERT(!m_databaseInfoCallbacks.contains(newRequest->resourceIdentifier()));
-        request = newRequest.ptr();
-        m_databaseInfoCallbacks.add(newRequest->resourceIdentifier(), WTFMove(newRequest));
-    }
-
-    callConnectionOnMainThread(&IDBConnectionToServer::getAllDatabaseNamesAndVersions, request->resourceIdentifier(), origin);
+    m_connectionToServer.getAllDatabaseNames(mainFrameOrigin, openingOrigin, WTFMove(callback));
 }
 
-void IDBConnectionProxy::didGetAllDatabaseNamesAndVersions(const IDBResourceIdentifier& requestIdentifier, Optional<Vector<IDBDatabaseNameAndVersion>>&& databases)
-{
-    RefPtr<IDBDatabaseNameAndVersionRequest> request;
-    {
-        Locker<Lock> locker(m_databaseInfoMapLock);
-        auto takenRequest = m_databaseInfoCallbacks.take(requestIdentifier);
-
-        if (!takenRequest)
-            return;
-
-        request = WTFMove(*takenRequest);
-    }
-
-    request->performCallbackOnOriginThread(*request, &IDBDatabaseNameAndVersionRequest::complete, WTFMove(databases));
-}
-
 void IDBConnectionProxy::registerDatabaseConnection(IDBDatabase& database)
 {
     Locker<Lock> locker(m_databaseConnectionMapLock);
@@ -631,10 +596,6 @@
         Locker<Lock> lock(m_transactionOperationLock);
         removeItemsMatchingCurrentThread(m_activeOperations);
     }
-    {
-        Locker<Lock> lock(m_databaseInfoMapLock);
-        removeItemsMatchingCurrentThread(m_databaseInfoCallbacks);
-    }
 }
 
 void IDBConnectionProxy::setContextSuspended(ScriptExecutionContext& currentContext, bool isContextSuspended)

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -28,7 +28,6 @@
 #if ENABLE(INDEXED_DATABASE)
 
 #include "IDBConnectionToServer.h"
-#include "IDBDatabaseNameAndVersionRequest.h"
 #include "IDBResourceIdentifier.h"
 #include "TransactionOperation.h"
 #include <wtf/CrossThreadQueue.h>
@@ -116,8 +115,7 @@
     void ref();
     void deref();
 
-    void getAllDatabaseNamesAndVersions(ScriptExecutionContext&, Function<void(Optional<Vector<IDBDatabaseNameAndVersion>>&&)>&&);
-    void didGetAllDatabaseNamesAndVersions(const IDBResourceIdentifier&, Optional<Vector<IDBDatabaseNameAndVersion>>&&);
+    void getAllDatabaseNames(const SecurityOrigin& mainFrameOrigin, const SecurityOrigin& openingOrigin, WTF::Function<void (const Vector<String>&)>&&);
 
     void registerDatabaseConnection(IDBDatabase&);
     void unregisterDatabaseConnection(IDBDatabase&);
@@ -171,9 +169,6 @@
     HashMap<IDBResourceIdentifier, RefPtr<TransactionOperation>> m_activeOperations;
     Lock m_transactionOperationLock;
 
-    HashMap<IDBResourceIdentifier, Ref<IDBDatabaseNameAndVersionRequest>> m_databaseInfoCallbacks;
-    Lock m_databaseInfoMapLock;
-
     CrossThreadQueue<CrossThreadTask> m_mainThreadQueue;
     Lock m_mainThreadTaskLock;
     RefPtr<IDBConnectionToServer> m_mainThreadProtector;

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -30,7 +30,6 @@
 
 #include "IDBConnectionProxy.h"
 #include "IDBDatabase.h"
-#include "IDBDatabaseNameAndVersion.h"
 #include "IDBGetRecordData.h"
 #include "IDBKeyRangeData.h"
 #include "IDBOpenDBRequest.h"
@@ -495,27 +494,27 @@
         m_delegate->abortOpenAndUpgradeNeeded(databaseConnectionIdentifier, transactionIdentifier);
 }
 
-void IDBConnectionToServer::getAllDatabaseNamesAndVersions(const IDBResourceIdentifier& requestIdentifier, const ClientOrigin& origin)
+void IDBConnectionToServer::getAllDatabaseNames(const SecurityOrigin& mainFrameOrigin, const SecurityOrigin& openingOrigin, Function<void (const Vector<String>&)>&& callback)
 {
-    LOG(IndexedDB, "IDBConnectionToServer::getAllDatabaseNamesAndVersions");
-    ASSERT(isMainThread());
+    static uint64_t callbackID = 0;
 
-    if (m_serverConnectionIsValid) {
-        m_delegate->getAllDatabaseNamesAndVersions(requestIdentifier, origin);
-        return;
+    m_getAllDatabaseNamesCallbacks.add(++callbackID, WTFMove(callback));
+
+    if (m_serverConnectionIsValid)
+        m_delegate->getAllDatabaseNames(mainFrameOrigin.data(), openingOrigin.data(), callbackID);
+    else {
+        callOnMainThread([this, protectedThis = makeRef(*this), callbackID = callbackID] {
+            didGetAllDatabaseNames(callbackID, { });
+        });
     }
-
-    callOnMainThread([this, protectedThis = makeRef(*this), requestIdentifier] {
-        didGetAllDatabaseNamesAndVersions(requestIdentifier, { });
-    });
 }
 
-void IDBConnectionToServer::didGetAllDatabaseNamesAndVersions(const IDBResourceIdentifier& requestIdentifier, Vector<IDBDatabaseNameAndVersion>&& databases)
+void IDBConnectionToServer::didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames)
 {
-    LOG(IndexedDB, "IDBConnectionToServer::didGetAllDatabaseNamesAndVersions");
-    ASSERT(isMainThread());
+    auto callback = m_getAllDatabaseNamesCallbacks.take(callbackID);
+    ASSERT(callback);
 
-    m_proxy->didGetAllDatabaseNamesAndVersions(requestIdentifier, WTFMove(databases));
+    callback(databaseNames);
 }
 
 } // namespace IDBClient

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -45,8 +45,6 @@
 class IDBValue;
 class SecurityOrigin;
 
-struct ClientOrigin;
-struct IDBDatabaseNameAndVersion;
 struct IDBGetAllRecordsData;
 struct IDBGetRecordData;
 struct IDBIterateCursorData;
@@ -138,8 +136,8 @@
     // versionchange transaction, but the page is already torn down.
     void abortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& transactionIdentifier);
 
-    void getAllDatabaseNamesAndVersions(const IDBResourceIdentifier&, const ClientOrigin&);
-    WEBCORE_EXPORT void didGetAllDatabaseNamesAndVersions(const IDBResourceIdentifier&, Vector<IDBDatabaseNameAndVersion>&&);
+    void getAllDatabaseNames(const SecurityOrigin& mainFrameOrigin, const SecurityOrigin& openingOrigin, WTF::Function<void (const Vector<String>&)>&&);
+    WEBCORE_EXPORT void didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames);
 
 private:
     IDBConnectionToServer(IDBConnectionToServerDelegate&);
@@ -146,10 +144,12 @@
 
     typedef void (IDBConnectionToServer::*ResultFunction)(const IDBResultData&);
     void callResultFunctionWithErrorLater(ResultFunction, const IDBResourceIdentifier& requestIdentifier);
-
+    
     WeakPtr<IDBConnectionToServerDelegate> m_delegate;
     bool m_serverConnectionIsValid { true };
 
+    HashMap<uint64_t, WTF::Function<void (const Vector<String>&)>> m_getAllDatabaseNamesCallbacks;
+
     std::unique_ptr<IDBConnectionProxy> m_proxy;
 };
 

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -41,7 +41,6 @@
 class IDBTransactionInfo;
 class IDBValue;
 
-struct ClientOrigin;
 struct IDBGetAllRecordsData;
 struct IDBGetRecordData;
 struct IDBIterateCursorData;
@@ -88,7 +87,7 @@
     virtual void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& requestIdentifier, const IndexedDB::ConnectionClosedOnBehalfOfServer) = 0;
     virtual void openDBRequestCancelled(const IDBRequestData&) = 0;
 
-    virtual void getAllDatabaseNamesAndVersions(const IDBResourceIdentifier&, const ClientOrigin&) = 0;
+    virtual void getAllDatabaseNames(const SecurityOriginData& mainFrameOrigin, const SecurityOriginData& openingOrigin, uint64_t callbackID) = 0;
 };
 
 } // namespace IDBClient

Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -28,7 +28,6 @@
 
 #if ENABLE(INDEXED_DATABASE)
 
-#include "IDBDatabaseNameAndVersion.h"
 #include "UniqueIDBDatabaseConnection.h"
 
 namespace WebCore {
@@ -182,10 +181,10 @@
         m_delegate->notifyOpenDBRequestBlocked(requestIdentifier, oldVersion, newVersion);
 }
 
-void IDBConnectionToClient::didGetAllDatabaseNamesAndVersions(const IDBResourceIdentifier& requestIdentifier, Vector<IDBDatabaseNameAndVersion>&& databases)
+void IDBConnectionToClient::didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames)
 {
     if (m_delegate)
-        m_delegate->didGetAllDatabaseNamesAndVersions(requestIdentifier, WTFMove(databases));
+        m_delegate->didGetAllDatabaseNames(callbackID, databaseNames);
 }
 
 void IDBConnectionToClient::registerDatabaseConnection(UniqueIDBDatabaseConnection& connection)

Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -39,8 +39,6 @@
 class IDBResourceIdentifier;
 class IDBResultData;
 
-struct IDBDatabaseNameAndVersion;
-
 namespace IDBServer {
 
 class UniqueIDBDatabaseConnection;
@@ -76,7 +74,7 @@
 
     void notifyOpenDBRequestBlocked(const IDBResourceIdentifier& requestIdentifier, uint64_t oldVersion, uint64_t newVersion);
 
-    void didGetAllDatabaseNamesAndVersions(const IDBResourceIdentifier&, Vector<IDBDatabaseNameAndVersion>&&);
+    void didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames);
 
     void registerDatabaseConnection(UniqueIDBDatabaseConnection&);
     void unregisterDatabaseConnection(UniqueIDBDatabaseConnection&);

Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -36,8 +36,6 @@
 class IDBError;
 class IDBResultData;
 
-struct IDBDatabaseNameAndVersion;
-
 namespace IDBServer {
 
 class UniqueIDBDatabaseConnection;
@@ -72,7 +70,7 @@
     virtual void didCloseFromServer(UniqueIDBDatabaseConnection&, const IDBError&) = 0;
     virtual void notifyOpenDBRequestBlocked(const IDBResourceIdentifier& requestIdentifier, uint64_t oldVersion, uint64_t newVersion) = 0;
 
-    virtual void didGetAllDatabaseNamesAndVersions(const IDBResourceIdentifier&, const Vector<IDBDatabaseNameAndVersion>&) = 0;
+    virtual void didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames) = 0;
 };
 
 } // namespace IDBServer

Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -507,27 +507,26 @@
         m_uniqueIDBDatabaseMap.remove(uniqueIDBDatabase->identifier());
 }
 
-void IDBServer::getAllDatabaseNamesAndVersions(IDBConnectionIdentifier serverConnectionIdentifier, const IDBResourceIdentifier& requestIdentifier, const ClientOrigin& origin)
+void IDBServer::getAllDatabaseNames(IDBConnectionIdentifier serverConnectionIdentifier, const SecurityOriginData& mainFrameOrigin, const SecurityOriginData& openingOrigin, uint64_t callbackID)
 {
     ASSERT(!isMainThread());
     ASSERT(m_lock.isHeld());
 
     auto databaseDirectoryPath = this->databaseDirectoryPathIsolatedCopy();
-    String oldDirectory = IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot(origin.topOrigin, origin.clientOrigin, databaseDirectoryPath, "v0");
+    String oldDirectory = IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot(mainFrameOrigin, openingOrigin, databaseDirectoryPath, "v0");
     Vector<String> files = FileSystem::listDirectory(oldDirectory, "*"_s);
-    Vector<IDBDatabaseNameAndVersion> databases;
+    Vector<String> databases;
     for (auto& file : files) {
-        auto databaseTuple = SQLiteIDBBackingStore::databaseNameAndVersionFromFile(SQLiteIDBBackingStore::fullDatabasePathForDirectory(file));
-        if (databaseTuple)
-            databases.append(WTFMove(*databaseTuple));
+        String encodedName = FileSystem::lastComponentOfPathIgnoringTrailingSlash(file);
+        databases.append(SQLiteIDBBackingStore::databaseNameFromEncodedFilename(encodedName));
     }
 
-    String directory = IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot(origin.topOrigin, origin.clientOrigin, databaseDirectoryPath, "v1");
+    String directory = IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot(mainFrameOrigin, openingOrigin, databaseDirectoryPath, "v1");
     files = FileSystem::listDirectory(directory, "*"_s);
     for (auto& file : files) {
-        auto databaseTuple = SQLiteIDBBackingStore::databaseNameAndVersionFromFile(SQLiteIDBBackingStore::fullDatabasePathForDirectory(file));
-        if (databaseTuple)
-            databases.append(WTFMove(*databaseTuple));
+        auto databaseName = SQLiteIDBBackingStore::databaseNameFromFile(SQLiteIDBBackingStore::fullDatabasePathForDirectory(file));
+        if (!databaseName.isEmpty())
+            databases.append(databaseName);
     }
 
     auto connection = m_connectionMap.get(serverConnectionIdentifier);
@@ -534,7 +533,7 @@
     if (!connection)
         return;
 
-    connection->didGetAllDatabaseNamesAndVersions(requestIdentifier, WTFMove(databases));
+    connection->didGetAllDatabaseNames(callbackID, databases);
 }
 
 void IDBServer::closeAndDeleteDatabasesModifiedSince(WallTime modificationTime)

Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -89,9 +89,8 @@
     WEBCORE_EXPORT void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& requestIdentifier, IndexedDB::ConnectionClosedOnBehalfOfServer);
     WEBCORE_EXPORT void openDBRequestCancelled(const IDBRequestData&);
 
-    WEBCORE_EXPORT void getAllDatabaseNamesAndVersions(IDBConnectionIdentifier, const IDBResourceIdentifier&, const ClientOrigin&);
+    WEBCORE_EXPORT void getAllDatabaseNames(IDBConnectionIdentifier serverConnectionIdentifier, const SecurityOriginData& mainFrameOrigin, const SecurityOriginData& openingOrigin, uint64_t callbackID);
 
-
     void registerDatabaseConnection(UniqueIDBDatabaseConnection&);
     void unregisterDatabaseConnection(UniqueIDBDatabaseConnection&);
     void registerTransaction(UniqueIDBDatabaseTransaction&);

Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -912,31 +912,19 @@
     return fullDatabasePathForDirectory(m_databaseDirectory);
 }
 
-Optional<IDBDatabaseNameAndVersion> SQLiteIDBBackingStore::databaseNameAndVersionFromFile(const String& databasePath)
+String SQLiteIDBBackingStore::databaseNameFromFile(const String& databasePath)
 {
     SQLiteDatabase database;
     if (!database.open(databasePath)) {
         LOG_ERROR("Failed to open SQLite database at path '%s' when getting database name", databasePath.utf8().data());
-        return WTF::nullopt;
+        return { };
     }
     if (!database.tableExists("IDBDatabaseInfo"_s)) {
         LOG_ERROR("Could not find IDBDatabaseInfo table and get database name(%i) - %s", database.lastError(), database.lastErrorMsg());
-        return WTF::nullopt;
+        return { };
     }
-
-    SQLiteStatement namesql(database, "SELECT value FROM IDBDatabaseInfo WHERE key = 'DatabaseName';");
-    auto databaseName = namesql.getColumnText(0);
-
-    SQLiteStatement versql(database, "SELECT value FROM IDBDatabaseInfo WHERE key = 'DatabaseVersion';"_s);
-    String stringVersion = versql.getColumnText(0);
-    bool ok;
-    uint64_t databaseVersion = stringVersion.toUInt64Strict(&ok);
-    if (!ok) {
-        LOG_ERROR("Database version on disk ('%s') does not cleanly convert to an unsigned 64-bit integer version", stringVersion.utf8().data());
-        return WTF::nullopt;
-    }
-
-    return IDBDatabaseNameAndVersion { databaseName, databaseVersion };
+    SQLiteStatement sql(database, "SELECT value FROM IDBDatabaseInfo WHERE key = 'DatabaseName';");
+    return sql.getColumnText(0);
 }
 
 String SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade()

Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -30,7 +30,6 @@
 #include "IDBBackingStore.h"
 #include "IDBDatabaseIdentifier.h"
 #include "IDBDatabaseInfo.h"
-#include "IDBDatabaseNameAndVersion.h"
 #include "IDBResourceIdentifier.h"
 #include "SQLiteIDBTransaction.h"
 #include "SQLiteStatementAutoResetScope.h"
@@ -102,7 +101,7 @@
 
     String databaseDirectory() const { return m_databaseDirectory; };
     static String fullDatabasePathForDirectory(const String&);
-    static Optional<IDBDatabaseNameAndVersion> databaseNameAndVersionFromFile(const String&);
+    static String databaseNameFromFile(const String&);
 
     PAL::SessionID sessionID() const { return m_sessionID; }
 

Deleted: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseNameAndVersion.h (263092 => 263093)


--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseNameAndVersion.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseNameAndVersion.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2020 Darryl Pogue ([email protected])
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-struct IDBDatabaseNameAndVersion {
-    String name;
-    uint64_t version { 0 };
-
-    template<class Encoder> void encode(Encoder&) const;
-    template<class Decoder> static Optional<IDBDatabaseNameAndVersion> decode(Decoder&);
-
-    IDBDatabaseNameAndVersion isolatedCopy() const;
-};
-
-template<class Encoder>
-void IDBDatabaseNameAndVersion::encode(Encoder& encoder) const
-{
-    encoder << name << version;
-}
-
-template<class Decoder>
-Optional<IDBDatabaseNameAndVersion> IDBDatabaseNameAndVersion::decode(Decoder& decoder)
-{
-    IDBDatabaseNameAndVersion info;
-
-    if (!decoder.decode(info.name))
-        return WTF::nullopt;
-
-    if (!decoder.decode(info.version))
-        return WTF::nullopt;
-
-    return info;
-}
-
-inline IDBDatabaseNameAndVersion IDBDatabaseNameAndVersion::isolatedCopy() const
-{
-    return { name.isolatedCopy(), version };
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)

Modified: trunk/Source/WebCore/Sources.txt (263092 => 263093)


--- trunk/Source/WebCore/Sources.txt	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/Sources.txt	2020-06-16 15:19:10 UTC (rev 263093)
@@ -88,7 +88,6 @@
 Modules/indexeddb/IDBCursorWithValue.cpp
 Modules/indexeddb/IDBDatabase.cpp
 Modules/indexeddb/IDBDatabaseIdentifier.cpp
-Modules/indexeddb/IDBDatabaseNameAndVersionRequest.cpp
 Modules/indexeddb/IDBFactory.cpp
 Modules/indexeddb/IDBGetAllResult.cpp
 Modules/indexeddb/IDBGetResult.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (263092 => 263093)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-06-16 15:19:10 UTC (rev 263093)
@@ -2584,8 +2584,6 @@
 		8F67561B1288B17B0047ACA3 /* EventQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F6756191288B17B0047ACA3 /* EventQueue.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		9001774112E0347800648462 /* OESStandardDerivatives.h in Headers */ = {isa = PBXBuildFile; fileRef = 9001773E12E0347800648462 /* OESStandardDerivatives.h */; };
 		9001788112E0370700648462 /* JSOESStandardDerivatives.h in Headers */ = {isa = PBXBuildFile; fileRef = 9001787F12E0370700648462 /* JSOESStandardDerivatives.h */; };
-		9016EA4D2454D8130021D9D1 /* IDBDatabaseNameAndVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 9016EA4C2454D8130021D9D1 /* IDBDatabaseNameAndVersion.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		90E351C2247E46E400FBF24F /* IDBDatabaseNameAndVersionRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 90E351BD247E3D4800FBF24F /* IDBDatabaseNameAndVersionRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		9109E9C8222CABCA00BB6264 /* InspectorAuditResourcesObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 9109E9C5222CABC800BB6264 /* InspectorAuditResourcesObject.h */; };
 		9109E9C8222CABCA00BB6265 /* JSInspectorAuditResourcesObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 9109E9C5222CABC800BB6265 /* JSInspectorAuditResourcesObject.h */; };
 		91278D5E21DEDAD600B57184 /* PageAuditAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D5C21DEDAD500B57184 /* PageAuditAgent.h */; };
@@ -10716,9 +10714,6 @@
 		9001773F12E0347800648462 /* OESStandardDerivatives.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OESStandardDerivatives.idl; sourceTree = "<group>"; };
 		9001787E12E0370700648462 /* JSOESStandardDerivatives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESStandardDerivatives.cpp; sourceTree = "<group>"; };
 		9001787F12E0370700648462 /* JSOESStandardDerivatives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESStandardDerivatives.h; sourceTree = "<group>"; };
-		9016EA4C2454D8130021D9D1 /* IDBDatabaseNameAndVersion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseNameAndVersion.h; sourceTree = "<group>"; };
-		90E351BC247E3D4800FBF24F /* IDBDatabaseNameAndVersionRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseNameAndVersionRequest.cpp; sourceTree = "<group>"; };
-		90E351BD247E3D4800FBF24F /* IDBDatabaseNameAndVersionRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseNameAndVersionRequest.h; sourceTree = "<group>"; };
 		9109E9C5222CABC800BB6264 /* InspectorAuditResourcesObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorAuditResourcesObject.h; sourceTree = "<group>"; };
 		9109E9C5222CABC800BB6265 /* JSInspectorAuditResourcesObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInspectorAuditResourcesObject.h; sourceTree = "<group>"; };
 		9109E9C7222CABC900BB6264 /* InspectorAuditResourcesObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorAuditResourcesObject.cpp; sourceTree = "<group>"; };
@@ -19376,7 +19371,6 @@
 				5110FCFB1E0362A5006F8D0B /* IDBCursorRecord.h */,
 				51BA4AC11BBB5CBF00DF3D6D /* IDBDatabaseInfo.cpp */,
 				51BA4AC21BBB5CBF00DF3D6D /* IDBDatabaseInfo.h */,
-				9016EA4C2454D8130021D9D1 /* IDBDatabaseNameAndVersion.h */,
 				5148453C1BB9D076006A72ED /* IDBError.cpp */,
 				5148453D1BB9D076006A72ED /* IDBError.h */,
 				519DBC6D1DC00FB900329BF5 /* IDBGetAllRecordsData.cpp */,
@@ -22853,8 +22847,6 @@
 				51D7197E181106DF0016DC51 /* IDBDatabase.idl */,
 				5103105E1BA8E090003329C0 /* IDBDatabaseIdentifier.cpp */,
 				5103105F1BA8E090003329C0 /* IDBDatabaseIdentifier.h */,
-				90E351BC247E3D4800FBF24F /* IDBDatabaseNameAndVersionRequest.cpp */,
-				90E351BD247E3D4800FBF24F /* IDBDatabaseNameAndVersionRequest.h */,
 				51645B461B9F889B00F789CE /* IDBFactory.cpp */,
 				51645B471B9F889B00F789CE /* IDBFactory.h */,
 				51D7198A181106DF0016DC51 /* IDBFactory.idl */,
@@ -30936,8 +30928,6 @@
 				5185FC811BB4C4E80012898F /* IDBDatabase.h in Headers */,
 				5185FC871BB4C4E80012898F /* IDBDatabaseIdentifier.h in Headers */,
 				51BA4AC41BBB5CD800DF3D6D /* IDBDatabaseInfo.h in Headers */,
-				9016EA4D2454D8130021D9D1 /* IDBDatabaseNameAndVersion.h in Headers */,
-				90E351C2247E46E400FBF24F /* IDBDatabaseNameAndVersionRequest.h in Headers */,
 				5148453F1BB9D07E006A72ED /* IDBError.h in Headers */,
 				5185FC8D1BB4C4E80012898F /* IDBFactory.h in Headers */,
 				519DBC6F1DC011A700329BF5 /* IDBGetAllRecordsData.h in Headers */,

Modified: trunk/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp (263092 => 263093)


--- trunk/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -596,7 +596,9 @@
     if (!getDocumentAndIDBFactoryFromFrameOrSendFailure(frame, document, idbFactory, callback))
         return;
 
-    idbFactory->getAllDatabaseNames(*document, [callback = WTFMove(callback)](auto& databaseNames) {
+    auto& openingOrigin = document->securityOrigin();
+    auto& topOrigin = document->topOrigin();
+    idbFactory->getAllDatabaseNames(topOrigin, openingOrigin, [callback = WTFMove(callback)](auto& databaseNames) {
         if (!callback->isActive())
             return;
 

Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (263092 => 263093)


--- trunk/Source/WebCore/loader/EmptyClients.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -152,7 +152,7 @@
         void abortOpenAndUpgradeNeeded(uint64_t, const IDBResourceIdentifier&) final { }
         void didFireVersionChangeEvent(uint64_t, const IDBResourceIdentifier&, const IndexedDB::ConnectionClosedOnBehalfOfServer) final { }
         void openDBRequestCancelled(const IDBRequestData&) final { }
-        void getAllDatabaseNamesAndVersions(const IDBResourceIdentifier&, const ClientOrigin&) final { }
+        void getAllDatabaseNames(const SecurityOriginData&, const SecurityOriginData&, uint64_t) final { }
         ~EmptyIDBConnectionToServerDeletegate() { }
     };
 

Modified: trunk/Source/WebKit/ChangeLog (263092 => 263093)


--- trunk/Source/WebKit/ChangeLog	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKit/ChangeLog	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,3 +1,15 @@
+2020-06-16  Truitt Savell  <[email protected]>
+
+        Unreviewed, reverting r263079.
+
+        Broke Internal builds.
+
+        Reverted changeset:
+
+        "IndexedDB: Support IDBFactory databases method"
+        https://bugs.webkit.org/show_bug.cgi?id=211043
+        https://trac.webkit.org/changeset/263079
+
 2020-06-16  Carlos Garcia Campos  <[email protected]>
 
         [GTK][WPE] Add API to configure and enable resource load statistics

Modified: trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp (263092 => 263093)


--- trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -193,9 +193,9 @@
     send(Messages::WebIDBConnectionToServer::NotifyOpenDBRequestBlocked(requestIdentifier, oldVersion, newVersion));
 }
 
-void WebIDBConnectionToClient::didGetAllDatabaseNamesAndVersions(const WebCore::IDBResourceIdentifier& requestIdentifier, const Vector<WebCore::IDBDatabaseNameAndVersion>& databases)
+void WebIDBConnectionToClient::didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames)
 {
-    send(Messages::WebIDBConnectionToServer::DidGetAllDatabaseNamesAndVersions(requestIdentifier, databases));
+    send(Messages::WebIDBConnectionToServer::DidGetAllDatabaseNames(callbackID, databaseNames));
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.h (263092 => 263093)


--- trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -82,7 +82,7 @@
     void didCloseFromServer(WebCore::IDBServer::UniqueIDBDatabaseConnection&, const WebCore::IDBError&) final;
     void notifyOpenDBRequestBlocked(const WebCore::IDBResourceIdentifier& requestIdentifier, uint64_t oldVersion, uint64_t newVersion) final;
 
-    void didGetAllDatabaseNamesAndVersions(const WebCore::IDBResourceIdentifier&, const Vector<WebCore::IDBDatabaseNameAndVersion>&) final;
+    void didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames) final;
 
     template<class MessageType> void handleGetResult(const WebCore::IDBResultData&);
 

Modified: trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.cpp (263092 => 263093)


--- trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -315,7 +315,7 @@
     m_server->openDBRequestCancelled(requestData);
 }
 
-void WebIDBServer::getAllDatabaseNamesAndVersions(IPC::Connection& connection, const WebCore::IDBResourceIdentifier& requestIdentifier, const WebCore::ClientOrigin& origin)
+void WebIDBServer::getAllDatabaseNames(IPC::Connection& connection, const WebCore::SecurityOriginData& mainFrameOrigin, const WebCore::SecurityOriginData& openingOrigin, uint64_t callbackID)
 {
     ASSERT(!RunLoop::isMain());
 
@@ -323,7 +323,7 @@
     ASSERT(webIDBConnection);
 
     LockHolder locker(m_server->lock());
-    m_server->getAllDatabaseNamesAndVersions(webIDBConnection->identifier(), requestIdentifier, origin);
+    m_server->getAllDatabaseNames(webIDBConnection->identifier(), mainFrameOrigin, openingOrigin, callbackID);
 }
 
 void WebIDBServer::addConnection(IPC::Connection& connection, WebCore::ProcessIdentifier processIdentifier)

Modified: trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.h (263092 => 263093)


--- trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -80,7 +80,7 @@
     void abortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier& transactionIdentifier);
     void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier& requestIdentifier, const WebCore::IndexedDB::ConnectionClosedOnBehalfOfServer);
     void openDBRequestCancelled(const WebCore::IDBRequestData&);
-    void getAllDatabaseNamesAndVersions(IPC::Connection&, const WebCore::IDBResourceIdentifier&, const WebCore::ClientOrigin&);
+    void getAllDatabaseNames(IPC::Connection&, const WebCore::SecurityOriginData&, const WebCore::SecurityOriginData&, uint64_t callbackID);
 
     void addConnection(IPC::Connection&, WebCore::ProcessIdentifier);
     void removeConnection(IPC::Connection&);

Modified: trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.messages.in (263092 => 263093)


--- trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.messages.in	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.messages.in	2020-06-16 15:19:10 UTC (rev 263093)
@@ -50,7 +50,7 @@
     DidFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, WebCore::IDBResourceIdentifier requestIdentifier, WebCore::IndexedDB::ConnectionClosedOnBehalfOfServer connectionClosedOnBehalfOfServer)
     OpenDBRequestCancelled(WebCore::IDBRequestData requestData)
 
-    GetAllDatabaseNamesAndVersions(WebCore::IDBResourceIdentifier requestIdentifier, struct WebCore::ClientOrigin origin) WantsConnection
+    GetAllDatabaseNames(struct WebCore::SecurityOriginData topOrigin, struct WebCore::SecurityOriginData openingOrigin, uint64_t callbackID) WantsConnection
 }
 
 #endif // ENABLE(INDEXED_DATABASE)

Modified: trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp (263092 => 263093)


--- trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -207,9 +207,9 @@
     send(Messages::WebIDBServer::OpenDBRequestCancelled(requestData));
 }
 
-void WebIDBConnectionToServer::getAllDatabaseNamesAndVersions(const IDBResourceIdentifier& requestIdentifier, const ClientOrigin& origin)
+void WebIDBConnectionToServer::getAllDatabaseNames(const WebCore::SecurityOriginData& topOrigin, const WebCore::SecurityOriginData& openingOrigin, uint64_t callbackID)
 {
-    send(Messages::WebIDBServer::GetAllDatabaseNamesAndVersions(requestIdentifier, origin));
+    send(Messages::WebIDBServer::GetAllDatabaseNames(topOrigin, openingOrigin, callbackID));
 }
 
 void WebIDBConnectionToServer::didDeleteDatabase(const IDBResultData& result)
@@ -322,9 +322,9 @@
     m_connectionToServer->notifyOpenDBRequestBlocked(requestIdentifier, oldVersion, newVersion);
 }
 
-void WebIDBConnectionToServer::didGetAllDatabaseNamesAndVersions(const IDBResourceIdentifier& requestIdentifier, Vector<IDBDatabaseNameAndVersion>&& databases)
+void WebIDBConnectionToServer::didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames)
 {
-    m_connectionToServer->didGetAllDatabaseNamesAndVersions(requestIdentifier, WTFMove(databases));
+    m_connectionToServer->didGetAllDatabaseNames(callbackID, databaseNames);
 }
 
 void WebIDBConnectionToServer::connectionToServerLost()

Modified: trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h (263092 => 263093)


--- trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -80,7 +80,7 @@
     void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier& requestIdentifier, const WebCore::IndexedDB::ConnectionClosedOnBehalfOfServer) final;
     void openDBRequestCancelled(const WebCore::IDBRequestData&) final;
 
-    void getAllDatabaseNamesAndVersions(const WebCore::IDBResourceIdentifier&, const WebCore::ClientOrigin&) final;
+    void getAllDatabaseNames(const WebCore::SecurityOriginData& topOrigin, const WebCore::SecurityOriginData& openingOrigin, uint64_t callbackID) final;
 
     // Messages received from Network Process
     void didDeleteDatabase(const WebCore::IDBResultData&);
@@ -105,7 +105,7 @@
     void didStartTransaction(const WebCore::IDBResourceIdentifier& transactionIdentifier, const WebCore::IDBError&);
     void didCloseFromServer(uint64_t databaseConnectionIdentifier, const WebCore::IDBError&);
     void notifyOpenDBRequestBlocked(const WebCore::IDBResourceIdentifier& requestIdentifier, uint64_t oldVersion, uint64_t newVersion);
-    void didGetAllDatabaseNamesAndVersions(const WebCore::IDBResourceIdentifier&, Vector<WebCore::IDBDatabaseNameAndVersion>&&);
+    void didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames);
 
     Ref<WebCore::IDBClient::IDBConnectionToServer> m_connectionToServer;
 };

Modified: trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in (263092 => 263093)


--- trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in	2020-06-16 15:19:10 UTC (rev 263093)
@@ -47,7 +47,7 @@
     DidCloseFromServer(uint64_t databaseConnectionIdentifier, WebCore::IDBError error) final;
     NotifyOpenDBRequestBlocked(WebCore::IDBResourceIdentifier requestIdentifier, uint64_t oldVersion, uint64_t newVersion)
 
-    DidGetAllDatabaseNamesAndVersions(WebCore::IDBResourceIdentifier requestIdentifier, Vector<WebCore::IDBDatabaseNameAndVersion> databases)
+    DidGetAllDatabaseNames(uint64_t callbackID, Vector<String> databaseNames)
 }
 
 #endif // ENABLE(INDEXED_DATABASE)

Modified: trunk/Source/WebKitLegacy/ChangeLog (263092 => 263093)


--- trunk/Source/WebKitLegacy/ChangeLog	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKitLegacy/ChangeLog	2020-06-16 15:19:10 UTC (rev 263093)
@@ -1,3 +1,15 @@
+2020-06-16  Truitt Savell  <[email protected]>
+
+        Unreviewed, reverting r263079.
+
+        Broke Internal builds.
+
+        Reverted changeset:
+
+        "IndexedDB: Support IDBFactory databases method"
+        https://bugs.webkit.org/show_bug.cgi?id=211043
+        https://trac.webkit.org/changeset/263079
+
 2020-06-16  Darryl Pogue  <[email protected]>
 
         IndexedDB: Support IDBFactory databases method

Modified: trunk/Source/WebKitLegacy/Storage/InProcessIDBServer.cpp (263092 => 263093)


--- trunk/Source/WebKitLegacy/Storage/InProcessIDBServer.cpp	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKitLegacy/Storage/InProcessIDBServer.cpp	2020-06-16 15:19:10 UTC (rev 263093)
@@ -476,18 +476,18 @@
     });
 }
 
-void InProcessIDBServer::getAllDatabaseNamesAndVersions(const WebCore::IDBResourceIdentifier& requestIdentifier, const ClientOrigin& origin)
+void InProcessIDBServer::getAllDatabaseNames(const SecurityOriginData& mainFrameOrigin, const SecurityOriginData& openingOrigin, uint64_t callbackID)
 {
-    dispatchTask([this, protectedThis = makeRef(*this), identifier = m_connectionToServer->identifier(), requestIdentifier, origin = origin.isolatedCopy()] {
+    dispatchTask([this, protectedThis = makeRef(*this), identifier = m_connectionToServer->identifier(), mainFrameOrigin = mainFrameOrigin.isolatedCopy(), openingOrigin = openingOrigin.isolatedCopy(), callbackID] {
         LockHolder locker(m_server->lock());
-        m_server->getAllDatabaseNamesAndVersions(identifier, requestIdentifier, origin);
+        m_server->getAllDatabaseNames(identifier, mainFrameOrigin, openingOrigin, callbackID);
     });
 }
 
-void InProcessIDBServer::didGetAllDatabaseNamesAndVersions(const WebCore::IDBResourceIdentifier& requestIdentifier, const Vector<WebCore::IDBDatabaseNameAndVersion>& databases)
+void InProcessIDBServer::didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames)
 {
-    dispatchTaskReply([this, protectedThis = makeRef(*this), requestIdentifier, databases = databases.isolatedCopy()]() mutable {
-        m_connectionToServer->didGetAllDatabaseNamesAndVersions(requestIdentifier, WTFMove(databases));
+    dispatchTaskReply([this, protectedThis = makeRef(*this), callbackID, databaseNames = databaseNames.isolatedCopy()] {
+        m_connectionToServer->didGetAllDatabaseNames(callbackID, databaseNames);
     });
 }
 

Modified: trunk/Source/WebKitLegacy/Storage/InProcessIDBServer.h (263092 => 263093)


--- trunk/Source/WebKitLegacy/Storage/InProcessIDBServer.h	2020-06-16 15:12:32 UTC (rev 263092)
+++ trunk/Source/WebKitLegacy/Storage/InProcessIDBServer.h	2020-06-16 15:19:10 UTC (rev 263093)
@@ -90,7 +90,7 @@
     void abortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier& transactionIdentifier) final;
     void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier& requestIdentifier, const WebCore::IndexedDB::ConnectionClosedOnBehalfOfServer) final;
     void openDBRequestCancelled(const WebCore::IDBRequestData&) final;
-    void getAllDatabaseNamesAndVersions(const WebCore::IDBResourceIdentifier&, const WebCore::ClientOrigin&) final;
+    void getAllDatabaseNames(const WebCore::SecurityOriginData& mainFrameOrigin, const WebCore::SecurityOriginData& openingOrigin, uint64_t callbackID) final;
 
     // IDBConnectionToClient
     WebCore::IDBConnectionIdentifier identifier() const final;
@@ -116,7 +116,7 @@
     void didStartTransaction(const WebCore::IDBResourceIdentifier& transactionIdentifier, const WebCore::IDBError&) final;
     void didCloseFromServer(WebCore::IDBServer::UniqueIDBDatabaseConnection&, const WebCore::IDBError&) final;
     void notifyOpenDBRequestBlocked(const WebCore::IDBResourceIdentifier& requestIdentifier, uint64_t oldVersion, uint64_t newVersion) final;
-    void didGetAllDatabaseNamesAndVersions(const WebCore::IDBResourceIdentifier&, const Vector<WebCore::IDBDatabaseNameAndVersion>&) final;
+    void didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames) final;
 
     void closeAndDeleteDatabasesModifiedSince(WallTime);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to