Changeset 135904 in webkit


Ignore:
Timestamp:
Nov 27, 2012 12:45:42 PM (11 years ago)
Author:
dgrogan@chromium.org
Message:

IndexedDB: Remove IDBDatabase.setVersion API
https://bugs.webkit.org/show_bug.cgi?id=94972

Reviewed by Tony Chang.

Source/WebCore:

This has been out of the spec for over a year. No other browser has
implemented it for close to a year.

Tests - removed.html

  • Modules/indexeddb/IDBCallbacks.h:

(IDBCallbacks):

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::IDBDatabase):

  • Modules/indexeddb/IDBDatabase.h:

(IDBDatabase):

  • Modules/indexeddb/IDBDatabase.idl:
  • Modules/indexeddb/IDBDatabaseBackendImpl.cpp:

(WebCore::IDBDatabaseBackendImpl::processPendingCalls):

  • Modules/indexeddb/IDBDatabaseBackendImpl.h:

(IDBDatabaseBackendImpl):

  • Modules/indexeddb/IDBDatabaseBackendInterface.h:

(IDBDatabaseBackendInterface):

  • Modules/indexeddb/IDBRequest.cpp:
  • Modules/indexeddb/IDBRequest.h:

Source/WebKit/chromium:

  • src/IDBCallbacksProxy.cpp:
  • src/IDBCallbacksProxy.h:

(IDBCallbacksProxy):

  • src/IDBDatabaseBackendProxy.cpp:
  • src/IDBDatabaseBackendProxy.h:

(IDBDatabaseBackendProxy):

  • src/WebIDBCallbacksImpl.cpp:
  • src/WebIDBCallbacksImpl.h:

(WebIDBCallbacksImpl):

  • src/WebIDBDatabaseImpl.cpp:
  • src/WebIDBDatabaseImpl.h:

(WebIDBDatabaseImpl):

LayoutTests:

  • storage/indexeddb/removed-expected.txt:
  • storage/indexeddb/resources/removed.js:

(test):

