Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2902)

Unified Diff: content/renderer/renderer_webidbdatabase_impl.cc

Issue 8747002: Dispatch IndexedDB IPC messages to worker threads (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: repurpose obsolete indexed-db switch to control idb on workers Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/renderer_webidbdatabase_impl.cc
diff --git a/content/renderer/renderer_webidbdatabase_impl.cc b/content/renderer/renderer_webidbdatabase_impl.cc
index bb230e0c6c90ed7da5f0211ca2da10c7ebe667a1..9e8ac4ebc17188577e77d3bce0720f9bd9df0bae 100644
--- a/content/renderer/renderer_webidbdatabase_impl.cc
+++ b/content/renderer/renderer_webidbdatabase_impl.cc
@@ -97,7 +97,7 @@ void RendererWebIDBDatabaseImpl::setVersion(
WebIDBCallbacks* callbacks,
WebExceptionCode& ec) {
IndexedDBDispatcher* dispatcher =
- RenderThreadImpl::current()->indexed_db_dispatcher();
+ ChildThread::current()->indexed_db_dispatcher();
dispatcher->RequestIDBDatabaseSetVersion(
version, callbacks, idb_database_id_, &ec);
}
@@ -112,10 +112,8 @@ WebKit::WebIDBTransaction* RendererWebIDBDatabaseImpl::transaction(
object_stores.push_back(names.item(i));
int transaction_id;
- ChildThread::current()->Send(
- new IndexedDBHostMsg_DatabaseTransaction(
- idb_database_id_, object_stores, mode,
- &transaction_id, &ec));
+ ChildThread::current()->Send(new IndexedDBHostMsg_DatabaseTransaction(
+ idb_database_id_, object_stores, mode, &transaction_id, &ec));
if (!transaction_id)
return NULL;
return new RendererWebIDBTransactionImpl(transaction_id);
@@ -123,12 +121,13 @@ WebKit::WebIDBTransaction* RendererWebIDBDatabaseImpl::transaction(
void RendererWebIDBDatabaseImpl::close() {
IndexedDBDispatcher* dispatcher =
- RenderThreadImpl::current()->indexed_db_dispatcher();
+ ChildThread::current()->indexed_db_dispatcher();
dispatcher->RequestIDBDatabaseClose(idb_database_id_);
}
void RendererWebIDBDatabaseImpl::open(WebIDBDatabaseCallbacks* callbacks) {
IndexedDBDispatcher* dispatcher =
- RenderThreadImpl::current()->indexed_db_dispatcher();
+ ChildThread::current()->indexed_db_dispatcher();
+ DCHECK(dispatcher);
dispatcher->RequestIDBDatabaseOpen(callbacks, idb_database_id_);
}

Powered by Google App Engine
This is Rietveld 408576698