Index: chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc |
diff --git a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc |
index d0af866717515b2e9ae3a6c681f1f5c41fe9ab98..2e41fe905cd55783d723bcc6dd03a2e12be50b16 100644 |
--- a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc |
+++ b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc |
@@ -124,6 +124,7 @@ bool IndexedDBDispatcherHost::OnMessageReceived(const IPC::Message& message) { |
case ViewHostMsg_IDBObjectStoreRemoveIndex::ID: |
case ViewHostMsg_IDBObjectStoreDestroyed::ID: |
case ViewHostMsg_IDBTransactionDestroyed::ID: |
+ case ViewHostMsg_IDBTransactionObjectStore::ID: |
break; |
default: |
return false; |
@@ -754,6 +755,7 @@ bool IndexedDBDispatcherHost::TransactionDispatcherHost::OnMessageReceived( |
bool handled = true; |
IPC_BEGIN_MESSAGE_MAP_EX(IndexedDBDispatcherHost::TransactionDispatcherHost, |
message, *msg_is_ok) |
+ IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_IDBTransactionObjectStore, OnObjectStore) |
jorlow
2010/08/24 08:46:17
>80
|
IPC_MESSAGE_HANDLER(ViewHostMsg_IDBTransactionDestroyed, OnDestroyed) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
@@ -768,6 +770,21 @@ void IndexedDBDispatcherHost::TransactionDispatcherHost::Send( |
parent_->Send(message); |
} |
+void IndexedDBDispatcherHost::TransactionDispatcherHost::OnObjectStore( |
+ int32 transaction_id, const string16& name, IPC::Message* reply_msg) { |
+ WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess( |
+ &map_, transaction_id, reply_msg, |
+ ViewHostMsg_IDBDatabaseObjectStore::ID); |
+ if (!idb_transaction) |
+ return; |
+ |
+ WebIDBObjectStore* object_store = idb_transaction->objectStore(name); |
+ int32 object_id = object_store ? parent_->Add(object_store) : 0; |
+ ViewHostMsg_IDBTransactionObjectStore::WriteReplyParams( |
+ reply_msg, object_id); |
+ parent_->Send(reply_msg); |
+} |
+ |
void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( |
int32 object_id) { |
parent_->DestroyObject( |