Commit 5b5311b7 authored by hans@chromium.org's avatar hans@chromium.org
Browse files

2011-01-27 Hans Wennborg <hans@chromium.org>

        Reviewed by Jeremy Orlow.

        IndexedDB: Remove IDBCallbacks::onSuccess() used for null values.
        https://bugs.webkit.org/show_bug.cgi?id=53178

        Remove the IDBCallbacks::onSuccess() function that was used for
        null values, and replace such calls with calls to
        IDBCallBacks::onSuccess(SerializedScriptValue::nullValue())
        instead.

        No new functionality, so no new tests.

        * storage/IDBCallbacks.h:
        * storage/IDBCursorBackendImpl.cpp:
        (WebCore::IDBCursorBackendImpl::updateInternal):
        (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
        * storage/IDBIndexBackendImpl.cpp:
        (WebCore::IDBIndexBackendImpl::openCursorInternal):
        * storage/IDBObjectStoreBackendImpl.cpp:
        (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
        (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
        * storage/IDBRequest.cpp:
        * storage/IDBRequest.h:
2011-01-27  Hans Wennborg  <hans@chromium.org>

        Reviewed by Jeremy Orlow.

        IndexedDB: Remove IDBCallbacks::onSuccess() used for null values.
        https://bugs.webkit.org/show_bug.cgi?id=53178

        Remove the IDBCallbacks::onSuccess() function that was used for
        null values, and replace such calls with calls to
        IDBCallBacks::onSuccess(SerializedScriptValue::nullValue())
        instead.

        * public/WebIDBCallbacks.h:
        (WebKit::WebIDBCallbacks::onSuccess):
        * src/IDBCallbacksProxy.cpp:
        * src/IDBCallbacksProxy.h:
        * src/WebIDBCallbacksImpl.cpp:
        * src/WebIDBCallbacksImpl.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e63f8deb
2011-01-27 Hans Wennborg <hans@chromium.org>
Reviewed by Jeremy Orlow.
IndexedDB: Remove IDBCallbacks::onSuccess() used for null values.
https://bugs.webkit.org/show_bug.cgi?id=53178
Remove the IDBCallbacks::onSuccess() function that was used for
null values, and replace such calls with calls to
IDBCallBacks::onSuccess(SerializedScriptValue::nullValue())
instead.
No new functionality, so no new tests.
* storage/IDBCallbacks.h:
* storage/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::updateInternal):
(WebCore::IDBCursorBackendImpl::continueFunctionInternal):
* storage/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::openCursorInternal):
* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::deleteInternal):
(WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
* storage/IDBRequest.cpp:
* storage/IDBRequest.h:
2011-01-27 Sheriff Bot <webkit.review.bot@gmail.com>
 
Unreviewed, rolling out r76773.
......@@ -49,7 +49,6 @@ public:
virtual ~IDBCallbacks() { }
virtual void onError(PassRefPtr<IDBDatabaseError>) = 0;
virtual void onSuccess() = 0; // For "null".
virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>) = 0;
virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>) = 0;
virtual void onSuccess(PassRefPtr<IDBIndexBackendInterface>) = 0;
......
......@@ -115,7 +115,7 @@ void IDBCursorBackendImpl::updateInternal(ScriptExecutionContext*, PassRefPtr<ID
if (cursor->m_isSerializedScriptValueCursor)
cursor->m_currentSerializedScriptValue = value.release();
callbacks->onSuccess();
callbacks->onSuccess(SerializedScriptValue::nullValue());
}
void IDBCursorBackendImpl::continueFunction(PassRefPtr<IDBKey> prpKey, PassRefPtr<IDBCallbacks> prpCallbacks, ExceptionCode& ec)
......@@ -138,7 +138,7 @@ void IDBCursorBackendImpl::continueFunctionInternal(ScriptExecutionContext*, Pas
cursor->m_currentKey = 0;
cursor->m_currentSerializedScriptValue = 0;
cursor->m_currentIDBKeyValue = 0;
callbacks->onSuccess();
callbacks->onSuccess(SerializedScriptValue::nullValue());
return;
}
......
......@@ -100,7 +100,7 @@ void IDBIndexBackendImpl::openCursorInternal(ScriptExecutionContext*, PassRefPtr
query->bindInt64(indexColumn, index->id());
if (query->step() != SQLResultRow) {
callbacks->onSuccess();
callbacks->onSuccess(SerializedScriptValue::nullValue());
return;
}
......
......@@ -342,7 +342,7 @@ void IDBObjectStoreBackendImpl::deleteInternal(ScriptExecutionContext*, PassRefP
ok = indexQuery.step() == SQLResultDone;
ASSERT_UNUSED(ok, ok);
callbacks->onSuccess();
callbacks->onSuccess(SerializedScriptValue::nullValue());
}
PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendImpl::createIndex(const String& name, const String& keyPath, bool unique, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
......@@ -483,7 +483,7 @@ void IDBObjectStoreBackendImpl::openCursorInternal(ScriptExecutionContext*, Pass
query->bindInt64(currentColumn, objectStore->id());
if (query->step() != SQLResultRow) {
callbacks->onSuccess();
callbacks->onSuccess(SerializedScriptValue::nullValue());
return;
}
......
......@@ -76,11 +76,6 @@ void IDBRequest::onError(PassRefPtr<IDBDatabaseError> error)
scheduleEvent(0, error);
}
void IDBRequest::onSuccess()
{
scheduleEvent(IDBAny::createNull(), 0);
}
void IDBRequest::onSuccess(PassRefPtr<IDBCursorBackendInterface> backend)
{
scheduleEvent(IDBAny::create(IDBCursor::create(backend, this, m_transaction.get())), 0);
......
......@@ -62,7 +62,6 @@ public:
// IDBCallbacks
virtual void onError(PassRefPtr<IDBDatabaseError>);
virtual void onSuccess(); // For "null".
virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>);
virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>);
virtual void onSuccess(PassRefPtr<IDBIndexBackendInterface>);
......
2011-01-27 Hans Wennborg <hans@chromium.org>
Reviewed by Jeremy Orlow.
IndexedDB: Remove IDBCallbacks::onSuccess() used for null values.
https://bugs.webkit.org/show_bug.cgi?id=53178
Remove the IDBCallbacks::onSuccess() function that was used for
null values, and replace such calls with calls to
IDBCallBacks::onSuccess(SerializedScriptValue::nullValue())
instead.
* public/WebIDBCallbacks.h:
(WebKit::WebIDBCallbacks::onSuccess):
* src/IDBCallbacksProxy.cpp:
* src/IDBCallbacksProxy.h:
* src/WebIDBCallbacksImpl.cpp:
* src/WebIDBCallbacksImpl.h:
2011-01-26 Kent Tamura <tkent@chromium.org>
 
Reviewed by Dimitri Glazkov.
......@@ -46,7 +46,7 @@ public:
// For classes that follow the PImpl pattern, pass a const reference.
// For the rest, pass ownership to the callee via a pointer.
virtual void onError(const WebIDBDatabaseError&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess() { WEBKIT_ASSERT_NOT_REACHED(); } // For "null".
void onSuccess() { WEBKIT_ASSERT_NOT_REACHED(); } // FIXME: Remove once Chromium stops referring to it.
virtual void onSuccess(WebIDBCursor*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(WebIDBDatabase*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(const WebIDBKey&) { WEBKIT_ASSERT_NOT_REACHED(); }
......
......@@ -65,12 +65,6 @@ void IDBCallbacksProxy::onError(PassRefPtr<IDBDatabaseError> idbDatabaseError)
m_callbacks.clear();
}
void IDBCallbacksProxy::onSuccess()
{
m_callbacks->onSuccess();
m_callbacks.clear();
}
void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBCursorBackendInterface> idbCursorBackend)
{
m_callbacks->onSuccess(new WebKit::WebIDBCursorImpl(idbCursorBackend));
......
......@@ -48,7 +48,6 @@ public:
virtual ~IDBCallbacksProxy();
virtual void onError(PassRefPtr<IDBDatabaseError>);
virtual void onSuccess(); // For "null".
virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>);
virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>);
virtual void onSuccess(PassRefPtr<IDBIndexBackendInterface>);
......
......@@ -61,11 +61,6 @@ void WebIDBCallbacksImpl::onError(const WebKit::WebIDBDatabaseError& error)
m_callbacks->onError(error);
}
void WebIDBCallbacksImpl::onSuccess()
{
m_callbacks->onSuccess();
}
void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBCursor* cursor)
{
m_callbacks->onSuccess(IDBCursorBackendProxy::create(cursor));
......
......@@ -42,7 +42,6 @@ public:
virtual ~WebIDBCallbacksImpl();
virtual void onError(const WebKit::WebIDBDatabaseError&);
virtual void onSuccess(); // For "null".
virtual void onSuccess(WebKit::WebIDBCursor*);
virtual void onSuccess(WebKit::WebIDBDatabase*);
virtual void onSuccess(const WebKit::WebIDBKey&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment