Unreviewed, rolling out r140602.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2013 03:08:59 +0000 (03:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2013 03:08:59 +0000 (03:08 +0000)
http://trac.webkit.org/changeset/140602
https://bugs.webkit.org/show_bug.cgi?id=108045

Caused 8 indexed tests to crash. (Requested by keishi on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-27

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* Modules/indexeddb/IDBCallbacks.h:
(WebCore::IDBCallbacks::onBlocked):
* Modules/indexeddb/IDBDatabase.cpp:
* Modules/indexeddb/IDBDatabase.h:
(WebCore):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::deleteDatabase):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBFactory.h:
(WebCore):
(IDBFactory):
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::create):
(WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
(WebCore::IDBOpenDBRequest::dispatchEvent):
* Modules/indexeddb/IDBOpenDBRequest.h:
(IDBOpenDBRequest):
* Modules/indexeddb/IDBVersionChangeRequest.cpp: Copied from Source/WebKit/chromium/src/WebIDBCallbacksImpl.h.
(WebCore):
(WebCore::IDBVersionChangeRequest::create):
(WebCore::IDBVersionChangeRequest::IDBVersionChangeRequest):
(WebCore::IDBVersionChangeRequest::~IDBVersionChangeRequest):
(WebCore::IDBVersionChangeRequest::interfaceName):
(WebCore::IDBVersionChangeRequest::onBlocked):
* Modules/indexeddb/IDBVersionChangeRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.idl.
(WebCore):
(IDBVersionChangeRequest):
* Modules/indexeddb/IDBVersionChangeRequest.idl: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.idl.
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* dom/EventTarget.h:
(WebCore):
* dom/EventTargetFactory.in:

Source/WebKit/chromium:

* public/WebIDBCallbacks.h:
* src/IDBCallbacksProxy.cpp:
(WebKit::IDBCallbacksProxy::onBlocked):
(WebKit):
* src/IDBCallbacksProxy.h:
(IDBCallbacksProxy):
* src/WebIDBCallbacksImpl.cpp:
(WebKit::WebIDBCallbacksImpl::onBlocked):
(WebKit):
* src/WebIDBCallbacksImpl.h:
(WebIDBCallbacksImpl):
* tests/IDBAbortOnCorruptTest.cpp:
(WebCore::MockIDBCallbacks::onBlocked):
* tests/IDBDatabaseBackendTest.cpp:

LayoutTests:

* storage/indexeddb/intversion-long-queue-expected.txt:
* storage/indexeddb/intversion-upgrades-expected.txt:

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

31 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/intversion-long-queue-expected.txt
LayoutTests/storage/indexeddb/intversion-upgrades-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/indexeddb/IDBCallbacks.h
Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
Source/WebCore/Modules/indexeddb/IDBDatabase.h
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp
Source/WebCore/Modules/indexeddb/IDBFactory.cpp
Source/WebCore/Modules/indexeddb/IDBFactory.h
Source/WebCore/Modules/indexeddb/IDBFactory.idl
Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp
Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h
Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.cpp [new file with mode: 0644]
Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.h [new file with mode: 0644]
Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.idl [new file with mode: 0644]
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/EventTarget.h
Source/WebCore/dom/EventTargetFactory.in
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebIDBCallbacks.h
Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
Source/WebKit/chromium/src/IDBCallbacksProxy.h
Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
Source/WebKit/chromium/src/WebIDBCallbacksImpl.h
Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
Source/WebKit/chromium/tests/IDBDatabaseBackendTest.cpp

index fb51afb..fb79b61 100644 (file)
@@ -1,3 +1,15 @@
+2013-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r140602.
+        http://trac.webkit.org/changeset/140602
+        https://bugs.webkit.org/show_bug.cgi?id=108045
+
+        Caused 8 indexed tests to crash. (Requested by keishi on
+        #webkit).
+
+        * storage/indexeddb/intversion-long-queue-expected.txt:
+        * storage/indexeddb/intversion-upgrades-expected.txt:
+
 2013-01-27  Shinya Kawanaka  <shinyak@chromium.org>
 
         Disabled input/textarea doesn't trigger selection change
index 436be15..bbb60cd 100644 (file)
@@ -38,9 +38,9 @@ connection1.close()
 
 deleteDatabaseBlockedCallback():
 FIXME: http://crbug.com/153122
-PASS event.oldVersion is 1
-FAIL event.newVersion should be null (of type object). Was 0 (of type number).
-PASS event.version is undefined.
+FAIL event.oldVersion should be 1 (of type number). Was undefined (of type undefined).
+FAIL event.newVersion should be null (of type object). Was undefined (of type undefined).
+FAIL event.version should be undefined. Was 
 
 deleteDatabaseSuccessCallback():
 PASS event.target.result is undefined.
index 5d7ef16..54a399e 100644 (file)
@@ -7,7 +7,7 @@ indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
 
 dbname = "intversion-upgrades.html"
 indexedDB.deleteDatabase(dbname)
-PASS String(request) is "[object IDBOpenDBRequest]"
+FAIL String(request) should be [object IDBOpenDBRequest]. Was [object IDBVersionChangeRequest].
 
 Call open with no version parameter:
 indexedDB.open(dbname)
index ea590bd..46a76dc 100644 (file)
@@ -199,6 +199,7 @@ set(WebCore_IDL_FILES
     Modules/indexeddb/IDBTransaction.idl
     Modules/indexeddb/IDBUpgradeNeededEvent.idl
     Modules/indexeddb/IDBVersionChangeEvent.idl
+    Modules/indexeddb/IDBVersionChangeRequest.idl
     Modules/indexeddb/WorkerContextIndexedDatabase.idl
 
     Modules/intents/DeliveredIntent.idl
@@ -843,6 +844,7 @@ set(WebCore_SOURCES
     Modules/indexeddb/IDBTransactionCoordinator.cpp
     Modules/indexeddb/IDBUpgradeNeededEvent.cpp
     Modules/indexeddb/IDBVersionChangeEvent.cpp
+    Modules/indexeddb/IDBVersionChangeRequest.cpp
     Modules/indexeddb/PageGroupIndexedDatabase.cpp
     Modules/indexeddb/WorkerContextIndexedDatabase.cpp
 
index 083ab98..129a8ea 100644 (file)
@@ -1,3 +1,52 @@
+2013-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r140602.
+        http://trac.webkit.org/changeset/140602
+        https://bugs.webkit.org/show_bug.cgi?id=108045
+
+        Caused 8 indexed tests to crash. (Requested by keishi on
+        #webkit).
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * GNUmakefile.list.am:
+        * Modules/indexeddb/IDBCallbacks.h:
+        (WebCore::IDBCallbacks::onBlocked):
+        * Modules/indexeddb/IDBDatabase.cpp:
+        * Modules/indexeddb/IDBDatabase.h:
+        (WebCore):
+        * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
+        (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
+        * Modules/indexeddb/IDBFactory.cpp:
+        (WebCore::IDBFactory::openInternal):
+        (WebCore::IDBFactory::deleteDatabase):
+        * Modules/indexeddb/IDBFactory.h:
+        (WebCore):
+        (IDBFactory):
+        * Modules/indexeddb/IDBFactory.idl:
+        * Modules/indexeddb/IDBOpenDBRequest.cpp:
+        (WebCore::IDBOpenDBRequest::create):
+        (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
+        (WebCore::IDBOpenDBRequest::dispatchEvent):
+        * Modules/indexeddb/IDBOpenDBRequest.h:
+        (IDBOpenDBRequest):
+        * Modules/indexeddb/IDBVersionChangeRequest.cpp: Copied from Source/WebKit/chromium/src/WebIDBCallbacksImpl.h.
+        (WebCore):
+        (WebCore::IDBVersionChangeRequest::create):
+        (WebCore::IDBVersionChangeRequest::IDBVersionChangeRequest):
+        (WebCore::IDBVersionChangeRequest::~IDBVersionChangeRequest):
+        (WebCore::IDBVersionChangeRequest::interfaceName):
+        (WebCore::IDBVersionChangeRequest::onBlocked):
+        * Modules/indexeddb/IDBVersionChangeRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.idl.
+        (WebCore):
+        (IDBVersionChangeRequest):
+        * Modules/indexeddb/IDBVersionChangeRequest.idl: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.idl.
+        * WebCore.gypi:
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/EventTarget.h:
+        (WebCore):
+        * dom/EventTargetFactory.in:
+
 2013-01-27  Shinya Kawanaka  <shinyak@chromium.org>
 
         Disabled input/textarea doesn't trigger selection change
index 67e7b0b..3826a27 100644 (file)
@@ -103,6 +103,7 @@ BINDING_IDLS = \
     $(WebCore)/Modules/indexeddb/IDBRequest.idl \
     $(WebCore)/Modules/indexeddb/IDBTransaction.idl \
     $(WebCore)/Modules/indexeddb/IDBVersionChangeEvent.idl \
+    $(WebCore)/Modules/indexeddb/IDBVersionChangeRequest.idl \
     $(WebCore)/Modules/indexeddb/WorkerContextIndexedDatabase.idl \
     $(WebCore)/Modules/mediasource/MediaSource.idl \
     $(WebCore)/Modules/mediasource/SourceBuffer.idl \
index a536864..5fcfa98 100644 (file)
@@ -479,6 +479,8 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSIDBVersionChangeEvent.h \
        DerivedSources/WebCore/JSIDBUpgradeNeededEvent.cpp \
        DerivedSources/WebCore/JSIDBUpgradeNeededEvent.h \
+       DerivedSources/WebCore/JSIDBVersionChangeRequest.cpp \
+       DerivedSources/WebCore/JSIDBVersionChangeRequest.h \
        DerivedSources/WebCore/JSImageData.cpp \
        DerivedSources/WebCore/JSImageData.h \
        DerivedSources/WebCore/JSInjectedScriptHost.cpp \
@@ -1235,6 +1237,7 @@ dom_binding_idls += \
        $(WebCore)/Modules/indexeddb/IDBUpgradeNeededEvent.idl \
        $(WebCore)/Modules/indexeddb/IDBVersionChangeEvent.idl \
        $(WebCore)/Modules/indexeddb/IDBUpgradeNeededEvent.idl \
+       $(WebCore)/Modules/indexeddb/IDBVersionChangeRequest.idl \
        $(WebCore)/Modules/indexeddb/WorkerContextIndexedDatabase.idl \
        $(WebCore)/Modules/mediasource/MediaSource.idl \
        $(WebCore)/Modules/mediasource/SourceBuffer.idl \
@@ -1916,6 +1919,8 @@ webcore_modules_sources += \
        Source/WebCore/Modules/indexeddb/IDBUpgradeNeededEvent.h \
        Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp \
        Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h \
+       Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.cpp \
+       Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.h \
        Source/WebCore/Modules/indexeddb/PageGroupIndexedDatabase.cpp \
        Source/WebCore/Modules/indexeddb/PageGroupIndexedDatabase.h \
        Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.cpp \
index 5b3860b..f8d3ce4 100644 (file)
@@ -69,6 +69,7 @@ public:
     // From IDBCursor.advance()/continue()
     virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >& keys, const Vector<RefPtr<IDBKey> >& primaryKeys, const Vector<RefPtr<SerializedScriptValue> >& values) = 0;
     // From IDBFactory.open()/deleteDatabase()
+    virtual void onBlocked() { ASSERT_NOT_REACHED(); }
     virtual void onBlocked(int64_t existingVersion) { ASSERT_NOT_REACHED(); }
     // From IDBFactory.open()
     virtual void onUpgradeNeeded(int64_t oldVersion, PassRefPtr<IDBTransactionBackendInterface>, PassRefPtr<IDBDatabaseBackendInterface>) { ASSERT_NOT_REACHED(); }
index 93a9b13..6d90c82 100644 (file)
@@ -43,6 +43,7 @@
 #include "IDBTransaction.h"
 #include "IDBUpgradeNeededEvent.h"
 #include "IDBVersionChangeEvent.h"
+#include "IDBVersionChangeRequest.h"
 #include "ScriptCallStack.h"
 #include "ScriptExecutionContext.h"
 #include <limits>
index 9e56507..f99b5e4 100644 (file)
@@ -45,6 +45,7 @@
 
 namespace WebCore {
 
+class IDBVersionChangeRequest;
 class ScriptExecutionContext;
 
 typedef int ExceptionCode;
index 6d6099c..3f8348c 100644 (file)
@@ -1278,7 +1278,7 @@ void IDBDatabaseBackendImpl::deleteDatabase(PassRefPtr<IDBCallbacks> prpCallback
         // FIXME: Only fire onBlocked if there are open connections after the
         // VersionChangeEvents are received, not just set up to fire.
         // https://bugs.webkit.org/show_bug.cgi?id=71130
-        callbacks->onBlocked(m_metadata.intVersion);
+        callbacks->onBlocked();
         m_pendingDeleteCalls.append(PendingDeleteCall::create(callbacks.release()));
         return;
     }
index ec89781..4de03ef 100644 (file)
@@ -43,6 +43,7 @@
 #include "IDBKey.h"
 #include "IDBKeyRange.h"
 #include "IDBOpenDBRequest.h"
+#include "IDBVersionChangeRequest.h"
 #include "Page.h"
 #include "PageGroup.h"
 #include "SecurityOrigin.h"
@@ -128,7 +129,7 @@ PassRefPtr<IDBOpenDBRequest> IDBFactory::openInternal(ScriptExecutionContext* co
 
     RefPtr<IDBDatabaseCallbacksImpl> databaseCallbacks = IDBDatabaseCallbacksImpl::create();
     int64_t transactionId = IDBDatabase::nextTransactionId();
-    RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(context, databaseCallbacks, transactionId, version);
+    RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(context, IDBAny::createNull(), databaseCallbacks, transactionId, version);
     m_backend->open(name, version, transactionId, request, databaseCallbacks, context->securityOrigin(), context, getIndexedDBDatabasePath(context));
     return request;
 }
@@ -138,7 +139,7 @@ PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, c
     return openInternal(context, name, IDBDatabaseMetadata::NoIntVersion, ec);
 }
 
-PassRefPtr<IDBOpenDBRequest> IDBFactory::deleteDatabase(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
+PassRefPtr<IDBVersionChangeRequest> IDBFactory::deleteDatabase(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
 {
     if (name.isNull()) {
         ec = TypeError;
@@ -147,7 +148,7 @@ PassRefPtr<IDBOpenDBRequest> IDBFactory::deleteDatabase(ScriptExecutionContext*
     if (!isContextValid(context))
         return 0;
 
-    RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(context, 0, 0, 0);
+    RefPtr<IDBVersionChangeRequest> request = IDBVersionChangeRequest::create(context, IDBAny::createNull(), "");
     m_backend->deleteDatabase(name, request, context->securityOrigin(), context, getIndexedDBDatabasePath(context));
     return request;
 }
index c41365d..5234597 100644 (file)
@@ -43,6 +43,7 @@ namespace WebCore {
 class IDBKey;
 class IDBKeyRange;
 class IDBFactoryBackendInterface;
+class IDBVersionChangeRequest;
 class ScriptExecutionContext;
 
 typedef int ExceptionCode;
@@ -59,7 +60,7 @@ public:
 
     PassRefPtr<IDBOpenDBRequest> open(ScriptExecutionContext*, const String& name, ExceptionCode&);
     PassRefPtr<IDBOpenDBRequest> open(ScriptExecutionContext*, const String& name, int64_t version, ExceptionCode&);
-    PassRefPtr<IDBOpenDBRequest> deleteDatabase(ScriptExecutionContext*, const String& name, ExceptionCode&);
+    PassRefPtr<IDBVersionChangeRequest> deleteDatabase(ScriptExecutionContext*, const String& name, ExceptionCode&);
 
     short cmp(ScriptExecutionContext*, const ScriptValue& first, const ScriptValue& second, ExceptionCode&);
 
index e3a4c19..75f7124 100644 (file)
@@ -32,7 +32,7 @@
     // FIXME: Make this [EnforceRange] unsigned long long once webkit.org/b/96798 lands.
     [CallWith=ScriptExecutionContext] IDBOpenDBRequest open(in DOMString name, in [Optional] long long version)
         raises (DOMException);
-    [CallWith=ScriptExecutionContext] IDBOpenDBRequest deleteDatabase(in DOMString name)
+    [CallWith=ScriptExecutionContext] IDBVersionChangeRequest deleteDatabase(in DOMString name)
         raises (DOMException);
 
     [CallWith=ScriptExecutionContext] short cmp(in any first, in any second)
index 9c06a72..528726c 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<IDBOpenDBRequest> IDBOpenDBRequest::create(ScriptExecutionContext* context, PassRefPtr<IDBDatabaseCallbacksImpl> callbacks, int64_t transactionId, int64_t version)
+PassRefPtr<IDBOpenDBRequest> IDBOpenDBRequest::create(ScriptExecutionContext* context, PassRefPtr<IDBAny> source, PassRefPtr<IDBDatabaseCallbacksImpl> callbacks, int64_t transactionId, int64_t version)
 {
-    RefPtr<IDBOpenDBRequest> request(adoptRef(new IDBOpenDBRequest(context, callbacks, transactionId, version)));
+    RefPtr<IDBOpenDBRequest> request(adoptRef(new IDBOpenDBRequest(context, source, callbacks, transactionId, version)));
     request->suspendIfNeeded();
     return request.release();
 }
 
-IDBOpenDBRequest::IDBOpenDBRequest(ScriptExecutionContext* context, PassRefPtr<IDBDatabaseCallbacksImpl> callbacks, int64_t transactionId, int64_t version)
-    : IDBRequest(context, IDBAny::createNull(), IDBTransactionBackendInterface::NormalTask, 0)
+IDBOpenDBRequest::IDBOpenDBRequest(ScriptExecutionContext* context, PassRefPtr<IDBAny> source, PassRefPtr<IDBDatabaseCallbacksImpl> callbacks, int64_t transactionId, int64_t version)
+    : IDBRequest(context, source, IDBTransactionBackendInterface::NormalTask, 0)
     , m_databaseCallbacks(callbacks)
     , m_transactionId(transactionId)
     , m_version(version)
@@ -147,7 +147,7 @@ bool IDBOpenDBRequest::dispatchEvent(PassRefPtr<Event> event)
 {
     // If the connection closed between onUpgradeNeeded and the delivery of the "success" event,
     // an "error" event should be fired instead.
-    if (event->type() == eventNames().successEvent && m_result->type() == IDBAny::IDBDatabaseType && m_result->idbDatabase()->isClosePending()) {
+    if (event->type() == eventNames().successEvent && m_result->idbDatabase()->isClosePending()) {
         m_result.clear();
         onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, "The connection was closed."));
         return false;
index 8bc0896..404f914 100644 (file)
@@ -36,7 +36,7 @@ class IDBDatabaseCallbacksImpl;
 
 class IDBOpenDBRequest : public IDBRequest {
 public:
-    static PassRefPtr<IDBOpenDBRequest> create(ScriptExecutionContext*, PassRefPtr<IDBDatabaseCallbacksImpl>, int64_t transactionId, int64_t version);
+    static PassRefPtr<IDBOpenDBRequest> create(ScriptExecutionContext*, PassRefPtr<IDBAny> source, PassRefPtr<IDBDatabaseCallbacksImpl>, int64_t transactionId, int64_t version);
     virtual ~IDBOpenDBRequest();
 
     using IDBRequest::onSuccess;
@@ -56,7 +56,7 @@ protected:
     virtual bool shouldEnqueueEvent() const OVERRIDE;
 
 private:
-    IDBOpenDBRequest(ScriptExecutionContext*, PassRefPtr<IDBDatabaseCallbacksImpl>, int64_t transactionId, int64_t version);
+    IDBOpenDBRequest(ScriptExecutionContext*, PassRefPtr<IDBAny> source, PassRefPtr<IDBDatabaseCallbacksImpl>, int64_t transactionId, int64_t version);
 
     RefPtr<IDBDatabaseCallbacksImpl> m_databaseCallbacks;
     const int64_t m_transactionId;
diff --git a/Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.cpp b/Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.cpp
new file mode 100644 (file)
index 0000000..92f4ef1
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * 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 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 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 "IDBVersionChangeRequest.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBVersionChangeEvent.h"
+#include "ScriptExecutionContext.h"
+
+namespace WebCore {
+
+PassRefPtr<IDBVersionChangeRequest> IDBVersionChangeRequest::create(ScriptExecutionContext* context, PassRefPtr<IDBAny> source, const String& version)
+{
+    RefPtr<IDBVersionChangeRequest> request(adoptRef(new IDBVersionChangeRequest(context, source, version)));
+    request->suspendIfNeeded();
+    return request.release();
+
+}
+
+IDBVersionChangeRequest::IDBVersionChangeRequest(ScriptExecutionContext* context, PassRefPtr<IDBAny> source, const String& version)
+    : IDBRequest(context, source, IDBTransactionBackendInterface::NormalTask, 0)
+    , m_version(version)
+{
+}
+
+IDBVersionChangeRequest::~IDBVersionChangeRequest()
+{
+}
+
+const AtomicString& IDBVersionChangeRequest::interfaceName() const
+{
+    return eventNames().interfaceForIDBVersionChangeRequest;
+}
+
+void IDBVersionChangeRequest::onBlocked()
+{
+    if (!shouldEnqueueEvent())
+        return;
+    ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_result);
+    enqueueEvent(IDBVersionChangeEvent::create(m_version, eventNames().blockedEvent));
+}
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.h b/Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.h
new file mode 100644 (file)
index 0000000..ce284e9
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * 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 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 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.
+ */
+
+#ifndef IDBVersionChangeRequest_h
+#define IDBVersionChangeRequest_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBRequest.h"
+
+namespace WebCore {
+
+class IDBVersionChangeRequest : public IDBRequest {
+public:
+    static PassRefPtr<IDBVersionChangeRequest> create(ScriptExecutionContext*, PassRefPtr<IDBAny> source, const String& version);
+    virtual ~IDBVersionChangeRequest();
+
+    virtual void onBlocked();
+
+    // EventTarget
+    virtual const AtomicString& interfaceName() const;
+
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked);
+
+private:
+    IDBVersionChangeRequest(ScriptExecutionContext*, PassRefPtr<IDBAny> source, const String& version);
+
+    String m_version;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // IDBRequest_h
diff --git a/Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.idl b/Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.idl
new file mode 100644 (file)
index 0000000..d7e11b9
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * 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 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 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.
+ */
+
+[
+    Conditional=INDEXED_DATABASE,
+    ActiveDOMObject,
+    EventTarget,
+    JSNoStaticTables,
+    JSGenerateToJSObject
+] interface IDBVersionChangeRequest : IDBRequest {
+    attribute EventListener onblocked;
+};
index 64d5636..d54e8da 100644 (file)
@@ -53,6 +53,7 @@
             'Modules/indexeddb/IDBTransaction.idl',
             'Modules/indexeddb/IDBUpgradeNeededEvent.idl',
             'Modules/indexeddb/IDBVersionChangeEvent.idl',
+            'Modules/indexeddb/IDBVersionChangeRequest.idl',
             'Modules/indexeddb/WorkerContextIndexedDatabase.idl',
             'Modules/intents/DeliveredIntent.idl',
             'Modules/intents/DOMWindowIntents.idl',
             'Modules/indexeddb/IDBUpgradeNeededEvent.h',
             'Modules/indexeddb/IDBVersionChangeEvent.cpp',
             'Modules/indexeddb/IDBVersionChangeEvent.h',
+            'Modules/indexeddb/IDBVersionChangeRequest.cpp',
+            'Modules/indexeddb/IDBVersionChangeRequest.h',
             'Modules/indexeddb/PageGroupIndexedDatabase.cpp',
             'Modules/indexeddb/PageGroupIndexedDatabase.h',
             'Modules/indexeddb/WorkerContextIndexedDatabase.cpp',
index e12edee..47d3a0b 100644 (file)
                265541521489B233000DFC5D /* CursorIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2655414B1489AA2B000DFC5D /* CursorIOS.cpp */; };
                269239951505E1AA009E57FC /* JSIDBVersionChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 269239911505E1AA009E57FC /* JSIDBVersionChangeEvent.cpp */; };
                269239961505E1AA009E57FC /* JSIDBVersionChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 269239921505E1AA009E57FC /* JSIDBVersionChangeEvent.h */; };
+               269239971505E1AA009E57FC /* JSIDBVersionChangeRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 269239931505E1AA009E57FC /* JSIDBVersionChangeRequest.cpp */; };
+               269239981505E1AA009E57FC /* JSIDBVersionChangeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 269239941505E1AA009E57FC /* JSIDBVersionChangeRequest.h */; };
                26A5034E14F0983600AA730D /* KURLWTFURLImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 26A5034D14F0983600AA730D /* KURLWTFURLImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
                26A5035A14F0A2BC00AA730D /* KURLWTFURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A5035914F0A2BC00AA730D /* KURLWTFURL.cpp */; };
                26C17A3E1491D2D400D12BA2 /* FileSystemIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 26C17A3C1491D2D400D12BA2 /* FileSystemIOS.h */; };
                9712A5FD15004EDA0048AF10 /* IDBTransactionCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 9712A5A415004EDA0048AF10 /* IDBTransactionCoordinator.h */; };
                9712A5FE15004EDA0048AF10 /* IDBVersionChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9712A5A515004EDA0048AF10 /* IDBVersionChangeEvent.cpp */; };
                9712A5FF15004EDA0048AF10 /* IDBVersionChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 9712A5A615004EDA0048AF10 /* IDBVersionChangeEvent.h */; };
+               9712A60115004EDA0048AF10 /* IDBVersionChangeRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9712A5A815004EDA0048AF10 /* IDBVersionChangeRequest.cpp */; };
+               9712A60215004EDA0048AF10 /* IDBVersionChangeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 9712A5A915004EDA0048AF10 /* IDBVersionChangeRequest.h */; };
                9712A60415004EDA0048AF10 /* PageGroupIndexedDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9712A5AB15004EDA0048AF10 /* PageGroupIndexedDatabase.cpp */; };
                9712A60515004EDA0048AF10 /* PageGroupIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 9712A5AC15004EDA0048AF10 /* PageGroupIndexedDatabase.h */; };
                9712A611150090CE0048AF10 /* WorkerContextIndexedDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9712A60E150090CE0048AF10 /* WorkerContextIndexedDatabase.cpp */; };
                2655414B1489AA2B000DFC5D /* CursorIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CursorIOS.cpp; path = ios/CursorIOS.cpp; sourceTree = "<group>"; };
                269239911505E1AA009E57FC /* JSIDBVersionChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBVersionChangeEvent.cpp; sourceTree = "<group>"; };
                269239921505E1AA009E57FC /* JSIDBVersionChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIDBVersionChangeEvent.h; sourceTree = "<group>"; };
+               269239931505E1AA009E57FC /* JSIDBVersionChangeRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBVersionChangeRequest.cpp; sourceTree = "<group>"; };
+               269239941505E1AA009E57FC /* JSIDBVersionChangeRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIDBVersionChangeRequest.h; sourceTree = "<group>"; };
                26A5034D14F0983600AA730D /* KURLWTFURLImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KURLWTFURLImpl.h; sourceTree = "<group>"; };
                26A5035914F0A2BC00AA730D /* KURLWTFURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KURLWTFURL.cpp; sourceTree = "<group>"; };
                26C17A3C1491D2D400D12BA2 /* FileSystemIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSystemIOS.h; path = ios/FileSystemIOS.h; sourceTree = "<group>"; };
                9712A5A515004EDA0048AF10 /* IDBVersionChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IDBVersionChangeEvent.cpp; path = Modules/indexeddb/IDBVersionChangeEvent.cpp; sourceTree = "<group>"; };
                9712A5A615004EDA0048AF10 /* IDBVersionChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IDBVersionChangeEvent.h; path = Modules/indexeddb/IDBVersionChangeEvent.h; sourceTree = "<group>"; };
                9712A5A715004EDA0048AF10 /* IDBVersionChangeEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = IDBVersionChangeEvent.idl; path = Modules/indexeddb/IDBVersionChangeEvent.idl; sourceTree = "<group>"; };
+               9712A5A815004EDA0048AF10 /* IDBVersionChangeRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IDBVersionChangeRequest.cpp; path = Modules/indexeddb/IDBVersionChangeRequest.cpp; sourceTree = "<group>"; };
+               9712A5A915004EDA0048AF10 /* IDBVersionChangeRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IDBVersionChangeRequest.h; path = Modules/indexeddb/IDBVersionChangeRequest.h; sourceTree = "<group>"; };
+               9712A5AA15004EDA0048AF10 /* IDBVersionChangeRequest.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = IDBVersionChangeRequest.idl; path = Modules/indexeddb/IDBVersionChangeRequest.idl; sourceTree = "<group>"; };
                9712A5AB15004EDA0048AF10 /* PageGroupIndexedDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PageGroupIndexedDatabase.cpp; path = Modules/indexeddb/PageGroupIndexedDatabase.cpp; sourceTree = "<group>"; };
                9712A5AC15004EDA0048AF10 /* PageGroupIndexedDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PageGroupIndexedDatabase.h; path = Modules/indexeddb/PageGroupIndexedDatabase.h; sourceTree = "<group>"; };
                9712A60E150090CE0048AF10 /* WorkerContextIndexedDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WorkerContextIndexedDatabase.cpp; path = Modules/indexeddb/WorkerContextIndexedDatabase.cpp; sourceTree = "<group>"; };
                                9712A5A515004EDA0048AF10 /* IDBVersionChangeEvent.cpp */,
                                9712A5A615004EDA0048AF10 /* IDBVersionChangeEvent.h */,
                                9712A5A715004EDA0048AF10 /* IDBVersionChangeEvent.idl */,
+                               9712A5A815004EDA0048AF10 /* IDBVersionChangeRequest.cpp */,
+                               9712A5A915004EDA0048AF10 /* IDBVersionChangeRequest.h */,
+                               9712A5AA15004EDA0048AF10 /* IDBVersionChangeRequest.idl */,
                                9712A5AB15004EDA0048AF10 /* PageGroupIndexedDatabase.cpp */,
                                9712A5AC15004EDA0048AF10 /* PageGroupIndexedDatabase.h */,
                                9712A60E150090CE0048AF10 /* WorkerContextIndexedDatabase.cpp */,
                                B656626E120B1227006EA85C /* JSIDBTransaction.h */,
                                269239911505E1AA009E57FC /* JSIDBVersionChangeEvent.cpp */,
                                269239921505E1AA009E57FC /* JSIDBVersionChangeEvent.h */,
+                               269239931505E1AA009E57FC /* JSIDBVersionChangeRequest.cpp */,
+                               269239941505E1AA009E57FC /* JSIDBVersionChangeRequest.h */,
                                514C76350CE9225E007EF3CD /* JSSQLError.cpp */,
                                BC8243250D0CE8A200460C8F /* JSSQLError.h */,
                                B525A96411CA2340003A23A8 /* JSSQLException.cpp */,
                                9712A5FB15004EDA0048AF10 /* IDBTransactionCallbacks.h in Headers */,
                                9712A5FD15004EDA0048AF10 /* IDBTransactionCoordinator.h in Headers */,
                                9712A5FF15004EDA0048AF10 /* IDBVersionChangeEvent.h in Headers */,
