Changeset 125568 in webkit
- Timestamp:
- Aug 14, 2012 9:06:43 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r125563 r125568 1 2012-08-14 Joshua Bell <jsbell@chromium.org> 2 3 IndexedDB: Pass cursor continue results back in callback 4 https://bugs.webkit.org/show_bug.cgi?id=92278 5 6 Reviewed by Tony Chang. 7 8 Supply the updated cursor key/primaryKey/value in the success callback, 9 rather than forcing the callee to make three calls into the back end to 10 fetch them. Callbacks onSuccess(cursor) and onSuccessWithContinuation() 11 are given the three new payload parameters (and the latter is renamed.) 12 13 No new tests - no behavioral changes. 14 15 * Modules/indexeddb/IDBCallbacks.h: Updated callbacks. 16 (IDBCallbacks): 17 * Modules/indexeddb/IDBCursor.cpp: 18 (WebCore::IDBCursor::setValueReady): Takes values rather than fetching them. 19 * Modules/indexeddb/IDBCursor.h: 20 (IDBCursor): 21 * Modules/indexeddb/IDBCursorBackendImpl.cpp: Delete accessors. 22 (WebCore::IDBCursorBackendImpl::advanceInternal): Pass along updated cursor state. 23 (WebCore::IDBCursorBackendImpl::continueFunctionInternal): Ditto. 24 * Modules/indexeddb/IDBCursorBackendImpl.h: 25 (IDBCursorBackendImpl): Delete accessors from interface... 26 (WebCore::IDBCursorBackendImpl::key): ...but keep them for use within back-end. 27 (WebCore::IDBCursorBackendImpl::primaryKey): 28 (WebCore::IDBCursorBackendImpl::value): 29 * Modules/indexeddb/IDBCursorBackendInterface.h: Delete accessors. 30 * Modules/indexeddb/IDBIndexBackendImpl.cpp: 31 (WebCore::IDBIndexBackendImpl::openCursorInternal): Pass along new cursor state. 32 * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: 33 (WebCore::IDBObjectStoreBackendImpl::openCursorInternal): Ditto. 34 * Modules/indexeddb/IDBRequest.cpp: 35 (WebCore::IDBRequest::setResultCursor): Stash updated cursor state until dispatch. 36 (WebCore::IDBRequest::onSuccess): 37 (WebCore::IDBRequest::dispatchEvent): Update cursor with new state. 38 * Modules/indexeddb/IDBRequest.h: 39 (IDBRequest): 40 * inspector/InspectorIndexedDBAgent.cpp: Update iteration code to use new callbacks. 41 (WebCore): 42 1 43 2012-08-14 Arvid Nilsson <anilsson@rim.com> 2 44 -
trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.h
r124675 r125568 51 51 52 52 virtual void onError(PassRefPtr<IDBDatabaseError>) = 0; 53 // From IDBFactory.webkitGetDatabaseNames() 53 54 virtual void onSuccess(PassRefPtr<DOMStringList>) = 0; 54 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>) = 0; 55 // From IDBObjectStore/IDBIndex.openCursor(), IDBIndex.openKeyCursor() 56 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>, PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue>) = 0; 57 // From IDBFactory.open() 55 58 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>) = 0; 59 // From IDBObjectStore.add()/put(), IDBIndex.getKey() 56 60 virtual void onSuccess(PassRefPtr<IDBKey>) = 0; 61 // From IDBDatabase.setVersion() 57 62 virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>) = 0; 63 // From IDBObjectStore/IDBIndex.get()/count(), and various methods that yield null/undefined. 58 64 virtual void onSuccess(PassRefPtr<SerializedScriptValue>) = 0; 65 // From IDBObjectStore/IDBIndex.get() (with key injection) 59 66 virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&) = 0; 60 virtual void onSuccessWithContinuation() = 0; 67 // From IDBCursor.advance()/continue() 68 virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue>) = 0; 69 // From IDBCursor.advance()/continue() 61 70 virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >& keys, const Vector<RefPtr<IDBKey> >& primaryKeys, const Vector<RefPtr<SerializedScriptValue> >& values) = 0; 62 71 virtual void onBlocked() { ASSERT_NOT_REACHED(); } -
trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp
r124842 r125568 266 266 } 267 267 268 void IDBCursor::setValueReady( )269 { 270 m_currentKey = m_backend->key();271 m_currentPrimaryKey = m_backend->primaryKey();272 273 RefPtr<SerializedScriptValue> value = m_backend->value();268 void IDBCursor::setValueReady(PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue> prpValue) 269 { 270 m_currentKey = key; 271 m_currentPrimaryKey = primaryKey; 272 273 RefPtr<SerializedScriptValue> value = prpValue; 274 274 if (!isKeyCursor()) { 275 275 RefPtr<IDBObjectStore> objectStore = effectiveObjectStore(); -
trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h
r121612 r125568 83 83 void postSuccessHandlerCallback(); 84 84 void close(); 85 void setValueReady( );85 void setValueReady(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue>); 86 86 87 87 // The spec requires that the script object that wraps the value -
trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp
r124361 r125568 63 63 } 64 64 65 PassRefPtr<IDBKey> IDBCursorBackendImpl::key() const66 {67 IDB_TRACE("IDBCursorBackendImpl::key");68 return m_cursor->key();69 }70 71 PassRefPtr<IDBKey> IDBCursorBackendImpl::primaryKey() const72 {73 IDB_TRACE("IDBCursorBackendImpl::primaryKey");74 return m_cursor->primaryKey();75 }76 77 PassRefPtr<SerializedScriptValue> IDBCursorBackendImpl::value() const78 {79 IDB_TRACE("IDBCursorBackendImpl::value");80 if (m_cursorType == IndexKeyCursor)81 return SerializedScriptValue::nullValue();82 return SerializedScriptValue::createFromWire(m_cursor->value());83 }84 85 65 void IDBCursorBackendImpl::continueFunction(PassRefPtr<IDBKey> prpKey, PassRefPtr<IDBCallbacks> prpCallbacks, ExceptionCode& ec) 86 66 { … … 110 90 } 111 91 112 callbacks->onSuccess WithContinuation();92 callbacks->onSuccess(cursor->key(), cursor->primaryKey(), cursor->value()); 113 93 } 114 94 … … 125 105 } 126 106 127 callbacks->onSuccess WithContinuation();107 callbacks->onSuccess(cursor->key(), cursor->primaryKey(), cursor->value()); 128 108 } 129 109 -
trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h
r124361 r125568 55 55 56 56 // IDBCursorBackendInterface 57 virtual PassRefPtr<IDBKey> key() const;58 virtual PassRefPtr<IDBKey> primaryKey() const;59 virtual PassRefPtr<SerializedScriptValue> value() const;60 57 virtual void advance(unsigned long, PassRefPtr<IDBCallbacks>, ExceptionCode&); 61 58 virtual void continueFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, ExceptionCode&); … … 65 62 virtual void postSuccessHandlerCallback() { ASSERT_NOT_REACHED(); } 66 63 64 PassRefPtr<IDBKey> key() const { return m_cursor->key(); } 65 PassRefPtr<IDBKey> primaryKey() const { return m_cursor->primaryKey(); } 66 PassRefPtr<SerializedScriptValue> value() const { return (m_cursorType == IndexKeyCursor) ? SerializedScriptValue::nullValue() : SerializedScriptValue::createFromWire(m_cursor->value()); } 67 67 void close(); 68 68 -
trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendInterface.h
r123843 r125568 54 54 }; 55 55 56 virtual PassRefPtr<IDBKey> key() const = 0;57 virtual PassRefPtr<IDBKey> primaryKey() const = 0;58 virtual PassRefPtr<SerializedScriptValue> value() const = 0;59 60 56 virtual void advance(unsigned long count, PassRefPtr<IDBCallbacks>, ExceptionCode&) = 0; 61 57 virtual void continueFunction(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>, ExceptionCode&) = 0; -
trunk/Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.cpp
r124361 r125568 100 100 } 101 101 102 RefPtr<IDBCursorBackendI nterface> cursor = IDBCursorBackendImpl::create(backingStoreCursor.get(), cursorType, transaction.get(), index->m_objectStoreBackend);103 callbacks->onSuccess(cursor .release());102 RefPtr<IDBCursorBackendImpl> cursor = IDBCursorBackendImpl::create(backingStoreCursor.get(), cursorType, transaction.get(), index->m_objectStoreBackend); 103 callbacks->onSuccess(cursor, cursor->key(), cursor->primaryKey(), cursor->value()); 104 104 } 105 105 -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp
r124361 r125568 540 540 } 541 541 542 RefPtr<IDBCursorBackendI nterface> cursor = IDBCursorBackendImpl::create(backingStoreCursor.release(), IDBCursorBackendInterface::ObjectStoreCursor, transaction.get(), objectStore.get());543 callbacks->onSuccess(cursor .release());542 RefPtr<IDBCursorBackendImpl> cursor = IDBCursorBackendImpl::create(backingStoreCursor.release(), IDBCursorBackendInterface::ObjectStoreCursor, transaction.get(), objectStore.get()); 543 callbacks->onSuccess(cursor, cursor->key(), cursor->primaryKey(), cursor->value()); 544 544 } 545 545 -
trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp
r124974 r125568 200 200 } 201 201 202 void IDBRequest::setResultCursor(PassRefPtr<IDBCursor> prpCursor)202 void IDBRequest::setResultCursor(PassRefPtr<IDBCursor> cursor, PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue> value) 203 203 { 204 204 ASSERT(m_readyState == PENDING); 205 m_cursorKey = key; 206 m_cursorPrimaryKey = primaryKey; 207 m_cursorValue = value; 208 205 209 if (m_cursorType == IDBCursorBackendInterface::IndexKeyCursor) { 206 m_result = IDBAny::create( prpCursor);207 return; 208 } 209 210 m_result = IDBAny::create(IDBCursorWithValue::fromCursor( prpCursor));210 m_result = IDBAny::create(cursor); 211 return; 212 } 213 214 m_result = IDBAny::create(IDBCursorWithValue::fromCursor(cursor)); 211 215 } 212 216 … … 251 255 } 252 256 253 void IDBRequest::onSuccess(PassRefPtr<IDBCursorBackendInterface> backend )257 void IDBRequest::onSuccess(PassRefPtr<IDBCursorBackendInterface> backend, PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue> value) 254 258 { 255 259 IDB_TRACE("IDBRequest::onSuccess(IDBCursor)"); … … 263 267 else 264 268 cursor = IDBCursorWithValue::create(backend, m_cursorDirection, this, m_source.get(), m_transaction.get()); 265 setResultCursor(cursor );269 setResultCursor(cursor, key, primaryKey, value); 266 270 267 271 enqueueEvent(createSuccessEvent()); … … 370 374 } 371 375 372 void IDBRequest::onSuccess WithContinuation()373 { 374 IDB_TRACE("IDBRequest::onSuccess WithContinuation");376 void IDBRequest::onSuccess(PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue> value) 377 { 378 IDB_TRACE("IDBRequest::onSuccess(key, primaryKey, value)"); 375 379 if (!shouldEnqueueEvent()) 376 380 return; 377 381 378 382 ASSERT(m_pendingCursor); 379 setResultCursor(m_pendingCursor.release() );383 setResultCursor(m_pendingCursor.release(), key, primaryKey, value); 380 384 enqueueEvent(createSuccessEvent()); 381 385 } … … 449 453 cursorToNotify = getResultCursor(); 450 454 if (cursorToNotify) 451 cursorToNotify->setValueReady( );455 cursorToNotify->setValueReady(m_cursorKey.release(), m_cursorPrimaryKey.release(), m_cursorValue.release()); 452 456 } 453 457 -
trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h
r125231 r125568 83 83 virtual void onSuccess(PassRefPtr<DOMStringList>); 84 84 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>); 85 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface> );85 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>, PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue>); 86 86 virtual void onSuccess(PassRefPtr<IDBKey>); 87 87 virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>); 88 88 virtual void onSuccess(PassRefPtr<SerializedScriptValue>); 89 89 virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&); 90 virtual void onSuccess WithContinuation();90 virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue>); 91 91 virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) { ASSERT_NOT_REACHED(); } // Not implemented. Callback should not reach the renderer side. 92 92 virtual void onBlocked(); … … 124 124 125 125 PassRefPtr<IDBCursor> getResultCursor(); 126 void setResultCursor(PassRefPtr<IDBCursor> );126 void setResultCursor(PassRefPtr<IDBCursor>, PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue>); 127 127 128 128 RefPtr<IDBAny> m_source; … … 138 138 IDBCursor::Direction m_cursorDirection; 139 139 RefPtr<IDBCursor> m_pendingCursor; 140 RefPtr<IDBKey> m_cursorKey; 141 RefPtr<IDBKey> m_cursorPrimaryKey; 142 RefPtr<SerializedScriptValue> m_cursorValue; 140 143 141 144 EventTargetData m_eventTargetData; -
trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
r123569 r125568 109 109 virtual void onError(PassRefPtr<IDBDatabaseError>) OVERRIDE { } 110 110 virtual void onSuccess(PassRefPtr<DOMStringList>) OVERRIDE { } 111 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface> ) OVERRIDE { }111 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>, PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) OVERRIDE { } 112 112 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>) OVERRIDE { } 113 113 virtual void onSuccess(PassRefPtr<IDBKey>) OVERRIDE { } … … 115 115 virtual void onSuccess(PassRefPtr<SerializedScriptValue>) OVERRIDE { } 116 116 virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&) OVERRIDE { } 117 virtual void onSuccess WithContinuation() OVERRIDE { }117 virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) OVERRIDE { } 118 118 virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) OVERRIDE { } 119 119 virtual void onBlocked() OVERRIDE { } … … 491 491 } 492 492 493 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface> idbCursor )493 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface> idbCursor, PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue> value) 494 494 { 495 495 m_idbCursor = idbCursor; 496 onSuccess WithContinuation();497 } 498 499 virtual void onSuccess WithContinuation()496 onSuccess(key, primaryKey, value); 497 } 498 499 virtual void onSuccess(PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue> value) 500 500 { 501 501 if (m_skipCount) { … … 510 510 } 511 511 512 RefPtr<IDBKey> key = m_idbCursor->key();513 RefPtr<IDBKey> primaryKey = m_idbCursor->primaryKey();514 RefPtr<SerializedScriptValue> value = m_idbCursor->value();515 512 RefPtr<TypeBuilder::Runtime::RemoteObject> wrappedValue = m_injectedScript.wrapSerializedObject(value.get(), String()); 516 513 RefPtr<DataEntry> dataEntry = DataEntry::create() -
trunk/Source/WebKit/chromium/ChangeLog
r125561 r125568 1 2012-08-14 Joshua Bell <jsbell@chromium.org> 2 3 IndexedDB: Pass cursor continue results back in callback 4 https://bugs.webkit.org/show_bug.cgi?id=92278 5 6 Reviewed by Tony Chang. 7 8 Supply the updated cursor key/primaryKey/value in the success callback, 9 rather than forcing the callee to make three calls into the back end to 10 fetch them. Callbacks onSuccess(cursor) and onSuccessWithContinuation() 11 are given the three new payload parameters (and the latter is renamed.) 12 13 * public/WebIDBCallbacks.h: 14 (WebIDBCallbacks): 15 (WebKit::WebIDBCallbacks::onSuccess): Replace with no-op stub. 16 (WebKit::WebIDBCallbacks::onSuccessWithContinuation): Ditto. 17 * public/WebIDBCursor.h: 18 (WebIDBCursor): Methods can be removed once Chromium is cleaned up. 19 * src/IDBCallbacksProxy.cpp: Updated callbacks. 20 (WebKit::IDBCallbacksProxy::onSuccess): 21 (WebKit): 22 * src/IDBCallbacksProxy.h: Updated callbacks. 23 (IDBCallbacksProxy): 24 * src/IDBCursorBackendProxy.cpp: Remove back end accessors. 25 * src/IDBCursorBackendProxy.h: 26 (IDBCursorBackendProxy): 27 * src/WebIDBCallbacksImpl.cpp: Updated callbacks. 28 (WebKit::WebIDBCallbacksImpl::onSuccess): 29 * src/WebIDBCallbacksImpl.h: Updated callbacks. 30 (WebIDBCallbacksImpl): 31 * src/WebIDBCursorImpl.cpp: Remove back end accessors. 32 * src/WebIDBCursorImpl.h: Remove back end accessors. 33 (WebIDBCursorImpl): 34 * tests/IDBAbortOnCorruptTest.cpp: Update test stubs. 35 (WebCore::MockIDBCallbacks::onSuccess): 36 * tests/IDBDatabaseBackendTest.cpp: Ditto. 37 * tests/IDBRequestTest.cpp: Ditto. 38 1 39 2012-08-14 Peter Beverloo <peter@chromium.org> 2 40 -
trunk/Source/WebKit/chromium/public/WebIDBCallbacks.h
r124382 r125568 51 51 virtual void onError(const WebIDBDatabaseError&) { WEBKIT_ASSERT_NOT_REACHED(); } 52 52 virtual void onSuccess(const WebDOMStringList&) { WEBKIT_ASSERT_NOT_REACHED(); } 53 virtual void onSuccess(WebIDBCursor*) { WEBKIT_ASSERT_NOT_REACHED(); }54 // FIXME: Temporary no-op method to allow callers to update before WK92278 lands.55 virtual void onSuccess(WebIDBCursor*, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebSerializedScriptValue&) { }53 // FIXME: Remove this no-op method when callers are updated. 54 virtual void onSuccess(WebIDBCursor*) { } 55 virtual void onSuccess(WebIDBCursor*, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebSerializedScriptValue&) { WEBKIT_ASSERT_NOT_REACHED(); } 56 56 virtual void onSuccess(WebIDBDatabase*) { WEBKIT_ASSERT_NOT_REACHED(); } 57 57 virtual void onSuccess(const WebIDBKey&) { WEBKIT_ASSERT_NOT_REACHED(); } … … 59 59 virtual void onSuccess(const WebSerializedScriptValue&) { WEBKIT_ASSERT_NOT_REACHED(); } 60 60 virtual void onSuccess(const WebSerializedScriptValue&, const WebIDBKey&, const WebIDBKeyPath&) { WEBKIT_ASSERT_NOT_REACHED(); } 61 virtual void onSuccessWithContinuation() { WEBKIT_ASSERT_NOT_REACHED(); }62 // FIXME: Temporary no-op method to allow callers to update before WK92278 lands.63 virtual void onSuccess(const WebIDBKey& key, const WebIDBKey& primaryKey, const WebSerializedScriptValue&) { }61 // FIXME: Remove this no-op method when callers are updated. 62 virtual void onSuccessWithContinuation() { } 63 virtual void onSuccess(const WebIDBKey& key, const WebIDBKey& primaryKey, const WebSerializedScriptValue&) { WEBKIT_ASSERT_NOT_REACHED(); } 64 64 virtual void onBlocked() { WEBKIT_ASSERT_NOT_REACHED(); } 65 65 virtual void onBlocked(long long oldVersion) { WEBKIT_ASSERT_NOT_REACHED(); } -
trunk/Source/WebKit/chromium/public/WebIDBCursor.h
r125084 r125568 48 48 }; 49 49 50 // FIXME: Remove these methods when callers are updated. 50 51 virtual WebIDBKey key() const 51 52 { -
trunk/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
r123569 r125568 69 69 } 70 70 71 void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBCursorBackendInterface> idbCursorBackend )71 void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBCursorBackendInterface> idbCursorBackend, PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue> value) 72 72 { 73 m_callbacks->onSuccess(new WebIDBCursorImpl(idbCursorBackend) );73 m_callbacks->onSuccess(new WebIDBCursorImpl(idbCursorBackend), key, primaryKey, value); 74 74 } 75 75 … … 103 103 m_callbacks->onSuccess(serializedScriptValue, key, keyPath); 104 104 } 105 void IDBCallbacksProxy::onSuccessWithContinuation() 105 106 void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue> value) 106 107 { 107 m_callbacks->onSuccess WithContinuation();108 m_callbacks->onSuccess(key, primaryKey, value); 108 109 } 109 110 -
trunk/Source/WebKit/chromium/src/IDBCallbacksProxy.h
r121185 r125568 48 48 virtual void onError(PassRefPtr<WebCore::IDBDatabaseError>); 49 49 virtual void onSuccess(PassRefPtr<WebCore::DOMStringList>); 50 virtual void onSuccess(PassRefPtr<WebCore::IDBCursorBackendInterface> );50 virtual void onSuccess(PassRefPtr<WebCore::IDBCursorBackendInterface>, PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBKey> primaryKey, PassRefPtr<WebCore::SerializedScriptValue>); 51 51 virtual void onSuccess(PassRefPtr<WebCore::IDBDatabaseBackendInterface>); 52 52 virtual void onSuccess(PassRefPtr<WebCore::IDBKey>); … … 54 54 virtual void onSuccess(PassRefPtr<WebCore::SerializedScriptValue>); 55 55 virtual void onSuccess(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, const WebCore::IDBKeyPath&); 56 virtual void onSuccess WithContinuation();56 virtual void onSuccess(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBKey> primaryKey, PassRefPtr<WebCore::SerializedScriptValue>); 57 57 virtual void onSuccessWithPrefetch(const Vector<RefPtr<WebCore::IDBKey> >& keys, const Vector<RefPtr<WebCore::IDBKey> >& primaryKeys, const Vector<RefPtr<WebCore::SerializedScriptValue> >& values); 58 58 virtual void onBlocked(); -
trunk/Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp
r123843 r125568 55 55 } 56 56 57 PassRefPtr<IDBKey> IDBCursorBackendProxy::key() const58 {59 return m_idbCursor->key();60 }61 62 PassRefPtr<IDBKey> IDBCursorBackendProxy::primaryKey() const63 {64 return m_idbCursor->primaryKey();65 }66 67 PassRefPtr<SerializedScriptValue> IDBCursorBackendProxy::value() const68 {69 return m_idbCursor->value();70 }71 72 57 void IDBCursorBackendProxy::advance(unsigned long count, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec) 73 58 { -
trunk/Source/WebKit/chromium/src/IDBCursorBackendProxy.h
r123843 r125568 43 43 virtual ~IDBCursorBackendProxy(); 44 44 45 virtual PassRefPtr<WebCore::IDBKey> key() const;46 virtual PassRefPtr<WebCore::IDBKey> primaryKey() const;47 virtual PassRefPtr<WebCore::SerializedScriptValue> value() const;48 45 virtual void advance(unsigned long, PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&); 49 46 virtual void continueFunction(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&); -
trunk/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
r121477 r125568 66 66 } 67 67 68 void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor )68 void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebSerializedScriptValue& value) 69 69 { 70 m_callbacks->onSuccess(IDBCursorBackendProxy::create(adoptPtr(cursor)) );70 m_callbacks->onSuccess(IDBCursorBackendProxy::create(adoptPtr(cursor)), key, primaryKey, value); 71 71 } 72 72 … … 96 96 } 97 97 98 void WebIDBCallbacksImpl::onSuccess WithContinuation()98 void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key, const WebIDBKey& primaryKey, const WebSerializedScriptValue& value) 99 99 { 100 m_callbacks->onSuccess WithContinuation();100 m_callbacks->onSuccess(key, primaryKey, value); 101 101 } 102 102 -
trunk/Source/WebKit/chromium/src/WebIDBCallbacksImpl.h
r121185 r125568 44 44 virtual void onError(const WebIDBDatabaseError&); 45 45 virtual void onSuccess(const WebDOMStringList&); 46 virtual void onSuccess(WebIDBCursor* );46 virtual void onSuccess(WebIDBCursor*, const WebIDBKey&, const WebIDBKey& primaryKey, const WebSerializedScriptValue&); 47 47 virtual void onSuccess(WebIDBDatabase*); 48 48 virtual void onSuccess(const WebIDBKey&); … … 50 50 virtual void onSuccess(const WebSerializedScriptValue&); 51 51 virtual void onSuccess(const WebSerializedScriptValue&, const WebIDBKey&, const WebIDBKeyPath&); 52 virtual void onSuccess WithContinuation();52 virtual void onSuccess(const WebIDBKey&, const WebIDBKey& primaryKey, const WebSerializedScriptValue&); 53 53 virtual void onBlocked(); 54 54 -
trunk/Source/WebKit/chromium/src/WebIDBCursorImpl.cpp
r123843 r125568 48 48 } 49 49 50 WebIDBKey WebIDBCursorImpl::key() const51 {52 return m_idbCursorBackend->key();53 }54 55 WebIDBKey WebIDBCursorImpl::primaryKey() const56 {57 return m_idbCursorBackend->primaryKey();58 }59 60 WebSerializedScriptValue WebIDBCursorImpl::value() const61 {62 return m_idbCursorBackend->value();63 }64 65 50 void WebIDBCursorImpl::advance(unsigned long count, WebIDBCallbacks* callbacks, WebExceptionCode& ec) 66 51 { -
trunk/Source/WebKit/chromium/src/WebIDBCursorImpl.h
r123843 r125568 45 45 virtual ~WebIDBCursorImpl(); 46 46 47 virtual WebIDBKey key() const;48 virtual WebIDBKey primaryKey() const;49 virtual WebSerializedScriptValue value() const;50 47 virtual void advance(unsigned long, WebIDBCallbacks*, WebExceptionCode&); 51 48 virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&); -
trunk/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
r124675 r125568 52 52 } 53 53 virtual void onSuccess(PassRefPtr<DOMStringList>) { } 54 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface> ) { }54 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>, PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) { } 55 55 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>) 56 56 { … … 61 61 virtual void onSuccess(PassRefPtr<SerializedScriptValue>) { } 62 62 virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&) { } 63 virtual void onSuccess WithContinuation() { }63 virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) { }; 64 64 virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) { } 65 65 virtual void onBlocked() { } -
trunk/Source/WebKit/chromium/tests/IDBDatabaseBackendTest.cpp
r123585 r125568 78 78 virtual void onError(PassRefPtr<IDBDatabaseError>) OVERRIDE { } 79 79 virtual void onSuccess(PassRefPtr<DOMStringList>) OVERRIDE { } 80 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface> ) OVERRIDE { }80 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>, PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) OVERRIDE { } 81 81 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>) OVERRIDE 82 82 { … … 87 87 virtual void onSuccess(PassRefPtr<SerializedScriptValue>) OVERRIDE { } 88 88 virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&) OVERRIDE { }; 89 virtual void onSuccess WithContinuation() OVERRIDE { }89 virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) OVERRIDE { }; 90 90 virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) OVERRIDE { } 91 91 virtual void onBlocked() OVERRIDE { } -
trunk/Source/WebKit/chromium/tests/IDBRequestTest.cpp
r124974 r125568 52 52 request->onSuccess(DOMStringList::create()); 53 53 request->onSuccess(PassRefPtr<IDBDatabaseBackendInterface>()); 54 request->onSuccess(PassRefPtr<IDBCursorBackendInterface>() );54 request->onSuccess(PassRefPtr<IDBCursorBackendInterface>(), IDBKey::createInvalid(), IDBKey::createInvalid(), SerializedScriptValue::nullValue()); 55 55 request->onSuccess(IDBKey::createInvalid()); 56 56 request->onSuccess(PassRefPtr<IDBTransactionBackendInterface>()); 57 57 request->onSuccess(SerializedScriptValue::nullValue()); 58 58 request->onSuccess(SerializedScriptValue::nullValue(), IDBKey::createInvalid(), IDBKeyPath()); 59 request->onSuccess WithContinuation();59 request->onSuccess(IDBKey::createInvalid(), IDBKey::createInvalid(), SerializedScriptValue::nullValue()); 60 60 } 61 61
Note: See TracChangeset
for help on using the changeset viewer.