2010-11-11 Hans Wennborg <hans@chromium.org>
authorhans@chromium.org <hans@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Nov 2010 17:35:26 +0000 (17:35 +0000)
committerhans@chromium.org <hans@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Nov 2010 17:35:26 +0000 (17:35 +0000)
        Reviewed by Jeremy Orlow.

        IndexedDB: signal IDBFactoryBackendInterface destruction to embedder
        https://bugs.webkit.org/show_bug.cgi?id=49313

        Implement ChromiumBridge::idbShutdown(), passing through to the
        WebKitClient.

        * public/WebKitClient.h:
        (WebKit::WebKitClient::idbShutdown):
        * src/ChromiumBridge.cpp:
        (WebCore::ChromiumBridge::idbShutdown):
2010-11-11  Hans Wennborg  <hans@chromium.org>

        Reviewed by Jeremy Orlow.

        IndexedDB: signal IDBFactoryBackendInterface destruction to embedder
        https://bugs.webkit.org/show_bug.cgi?id=49313

        Define IDBFactoryBackendInterface destructor out-of-line to allow
        for embedder-specific implementation. For Chromium, have the
        destructor call ChromiumBridge::idbShutdown().

        * platform/chromium/ChromiumBridge.h:
        * storage/IDBFactoryBackendInterface.cpp:
        (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
        * storage/IDBFactoryBackendInterface.h:
        * storage/chromium/IDBFactoryBackendInterface.cpp:
        (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71829 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/chromium/ChromiumBridge.h
WebCore/storage/IDBFactoryBackendInterface.cpp
WebCore/storage/IDBFactoryBackendInterface.h
WebCore/storage/chromium/IDBFactoryBackendInterface.cpp
WebKit/chromium/ChangeLog
WebKit/chromium/public/WebKitClient.h
WebKit/chromium/src/ChromiumBridge.cpp

index 167dcd5..3435d5b 100644 (file)
@@ -1,3 +1,21 @@
+2010-11-11  Hans Wennborg  <hans@chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        IndexedDB: signal IDBFactoryBackendInterface destruction to embedder
+        https://bugs.webkit.org/show_bug.cgi?id=49313
+
+        Define IDBFactoryBackendInterface destructor out-of-line to allow
+        for embedder-specific implementation. For Chromium, have the
+        destructor call ChromiumBridge::idbShutdown().
+
+        * platform/chromium/ChromiumBridge.h:
+        * storage/IDBFactoryBackendInterface.cpp:
+        (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
+        * storage/IDBFactoryBackendInterface.h:
+        * storage/chromium/IDBFactoryBackendInterface.cpp:
+        (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
+
 2010-11-11  Dirk Schulze  <krit@webkit.org>
 
         Reviewed by Nikolas Zimmermann.
index 55a4ce0..fff7f69 100644 (file)
@@ -171,6 +171,7 @@ namespace WebCore {
 
         // IndexedDB ----------------------------------------------------------
         static PassRefPtr<IDBFactoryBackendInterface> idbFactory();
+        static void idbShutdown();
         // Extracts keyPath from values and returns the corresponding keys.
         static void createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue> >& values, const String& keyPath, Vector<RefPtr<IDBKey> >& keys);
 
index f1c0fb7..935ccac 100644 (file)
@@ -43,7 +43,10 @@ PassRefPtr<IDBFactoryBackendInterface> IDBFactoryBackendInterface::create()
     return IDBFactoryBackendImpl::create();
 }
 
+IDBFactoryBackendInterface::~IDBFactoryBackendInterface()
+{
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
-
index 7d922c3..445f9e9 100644 (file)
@@ -49,7 +49,7 @@ class SecurityOrigin;
 class IDBFactoryBackendInterface : public ThreadSafeShared<IDBFactoryBackendInterface> {
 public:
     static PassRefPtr<IDBFactoryBackendInterface> create();
-    virtual ~IDBFactoryBackendInterface() { }
+    virtual ~IDBFactoryBackendInterface();
 
     virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir, int64_t maximumSize) = 0;
 };
@@ -59,4 +59,3 @@ public:
 #endif
 
 #endif // IDBFactoryBackendInterface_h
-
index 016cab0..c0fb444 100644 (file)
@@ -39,7 +39,11 @@ PassRefPtr<IDBFactoryBackendInterface> IDBFactoryBackendInterface::create()
     return ChromiumBridge::idbFactory();
 }
 
+IDBFactoryBackendInterface::~IDBFactoryBackendInterface()
+{
+    ChromiumBridge::idbShutdown();
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
-
index bf07f67..6310746 100644 (file)
@@ -1,3 +1,18 @@
+2010-11-11  Hans Wennborg  <hans@chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        IndexedDB: signal IDBFactoryBackendInterface destruction to embedder
+        https://bugs.webkit.org/show_bug.cgi?id=49313
+
+        Implement ChromiumBridge::idbShutdown(), passing through to the
+        WebKitClient.
+
+        * public/WebKitClient.h:
+        (WebKit::WebKitClient::idbShutdown):
+        * src/ChromiumBridge.cpp:
+        (WebCore::ChromiumBridge::idbShutdown):
+
 2010-11-10  Kenneth Russell  <kbr@google.com>
 
         Reviewed by James Robinson.
index 09c79c5..7ced7ad 100644 (file)
@@ -141,6 +141,7 @@ public:
     // Indexed Database ----------------------------------------------------
 
     virtual WebIDBFactory* idbFactory() { return 0; }
+    virtual void idbShutdown() { };
     virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values,  const WebString& keyPath, WebVector<WebIDBKey>& keys) { }
 
 
index 39d2566..074c982 100644 (file)
@@ -514,6 +514,12 @@ PassRefPtr<IDBFactoryBackendInterface> ChromiumBridge::idbFactory()
     return IDBFactoryBackendProxy::create();
 }
 
+void ChromiumBridge::idbShutdown()
+{
+    // In the browser process, this shuts down the utility process. In the renderer process, it does nothing.
+    webKitClient()->idbShutdown();
+}
+
 void ChromiumBridge::createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue> >& values, const String& keyPath, Vector<RefPtr<IDBKey> >& keys)
 {
     WebVector<WebSerializedScriptValue> webValues = values;