+                               9712A60215004EDA0048AF10 /* IDBVersionChangeRequest.h in Headers */,
                                1A71D57C0F33819000F9CE4E /* IdentifierRep.h in Headers */,
                                5913A24213D49EBA00F5B05C /* IdentifiersFactory.h in Headers */,
                                49E911C50EF86D47009D0CAF /* IdentityTransformOperation.h in Headers */,
                                C585A69111D4FB08004C3E4B /* JSIDBRequest.h in Headers */,
                                B6566270120B1227006EA85C /* JSIDBTransaction.h in Headers */,
                                269239961505E1AA009E57FC /* JSIDBVersionChangeEvent.h in Headers */,
+                               269239981505E1AA009E57FC /* JSIDBVersionChangeRequest.h in Headers */,
                                BC6C49F40D7DBA0500FFA558 /* JSImageConstructor.h in Headers */,
                                A77979290D6B9E64003851B9 /* JSImageData.h in Headers */,
                                7A0E76DB10BF059800A0276E /* JSInjectedScriptHost.h in Headers */,
                                9712A5F815004EDA0048AF10 /* IDBTransactionBackendImpl.cpp in Sources */,
                                9712A5FC15004EDA0048AF10 /* IDBTransactionCoordinator.cpp in Sources */,
                                9712A5FE15004EDA0048AF10 /* IDBVersionChangeEvent.cpp in Sources */,
