summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc5
-rw-r--r--chrome/common/render_messages_internal.h5
-rw-r--r--chrome/renderer/renderer_webidbdatabase_impl.cc8
-rw-r--r--chrome/renderer/renderer_webidbtransaction_impl.cc5
-rw-r--r--chrome/renderer/renderer_webidbtransaction_impl.h3
5 files changed, 16 insertions, 10 deletions
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 5ddbfe4..1c41dfa 100644
--- a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
+++ b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
@@ -1136,10 +1136,11 @@ void IndexedDBDispatcherHost::TransactionDispatcherHost::OnObjectStore(
if (!idb_transaction)
return;
- WebIDBObjectStore* object_store = idb_transaction->objectStore(name);
+ WebExceptionCode ec = 0;
+ WebIDBObjectStore* object_store = idb_transaction->objectStore(name, ec);
int32 object_id = object_store ? parent_->Add(object_store) : 0;
ViewHostMsg_IDBTransactionObjectStore::WriteReplyParams(
- reply_msg, object_id);
+ reply_msg, object_id, ec);
parent_->Send(reply_msg);
}
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index d1fd78d..ef392b4 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -2641,10 +2641,11 @@ IPC_BEGIN_MESSAGES(ViewHost)
int32 /* idb_cursor_id */)
// IDBTransaction::ObjectStore message.
- IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_IDBTransactionObjectStore,
+ IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_IDBTransactionObjectStore,
int32, /* transaction_id */
string16, /* name */
- int32 /* object_store_id */)
+ int32, /* object_store_id */
+ WebKit::WebExceptionCode /* ec */)
// WebIDBTransaction::mode() message.
IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_IDBTransactionMode,
diff --git a/chrome/renderer/renderer_webidbdatabase_impl.cc b/chrome/renderer/renderer_webidbdatabase_impl.cc
index 874342f..25137da 100644
--- a/chrome/renderer/renderer_webidbdatabase_impl.cc
+++ b/chrome/renderer/renderer_webidbdatabase_impl.cc
@@ -110,15 +110,17 @@ WebKit::WebIDBTransaction* RendererWebIDBDatabaseImpl::transaction(
unsigned short mode,
unsigned long timeout,
WebExceptionCode& ec) {
- std::vector<string16> object_stores(names.length());
- for (unsigned int i = 0; i < names.length(); ++i) {
+ std::vector<string16> object_stores;
+ object_stores.reserve(names.length());
+ for (unsigned int i = 0; i < names.length(); ++i)
object_stores.push_back(names.item(i));
- }
int transaction_id;
RenderThread::current()->Send(
new ViewHostMsg_IDBDatabaseTransaction(
idb_database_id_, object_stores, mode,
timeout, &transaction_id, &ec));
+ if (!transaction_id)
+ return NULL;
return new RendererWebIDBTransactionImpl(transaction_id);
}
diff --git a/chrome/renderer/renderer_webidbtransaction_impl.cc b/chrome/renderer/renderer_webidbtransaction_impl.cc
index f918275..b1b024e 100644
--- a/chrome/renderer/renderer_webidbtransaction_impl.cc
+++ b/chrome/renderer/renderer_webidbtransaction_impl.cc
@@ -35,12 +35,13 @@ int RendererWebIDBTransactionImpl::mode() const
}
WebIDBObjectStore* RendererWebIDBTransactionImpl::objectStore(
- const WebString& name)
+ const WebString& name,
+ WebKit::WebExceptionCode& ec)
{
int object_store_id;
RenderThread::current()->Send(
new ViewHostMsg_IDBTransactionObjectStore(
- idb_transaction_id_, name, &object_store_id));
+ idb_transaction_id_, name, &object_store_id, &ec));
if (!object_store_id)
return NULL;
return new RendererWebIDBObjectStoreImpl(object_store_id);
diff --git a/chrome/renderer/renderer_webidbtransaction_impl.h b/chrome/renderer/renderer_webidbtransaction_impl.h
index 728bafe..282dd63 100644
--- a/chrome/renderer/renderer_webidbtransaction_impl.h
+++ b/chrome/renderer/renderer_webidbtransaction_impl.h
@@ -21,7 +21,8 @@ class RendererWebIDBTransactionImpl : public WebKit::WebIDBTransaction {
virtual ~RendererWebIDBTransactionImpl();
virtual int mode() const;
- virtual WebKit::WebIDBObjectStore* objectStore(const WebKit::WebString& name);
+ virtual WebKit::WebIDBObjectStore* objectStore(const WebKit::WebString& name,
+ WebKit::WebExceptionCode&);
virtual void abort();
virtual void didCompleteTaskEvents();
virtual void setCallbacks(WebKit::WebIDBTransactionCallbacks*);