Location:
trunk
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r135903 r135904  
     12012-11-27  David Grogan  <dgrogan@chromium.org>
     2
     3        IndexedDB: Remove IDBDatabase.setVersion API
     4        https://bugs.webkit.org/show_bug.cgi?id=94972
     5
     6        Reviewed by Tony Chang.
     7
     8        * storage/indexeddb/removed-expected.txt:
     9        * storage/indexeddb/resources/removed.js:
     10        (test):
     11
    1122012-11-27  Mike West  <mkwst@chromium.org>
    213
  • trunk/LayoutTests/storage/indexeddb/removed-expected.txt

    r135424 r135904  
    1010PASS 'IDBDatabaseException' in self is false
    1111PASS 'errorCode' in indexedDB.open(dbname) is false
     12PASS 'setVersion' in IDBDatabase.prototype is false
    1213PASS successfullyParsed is true
    1314
  • trunk/LayoutTests/storage/indexeddb/resources/removed.js

    r135424 r135904  
    1414    shouldBeFalse("'IDBDatabaseException' in self");
    1515    shouldBeFalse("'errorCode' in indexedDB.open(dbname)");
     16    shouldBeFalse("'setVersion' in IDBDatabase.prototype");
    1617
    1718    finishJSTest();
  • trunk/Source/WebCore/ChangeLog

    r135903 r135904  
     12012-11-27  David Grogan  <dgrogan@chromium.org>
     2
     3        IndexedDB: Remove IDBDatabase.setVersion API
     4        https://bugs.webkit.org/show_bug.cgi?id=94972
     5
     6        Reviewed by Tony Chang.
     7
     8        This has been out of the spec for over a year. No other browser has
     9        implemented it for close to a year.
     10
     11        Tests - removed.html
     12
     13        * Modules/indexeddb/IDBCallbacks.h:
     14        (IDBCallbacks):
     15        * Modules/indexeddb/IDBDatabase.cpp:
     16        (WebCore::IDBDatabase::IDBDatabase):
     17        * Modules/indexeddb/IDBDatabase.h:
     18        (IDBDatabase):
     19        * Modules/indexeddb/IDBDatabase.idl:
     20        * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
     21        (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
     22        * Modules/indexeddb/IDBDatabaseBackendImpl.h:
     23        (IDBDatabaseBackendImpl):
     24        * Modules/indexeddb/IDBDatabaseBackendInterface.h:
     25        (IDBDatabaseBackendInterface):
     26        * Modules/indexeddb/IDBRequest.cpp:
     27        * Modules/indexeddb/IDBRequest.h:
     28
    1292012-11-27  Mike West  <mkwst@chromium.org>
    230
  • trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.h

    r134095 r135904  
    5757    // From IDBObjectStore.add()/put(), IDBIndex.getKey()
    5858    virtual void onSuccess(PassRefPtr<IDBKey>) = 0;
    59     // From IDBDatabase.setVersion()
    60     virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>) = 0;
    6159    // From IDBObjectStore/IDBIndex.get()/count(), and various methods that yield null/undefined.
    6260    virtual void onSuccess(PassRefPtr<SerializedScriptValue>) = 0;
     
    7371    // From IDBCursor.advance()/continue()
    7472    virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >& keys, const Vector<RefPtr<IDBKey> >& primaryKeys, const Vector<RefPtr<SerializedScriptValue> >& values) = 0;
    75     // From IDBFactory.open()/deleteDatabase(), IDBDatabase.setVersion()
     73    // From IDBFactory.open()/deleteDatabase()
    7674    virtual void onBlocked() { ASSERT_NOT_REACHED(); }
    7775    virtual void onBlocked(int64_t existingVersion) { ASSERT_NOT_REACHED(); }
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp

    r135856 r135904  
    6464    , m_contextStopped(false)
    6565    , m_databaseCallbacks(callbacks)
    66     , m_didSpamConsole(false)
    6766{
    6867    // We pass a reference of this object before it can be adopted.
     
    202201}
    203202
    204 PassRefPtr<IDBVersionChangeRequest> IDBDatabase::setVersion(ScriptExecutionContext* context, const String& version, ExceptionCode& ec)
    205 {
    206     if (!m_didSpamConsole) {
    207         String consoleMessage = ASCIILiteral("The setVersion() method is non-standard and will be removed. Use the \"upgradeneeded\" event instead.");
    208         context->addConsoleMessage(JSMessageSource, LogMessageType, WarningMessageLevel, consoleMessage);
    209         m_didSpamConsole = true;
    210     }
    211 
    212     if (version.isNull()) {
    213         ec = TypeError;
    214         return 0;
    215     }
    216 
    217     if (m_versionChangeTransaction) {
    218         ec = IDBDatabaseException::IDB_INVALID_STATE_ERR;
    219         return 0;
    220     }
    221 
    222     RefPtr<IDBVersionChangeRequest> request = IDBVersionChangeRequest::create(context, IDBAny::create(this), version);
    223     ASSERT(m_backend);
    224     m_backend->setVersion(version, request, m_databaseCallbacks, ec);
    225     return request;
    226 }
    227 
    228203PassRefPtr<IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, const Vector<String>& scope, const String& modeString, ExceptionCode& ec)
    229204{
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h

    r134342 r135904  
    6969    PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const String&, const String& mode, ExceptionCode&);
    7070    void deleteObjectStore(const String& name, ExceptionCode&);
    71     PassRefPtr<IDBVersionChangeRequest> setVersion(ScriptExecutionContext*, const String& version, ExceptionCode&);
    7271    void close();
    7372
     
    130129
    131130    RefPtr<IDBDatabaseCallbacks> m_databaseCallbacks;
    132 
    133     bool m_didSpamConsole;
    134131};
    135132
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl

    r135424 r135904  
    4343    void deleteObjectStore(in DOMString name)
    4444        raises (DOMException);
    45     [CallWith=ScriptExecutionContext] IDBVersionChangeRequest setVersion(in DOMString version)
    46         raises (DOMException);
    4745    [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMStringList storeNames, in [Optional=DefaultIsNullString] DOMString mode)
    4846        raises (DOMException);
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp

    r135856 r135904  
    9797};
    9898
    99 class IDBDatabaseBackendImpl::PendingSetVersionCall {
    100 public:
    101     static PassOwnPtr<PendingSetVersionCall> create(const String& version, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks)
    102     {
    103         return adoptPtr(new PendingSetVersionCall(version, callbacks, databaseCallbacks));
    104     }
    105     String version() { return m_version; }
    106     PassRefPtr<IDBCallbacks> callbacks() { return m_callbacks; }
    107     PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks() { return m_databaseCallbacks; }
    108 
    109 private:
    110     PendingSetVersionCall(const String& version, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks)
    111         : m_version(version)
    112         , m_callbacks(callbacks)
    113         , m_databaseCallbacks(databaseCallbacks)
    114     {
    115     }
    116     String m_version;
    117     RefPtr<IDBCallbacks> m_callbacks;
    118     RefPtr<IDBDatabaseCallbacks> m_databaseCallbacks;
    119 };
    120 
    12199PassRefPtr<IDBDatabaseBackendImpl> IDBDatabaseBackendImpl::create(const String& name, IDBBackingStore* database, IDBFactoryBackendImpl* factory, const String& uniqueIdentifier)
    122100{
     
    234212    database->m_backingStore->deleteObjectStore(transaction->backingStoreTransaction(), database->id(), objectStore->id());
    235213    transaction->didCompleteTaskEvents();
    236 }
    237 
    238 void IDBDatabaseBackendImpl::setVersion(const String& version, PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, ExceptionCode& ec)
    239 {
    240     RefPtr<IDBCallbacks> callbacks = prpCallbacks;
    241     RefPtr<IDBDatabaseCallbacks> databaseCallbacks = prpDatabaseCallbacks;
    242     if (!m_databaseCallbacksSet.contains(databaseCallbacks)) {
    243         callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::IDB_ABORT_ERR, "Connection was closed before set version transaction was created"));
    244         return;
    245     }
    246     for (DatabaseCallbacksSet::const_iterator it = m_databaseCallbacksSet.begin(); it != m_databaseCallbacksSet.end(); ++it) {
    247         // Front end ensures the event is not fired at connections that have closePending set.
    248         if (*it != databaseCallbacks)
    249             (*it)->onVersionChange(version);
    250     }
    251     // FIXME: Only fire onBlocked if there are open connections after the
    252     // VersionChangeEvents are received, not just set up to fire.
    253     // https://bugs.webkit.org/show_bug.cgi?id=71130
    254     if (connectionCount() > 1) {
    255         callbacks->onBlocked();
    256         OwnPtr<PendingSetVersionCall> pendingSetVersionCall = PendingSetVersionCall::create(version, callbacks, databaseCallbacks);
    257         m_pendingSetVersionCalls.append(pendingSetVersionCall.release());
    258         return;
    259     }
    260     if (m_runningVersionChangeTransaction) {
    261         OwnPtr<PendingSetVersionCall> pendingSetVersionCall = PendingSetVersionCall::create(version, callbacks, databaseCallbacks);
    262         m_pendingSetVersionCalls.append(pendingSetVersionCall.release());
    263         return;
    264     }
    265 
    266     Vector<int64_t> objectStoreIds;
    267     RefPtr<IDBTransactionBackendInterface> transactionInterface = this->transaction(objectStoreIds, IDBTransaction::VERSION_CHANGE);
    268     RefPtr<IDBTransactionBackendImpl> transaction = IDBTransactionBackendImpl::from(transactionInterface.get());
    269     ASSERT(!ec);
    270 
    271     RefPtr<IDBDatabaseBackendImpl> database = this;
    272     if (!transaction->scheduleTask(
    273             createCallbackTask(&IDBDatabaseBackendImpl::setVersionInternal, database, version, callbacks, transaction),
    274             createCallbackTask(&IDBDatabaseBackendImpl::resetVersion, database, m_metadata.version, m_metadata.intVersion))) {
    275         // FIXME: Remove one of the following lines.
    276         ASSERT_NOT_REACHED();
    277         ec = IDBDatabaseException::TRANSACTION_INACTIVE_ERR;
    278     }
    279 }
    280 
    281 void IDBDatabaseBackendImpl::setVersionInternal(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackendImpl> database, const String& version, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBTransactionBackendImpl> prpTransaction)
    282 {
    283     RefPtr<IDBTransactionBackendImpl> transaction = prpTransaction;
    284     int64_t databaseId = database->id();
    285     database->m_metadata.version = version;
    286     database->m_metadata.intVersion = IDBDatabaseMetadata::NoIntVersion;
    287     if (!database->m_backingStore->updateIDBDatabaseMetaData(transaction->backingStoreTransaction(), databaseId, database->m_metadata.version) || !database->m_backingStore->updateIDBDatabaseIntVersion(transaction->backingStoreTransaction(), databaseId, database->m_metadata.intVersion)) {
    288         RefPtr<IDBDatabaseError> error = IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Error writing data to stable storage.");
    289         callbacks->onError(error);
    290         transaction->abort(error);
    291         return;
    292     }
    293     callbacks->onSuccess(PassRefPtr<IDBTransactionBackendInterface>(transaction));
    294214}
    295215
     
    370290    }
    371291
    372     // Pending calls may be requeued or aborted
    373     Deque<OwnPtr<PendingSetVersionCall> > pendingSetVersionCalls;
    374     m_pendingSetVersionCalls.swap(pendingSetVersionCalls);
    375     while (!pendingSetVersionCalls.isEmpty()) {
    376         ExceptionCode ec = 0;
    377         OwnPtr<PendingSetVersionCall> pendingSetVersionCall = pendingSetVersionCalls.takeFirst();
    378         setVersion(pendingSetVersionCall->version(), pendingSetVersionCall->callbacks(), pendingSetVersionCall->databaseCallbacks(), ec);
    379         ASSERT(!ec);
    380     }
    381 
    382     // If there were any pending set version calls, we better have started one.
    383     ASSERT(m_pendingSetVersionCalls.isEmpty() || m_runningVersionChangeTransaction);
    384 
    385     // m_pendingSetVersionCalls is non-empty in two cases:
    386     // 1) When two versionchange transactions are requested while another
    387     //    version change transaction is running.
    388     // 2) When three versionchange transactions are requested in a row, before
    389     //    any of their event handlers are run.
    390292    // Note that this check is only an optimization to reduce queue-churn and
    391293    // not necessary for correctness; deleteDatabase and openConnection will
    392294    // requeue their calls if this condition is true.
    393     if (m_runningVersionChangeTransaction || !m_pendingSetVersionCalls.isEmpty())
     295    if (m_runningVersionChangeTransaction)
    394296        return;
    395297
     
    403305
    404306    // This check is also not really needed, openConnection would just requeue its calls.
    405     if (m_runningVersionChangeTransaction || !m_pendingSetVersionCalls.isEmpty() || !m_pendingDeleteCalls.isEmpty())
     307    if (m_runningVersionChangeTransaction || !m_pendingDeleteCalls.isEmpty())
    406308        return;
    407309
     
    439341{
    440342    ASSERT(m_backingStore.get());
    441     if (!m_pendingDeleteCalls.isEmpty() || m_runningVersionChangeTransaction || !m_pendingSetVersionCalls.isEmpty()) {
     343    if (!m_pendingDeleteCalls.isEmpty() || m_runningVersionChangeTransaction) {
    442344        m_pendingOpenCalls.append(PendingOpenCall::create(callbacks, databaseCallbacks));
    443345        return;
     
    501403    RefPtr<IDBCallbacks> callbacks = prpCallbacks;
    502404    RefPtr<IDBDatabaseCallbacks> databaseCallbacks = prpDatabaseCallbacks;
    503     if (!m_pendingDeleteCalls.isEmpty() || m_runningVersionChangeTransaction || !m_pendingSetVersionCalls.isEmpty()) {
     405    if (!m_pendingDeleteCalls.isEmpty() || m_runningVersionChangeTransaction) {
    504406        m_pendingOpenWithVersionCalls.append(PendingOpenWithVersionCall::create(callbacks, databaseCallbacks, version));
    505407        return;
     
    528430void IDBDatabaseBackendImpl::deleteDatabase(PassRefPtr<IDBCallbacks> prpCallbacks)
    529431{
    530     if (m_runningVersionChangeTransaction || !m_pendingSetVersionCalls.isEmpty()) {
     432    if (m_runningVersionChangeTransaction) {
    531433        m_pendingDeleteCalls.append(PendingDeleteCall::create(prpCallbacks));
    532434        return;
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h

    r135856 r135904  
    6464    virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(int64_t id, const String& name, const IDBKeyPath&, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&);
    6565    virtual void deleteObjectStore(int64_t, IDBTransactionBackendInterface*, ExceptionCode&);
    66     virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, ExceptionCode&);
    6766    // FIXME: Remove this as part of https://bugs.webkit.org/show_bug.cgi?id=102733.
    6867    virtual PassRefPtr<IDBTransactionBackendInterface> transaction(const Vector<int64_t>&, unsigned short);
     
    8887    static void createObjectStoreInternal(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBTransactionBackendImpl>);
    8988    static void deleteObjectStoreInternal(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackendImpl>, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBTransactionBackendImpl>);
    90     static void setVersionInternal(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackendImpl>, const String& version, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBTransactionBackendImpl>);
    9189    static void setIntVersionInternal(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackendImpl>, int64_t version, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, PassRefPtr<IDBTransactionBackendImpl>);
    9290
     
    112110    TransactionSet m_transactions;
    113111
    114     class PendingSetVersionCall;
    115     Deque<OwnPtr<PendingSetVersionCall> > m_pendingSetVersionCalls;
    116 
    117112    class PendingOpenCall;
    118113    Deque<OwnPtr<PendingOpenCall> > m_pendingOpenCalls;
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendInterface.h

    r135856 r135904  
    5656    virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(int64_t, const String& name, const IDBKeyPath&, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
    5757    virtual void deleteObjectStore(int64_t, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
    58     virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, ExceptionCode&) = 0;
    5958    // FIXME: Remove this as part of https://bugs.webkit.org/show_bug.cgi?id=102733.
    6059    virtual PassRefPtr<IDBTransactionBackendInterface> transaction(const Vector<int64_t>& objectStoreIds, unsigned short mode) = 0;
  • trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp

    r135332 r135904  
    312312}
    313313
    314 void IDBRequest::onSuccess(PassRefPtr<IDBTransactionBackendInterface> prpBackend)
    315 {
    316     IDB_TRACE("IDBRequest::onSuccess(IDBTransaction)");
    317     RefPtr<IDBTransactionBackendInterface> backend = prpBackend;
    318 
    319     if (m_contextStopped || !scriptExecutionContext()) {
    320         // Should only be null in tests.
    321         if (backend.get())
    322             backend->abort();
    323         return;
    324     }
    325     if (!shouldEnqueueEvent())
    326         return;
    327 
    328     RefPtr<IDBTransaction> frontend = IDBTransaction::create(scriptExecutionContext(), backend, Vector<String>(), IDBTransaction::VERSION_CHANGE, m_source->idbDatabase().get());
    329     backend->setCallbacks(frontend.get());
    330     m_transaction = frontend;
    331 
    332     ASSERT(m_source->type() == IDBAny::IDBDatabaseType);
    333     ASSERT(m_transaction->isVersionChange());
    334 
    335     m_result = IDBAny::create(frontend.release());
    336     enqueueEvent(createSuccessEvent());
    337 }
    338 
    339314void IDBRequest::onSuccess(PassRefPtr<SerializedScriptValue> serializedScriptValue)
    340315{
  • trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h

    r134989 r135904  
    9292    virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>, PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue>);
    9393    virtual void onSuccess(PassRefPtr<IDBKey>);
    94     virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>);
    9594    virtual void onSuccess(PassRefPtr<SerializedScriptValue>);
    9695    virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&);
  • trunk/Source/WebKit/chromium/ChangeLog

    r135881 r135904  
     12012-11-27  David Grogan  <dgrogan@chromium.org>
     2
     3        IndexedDB: Remove IDBDatabase.setVersion API
     4        https://bugs.webkit.org/show_bug.cgi?id=94972
     5
     6        Reviewed by Tony Chang.
     7
     8        * src/IDBCallbacksProxy.cpp:
     9        * src/IDBCallbacksProxy.h:
     10        (IDBCallbacksProxy):
     11        * src/IDBDatabaseBackendProxy.cpp:
     12        * src/IDBDatabaseBackendProxy.h:
     13        (IDBDatabaseBackendProxy):
     14        * src/WebIDBCallbacksImpl.cpp:
     15        * src/WebIDBCallbacksImpl.h:
     16        (WebIDBCallbacksImpl):
     17        * src/WebIDBDatabaseImpl.cpp:
     18        * src/WebIDBDatabaseImpl.h:
     19        (WebIDBDatabaseImpl):
     20
    1212012-11-27  Eberhard Graether  <egraether@google.com>
    222
  • trunk/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp

    r134095 r135904  
    8888}
    8989
    90 void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBTransactionBackendInterface> backend)
    91 {
    92     m_callbacks->onSuccess(new WebIDBTransactionImpl(backend));
    93 }
    94 
    9590void IDBCallbacksProxy::onSuccess(PassRefPtr<DOMStringList> domStringList)
    9691{
  • trunk/Source/WebKit/chromium/src/IDBCallbacksProxy.h

    r131661 r135904  
    5252    virtual void onSuccess(PassRefPtr<WebCore::IDBDatabaseBackendInterface>);
    5353    virtual void onSuccess(PassRefPtr<WebCore::IDBKey>);
    54     virtual void onSuccess(PassRefPtr<WebCore::IDBTransactionBackendInterface>);
    5554    virtual void onSuccess(PassRefPtr<WebCore::SerializedScriptValue>);
    5655    virtual void onSuccess(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, const WebCore::IDBKeyPath&);
  • trunk/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp

    r135856 r135904  
    8686}
    8787
    88 void IDBDatabaseBackendProxy::setVersion(const String& version, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks, ExceptionCode& ec)
    89 {
    90     ASSERT(m_webIDBDatabase);
    91     m_webIDBDatabase->setVersion(version, new WebIDBCallbacksImpl(callbacks), ec);
    92 }
    93 
    9488// FIXME: Remove this as part of https://bugs.webkit.org/show_bug.cgi?id=102733.
    9589PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseBackendProxy::transaction(const Vector<int64_t>& objectStoreIds, unsigned short mode)
  • trunk/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h

    r135856 r135904  
    4747    virtual PassRefPtr<WebCore::IDBObjectStoreBackendInterface> createObjectStore(int64_t, const String& name, const WebCore::IDBKeyPath&, bool autoIncrement, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
    4848    virtual void deleteObjectStore(int64_t, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
    49     virtual void setVersion(const String& version, PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::IDBDatabaseCallbacks>, WebCore::ExceptionCode&);
    5049    // FIXME: Remove this as part of https://bugs.webkit.org/show_bug.cgi?id=102733.
    5150    virtual PassRefPtr<WebCore::IDBTransactionBackendInterface> transaction(const Vector<int64_t>&, unsigned short mode);
  • trunk/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp

    r133195 r135904  
    8787}
    8888
    89 void WebIDBCallbacksImpl::onSuccess(WebIDBTransaction* webKitInstance)
    90 {
    91     m_callbacks->onSuccess(IDBTransactionBackendProxy::create(adoptPtr(webKitInstance)));
    92 }
    93 
    9489void WebIDBCallbacksImpl::onSuccess(const WebSerializedScriptValue& serializedScriptValue)
    9590{
  • trunk/Source/WebKit/chromium/src/WebIDBCallbacksImpl.h

    r131661 r135904  
    4747    virtual void onSuccess(WebIDBDatabase*);
    4848    virtual void onSuccess(const WebIDBKey&);
    49     virtual void onSuccess(WebIDBTransaction*);
    5049    virtual void onSuccess(const WebSerializedScriptValue&);
    5150    virtual void onSuccess(const WebSerializedScriptValue&, const WebIDBKey&, const WebIDBKeyPath&);
  • trunk/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp

    r135856 r135904  
    7676}
    7777
    78 void WebIDBDatabaseImpl::setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode& ec)
    79 {
    80     m_databaseBackend->setVersion(version, IDBCallbacksProxy::create(adoptPtr(callbacks)), m_databaseCallbacks, ec);
    81 }
    82 
    8378WebIDBTransaction* WebIDBDatabaseImpl::createTransaction(long long id, const WebVector<long long>& objectStoreIds, unsigned short mode)
    8479{
  • trunk/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h

    r135856 r135904  
    5555    virtual WebIDBObjectStore* createObjectStore(long long, const WebString& name, const WebIDBKeyPath&, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&);
    5656    virtual void deleteObjectStore(long long objectStoreId, const WebIDBTransaction&, WebExceptionCode&);
    57     virtual void setVersion(const WebString& version, WebIDBCallbacks*, WebExceptionCode&);
    5857    // FIXME: Remove this as part of https://bugs.webkit.org/show_bug.cgi?id=102733.
    5958    virtual WebIDBTransaction* transaction(const WebVector<long long>& names, unsigned short mode);
  • trunk/Source/WebKit/chromium/tests/IDBDatabaseBackendTest.cpp

    r135856 r135904  
    8989    }
    9090    virtual void onSuccess(PassRefPtr<IDBKey>) OVERRIDE { }
    91     virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>) OVERRIDE { }
    9291    virtual void onSuccess(PassRefPtr<SerializedScriptValue>) OVERRIDE { }
    9392    virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&) OVERRIDE { };
     
    154153    virtual void deleteObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&) { }
    155154    virtual void deleteObjectStore(int64_t, IDBTransactionBackendInterface*, ExceptionCode&) { }
    156     virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, ExceptionCode&) { }
    157155    // FIXME: Remove this as part of https://bugs.webkit.org/show_bug.cgi?id=102733.
    158156    virtual PassRefPtr<IDBTransactionBackendInterface> transaction(const Vector<int64_t>&, unsigned short mode) { return 0; }
  • trunk/Source/WebKit/chromium/tests/IDBRequestTest.cpp

    r135506 r135904  
    9595    request->onSuccess(PassRefPtr<IDBCursorBackendInterface>(), IDBKey::createInvalid(), IDBKey::createInvalid(), SerializedScriptValue::nullValue());
    9696    request->onSuccess(IDBKey::createInvalid());
    97     request->onSuccess(PassRefPtr<IDBTransactionBackendInterface>());
    9897    request->onSuccess(SerializedScriptValue::nullValue());
    9998    request->onSuccess(SerializedScriptValue::nullValue(), IDBKey::createInvalid(), IDBKeyPath());
Note: See TracChangeset for help on using the changeset viewer.