+                               9712A60115004EDA0048AF10 /* IDBVersionChangeRequest.cpp in Sources */,
                                1A71D57B0F33819000F9CE4E /* IdentifierRep.cpp in Sources */,
                                5913A24113D49EBA00F5B05C /* IdentifiersFactory.cpp in Sources */,
                                C3CF17A415B0063F00276D39 /* IdTargetObserver.cpp in Sources */,
                                C585A69011D4FB08004C3E4B /* JSIDBRequest.cpp in Sources */,
                                B6566271120B1227006EA85C /* JSIDBTransaction.cpp in Sources */,
                                269239951505E1AA009E57FC /* JSIDBVersionChangeEvent.cpp in Sources */,
+                               269239971505E1AA009E57FC /* JSIDBVersionChangeRequest.cpp in Sources */,
                                BC6C49F30D7DBA0500FFA558 /* JSImageConstructor.cpp in Sources */,
                                A77979280D6B9E64003851B9 /* JSImageData.cpp in Sources */,
                                A7D0318E0E93540300E24ACD /* JSImageDataCustom.cpp in Sources */,
index 7a2e100..d4a6330 100644 (file)
@@ -52,6 +52,7 @@ namespace WebCore {
     class IDBDatabase;
     class IDBRequest;
     class IDBTransaction;
+    class IDBVersionChangeRequest;
     class ScriptProcessorNode;
     class LocalMediaStream;
     class MediaController;
index 243685a..6f99451 100644 (file)
@@ -12,6 +12,7 @@ IDBDatabase conditional=INDEXED_DATABASE
 IDBOpenDBRequest conditional=INDEXED_DATABASE
 IDBRequest conditional=INDEXED_DATABASE
 IDBTransaction conditional=INDEXED_DATABASE
+IDBVersionChangeRequest conditional=INDEXED_DATABASE
 ScriptProcessorNode conditional=WEB_AUDIO
 LocalMediaStream conditional=MEDIA_STREAM
 MediaController conditional=VIDEO
index bc16dde..fd59b44 100644 (file)
@@ -1,3 +1,27 @@
+2013-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r140602.
+        http://trac.webkit.org/changeset/140602
+        https://bugs.webkit.org/show_bug.cgi?id=108045
+
+        Caused 8 indexed tests to crash. (Requested by keishi on
+        #webkit).
+
+        * public/WebIDBCallbacks.h:
+        * src/IDBCallbacksProxy.cpp:
+        (WebKit::IDBCallbacksProxy::onBlocked):
+        (WebKit):
+        * src/IDBCallbacksProxy.h:
+        (IDBCallbacksProxy):
+        * src/WebIDBCallbacksImpl.cpp:
+        (WebKit::WebIDBCallbacksImpl::onBlocked):
+        (WebKit):
+        * src/WebIDBCallbacksImpl.h:
+        (WebIDBCallbacksImpl):
+        * tests/IDBAbortOnCorruptTest.cpp:
+        (WebCore::MockIDBCallbacks::onBlocked):
+        * tests/IDBDatabaseBackendTest.cpp:
+
 2013-01-27  Keishi Hattori  <keishi@webkit.org>
 
         Unreviewed, rolling out r140850.
index 07c2b85..44dd441 100644 (file)
@@ -57,7 +57,6 @@ public:
     virtual void onSuccess(long long) { WEBKIT_ASSERT_NOT_REACHED(); }
     virtual void onSuccess() { WEBKIT_ASSERT_NOT_REACHED(); }
     virtual void onSuccess(const WebIDBKey& key, const WebIDBKey& primaryKey, const WebSerializedScriptValue&) { WEBKIT_ASSERT_NOT_REACHED(); }
-    // FIXME: Remove the following overload once callers are updated:
     virtual void onBlocked() { WEBKIT_ASSERT_NOT_REACHED(); }
     virtual void onBlocked(long long oldVersion) { WEBKIT_ASSERT_NOT_REACHED(); }
     virtual void onSuccessWithPrefetch(const WebVector<WebIDBKey>& keys, const WebVector<WebIDBKey>& primaryKeys, const WebVector<WebSerializedScriptValue>& values) { WEBKIT_ASSERT_NOT_REACHED(); }
index f8a2451..4a6769c 100644 (file)
@@ -151,6 +151,11 @@ void IDBCallbacksProxy::onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >& key
     m_callbacks->onSuccessWithPrefetch(webKeys, webPrimaryKeys, webValues);
 }
 
+void IDBCallbacksProxy::onBlocked()
+{
+    m_callbacks->onBlocked();
+}
+
 void IDBCallbacksProxy::onBlocked(int64_t existingVersion)
 {
     m_callbacks->onBlocked(existingVersion);
index a05e14c..e69d597 100644 (file)
@@ -57,6 +57,7 @@ public:
     virtual void onSuccess();
     virtual void onSuccess(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBKey> primaryKey, PassRefPtr<WebCore::SerializedScriptValue>);
     virtual void onSuccessWithPrefetch(const Vector<RefPtr<WebCore::IDBKey> >& keys, const Vector<RefPtr<WebCore::IDBKey> >& primaryKeys, const Vector<RefPtr<WebCore::SerializedScriptValue> >& values);
+    virtual void onBlocked();
     virtual void onBlocked(int64_t existingVersion);
     virtual void onUpgradeNeeded(int64_t oldVersion, PassRefPtr<WebCore::IDBTransactionBackendInterface>, PassRefPtr<WebCore::IDBDatabaseBackendInterface>);
 
index a14ef89..a26d90a 100644 (file)
@@ -110,6 +110,11 @@ void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key, const WebIDBKey& prima
     m_callbacks->onSuccess(key, primaryKey, value);
 }
 
+void WebIDBCallbacksImpl::onBlocked()
+{
+    m_callbacks->onBlocked();
+}
+
 void WebIDBCallbacksImpl::onBlocked(long long oldVersion)
 {
     m_callbacks->onBlocked(oldVersion);
index 4b9f0f8..4b10649 100644 (file)
@@ -56,6 +56,7 @@ public:
     virtual void onSuccess(const WebIDBKey&, const WebIDBKey& primaryKey, const WebSerializedScriptValue&);
     virtual void onSuccess(long long);
     virtual void onSuccess();
+    virtual void onBlocked();
     virtual void onBlocked(long long oldVersion);
     virtual void onUpgradeNeeded(long long oldVersion, WebIDBTransaction*, WebIDBDatabase*);
 
index 0f358ef..da7c6fa 100644 (file)
@@ -69,6 +69,7 @@ public:
     virtual void onSuccess() OVERRIDE { }
     virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) { };
     virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) { }
+    virtual void onBlocked() { }
 private:
     MockIDBCallbacks() : m_wasErrorCalled(false) { }
 
index 5a2f8ff..35a5d50 100644 (file)
@@ -80,6 +80,7 @@ public:
     virtual void onSuccess() OVERRIDE { }
     virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) OVERRIDE { };
     virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) OVERRIDE { }
+    virtual void onBlocked() OVERRIDE { }
 private:
     MockIDBCallbacks()
         : m_wasSuccessDBCalled(false) { }