Index: content/common/indexed_db/indexed_db_dispatcher.cc |
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc |
index e308357b062e96aeb710841797266c67e067bc07..be3903dc127607a4342ddcffa663514a39b64009 100644 |
--- a/content/common/indexed_db/indexed_db_dispatcher.cc |
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc |
@@ -22,6 +22,7 @@ |
using base::ThreadLocalPointer; |
using content::IndexedDBKey; |
+using content::IndexedDBKeyPath; |
using content::IndexedDBKeyRange; |
using content::SerializedScriptValue; |
using WebKit::WebDOMStringList; |
@@ -99,6 +100,8 @@ void IndexedDBDispatcher::OnMessageReceived(const IPC::Message& msg) { |
OnSuccessStringList) |
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessSerializedScriptValue, |
OnSuccessSerializedScriptValue) |
+ IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessSerializedScriptValueWithKey, |
+ OnSuccessSerializedScriptValueWithKey) |
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksError, OnError) |
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksBlocked, OnBlocked) |
IPC_MESSAGE_HANDLER(IndexedDBMsg_TransactionCallbacksAbort, OnAbort) |
@@ -605,6 +608,19 @@ void IndexedDBDispatcher::OnSuccessSerializedScriptValue( |
pending_callbacks_.Remove(response_id); |
} |
+void IndexedDBDispatcher::OnSuccessSerializedScriptValueWithKey( |
+ int32 thread_id, int32 response_id, |
+ const SerializedScriptValue& value, |
+ const IndexedDBKey& primary_key, |
+ const IndexedDBKeyPath& key_path) { |
+ DCHECK_EQ(thread_id, CurrentWorkerId()); |
+ WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(response_id); |
+ if (!callbacks) |
+ return; |
+ callbacks->onSuccess(value, primary_key, key_path); |
+ pending_callbacks_.Remove(response_id); |
+} |
+ |
void IndexedDBDispatcher::OnSuccessOpenCursor( |
const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p) { |
DCHECK_EQ(p.thread_id, CurrentWorkerId()); |