OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/scoped_vector.h" | |
10 #include "base/process/process.h" | 11 #include "base/process/process.h" |
11 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "content/browser/child_process_security_policy_impl.h" | |
13 #include "content/browser/indexed_db/indexed_db_callbacks.h" | 15 #include "content/browser/indexed_db/indexed_db_callbacks.h" |
14 #include "content/browser/indexed_db/indexed_db_connection.h" | 16 #include "content/browser/indexed_db/indexed_db_connection.h" |
15 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 17 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
16 #include "content/browser/indexed_db/indexed_db_cursor.h" | 18 #include "content/browser/indexed_db/indexed_db_cursor.h" |
17 #include "content/browser/indexed_db/indexed_db_database_callbacks.h" | 19 #include "content/browser/indexed_db/indexed_db_database_callbacks.h" |
18 #include "content/browser/indexed_db/indexed_db_metadata.h" | 20 #include "content/browser/indexed_db/indexed_db_metadata.h" |
19 #include "content/browser/indexed_db/indexed_db_pending_connection.h" | 21 #include "content/browser/indexed_db/indexed_db_pending_connection.h" |
20 #include "content/browser/indexed_db/indexed_db_value.h" | 22 #include "content/browser/indexed_db/indexed_db_value.h" |
21 #include "content/browser/renderer_host/render_message_filter.h" | 23 #include "content/browser/renderer_host/render_message_filter.h" |
22 #include "content/common/indexed_db/indexed_db_messages.h" | 24 #include "content/common/indexed_db/indexed_db_messages.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 // Note that we explicitly separate CloseAll() from destruction of the | 111 // Note that we explicitly separate CloseAll() from destruction of the |
110 // DatabaseDispatcherHost, since CloseAll() can invoke callbacks which need to | 112 // DatabaseDispatcherHost, since CloseAll() can invoke callbacks which need to |
111 // be dispatched through database_dispatcher_host_. | 113 // be dispatched through database_dispatcher_host_. |
112 database_dispatcher_host_->CloseAll(); | 114 database_dispatcher_host_->CloseAll(); |
113 database_dispatcher_host_.reset(); | 115 database_dispatcher_host_.reset(); |
114 cursor_dispatcher_host_.reset(); | 116 cursor_dispatcher_host_.reset(); |
115 } | 117 } |
116 | 118 |
117 base::TaskRunner* IndexedDBDispatcherHost::OverrideTaskRunnerForMessage( | 119 base::TaskRunner* IndexedDBDispatcherHost::OverrideTaskRunnerForMessage( |
118 const IPC::Message& message) { | 120 const IPC::Message& message) { |
119 if (IPC_MESSAGE_CLASS(message) == IndexedDBMsgStart) | 121 if (IPC_MESSAGE_CLASS(message) == IndexedDBMsgStart) { |
120 return indexed_db_context_->TaskRunner(); | 122 if (message.type() != IndexedDBHostMsg_DatabasePut::ID) |
jsbell
2014/04/11 16:19:57
&& instead of nested ifs?
ericu
2014/04/14 23:23:38
Done.
| |
123 return indexed_db_context_->TaskRunner(); | |
124 } | |
121 return NULL; | 125 return NULL; |
122 } | 126 } |
123 | 127 |
124 bool IndexedDBDispatcherHost::OnMessageReceived(const IPC::Message& message, | 128 bool IndexedDBDispatcherHost::OnMessageReceived(const IPC::Message& message, |
125 bool* message_was_ok) { | 129 bool* message_was_ok) { |
126 if (IPC_MESSAGE_CLASS(message) != IndexedDBMsgStart) | 130 if (IPC_MESSAGE_CLASS(message) != IndexedDBMsgStart) |
127 return false; | 131 return false; |
128 | 132 |
129 DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 133 DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread() || |
134 message.type() == IndexedDBHostMsg_DatabasePut::ID); | |
130 | 135 |
131 bool handled = | 136 bool handled = |
132 database_dispatcher_host_->OnMessageReceived(message, message_was_ok) || | 137 database_dispatcher_host_->OnMessageReceived(message, message_was_ok) || |
133 cursor_dispatcher_host_->OnMessageReceived(message, message_was_ok); | 138 cursor_dispatcher_host_->OnMessageReceived(message, message_was_ok); |
134 | 139 |
135 if (!handled) { | 140 if (!handled) { |
136 handled = true; | 141 handled = true; |
137 IPC_BEGIN_MESSAGE_MAP_EX(IndexedDBDispatcherHost, message, *message_was_ok) | 142 IPC_BEGIN_MESSAGE_MAP_EX(IndexedDBDispatcherHost, message, *message_was_ok) |
138 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_FactoryGetDatabaseNames, | 143 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_FactoryGetDatabaseNames, |
139 OnIDBFactoryGetDatabaseNames) | 144 OnIDBFactoryGetDatabaseNames) |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
327 DCHECK(request_context_); | 332 DCHECK(request_context_); |
328 Context()->GetIDBFactory()->DeleteDatabase( | 333 Context()->GetIDBFactory()->DeleteDatabase( |
329 params.name, | 334 params.name, |
330 request_context_, | 335 request_context_, |
331 new IndexedDBCallbacks( | 336 new IndexedDBCallbacks( |
332 this, params.ipc_thread_id, params.ipc_callbacks_id), | 337 this, params.ipc_thread_id, params.ipc_callbacks_id), |
333 origin_url, | 338 origin_url, |
334 indexed_db_path); | 339 indexed_db_path); |
335 } | 340 } |
336 | 341 |
342 // OnPutHelper exists only to allow us to hop threads while holding a reference | |
343 // to the IndexedDBDispatcherHost. | |
344 void IndexedDBDispatcherHost::OnPutHelper( | |
345 const IndexedDBHostMsg_DatabasePut_Params& params, | |
346 std::vector<webkit_blob::BlobDataHandle*> handles) { | |
347 database_dispatcher_host_->OnPut(params, handles); | |
348 } | |
349 | |
337 void IndexedDBDispatcherHost::OnAckReceivedBlobs( | 350 void IndexedDBDispatcherHost::OnAckReceivedBlobs( |
338 const std::vector<std::string>& uuids) { | 351 const std::vector<std::string>& uuids) { |
339 DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 352 DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
340 std::vector<std::string>::const_iterator iter; | 353 std::vector<std::string>::const_iterator iter; |
341 for (iter = uuids.begin(); iter != uuids.end(); ++iter) | 354 for (iter = uuids.begin(); iter != uuids.end(); ++iter) |
342 DropBlobDataHandle(*iter); | 355 DropBlobDataHandle(*iter); |
343 } | 356 } |
344 | 357 |
345 void IndexedDBDispatcherHost::FinishTransaction(int64 host_transaction_id, | 358 void IndexedDBDispatcherHost::FinishTransaction(int64 host_transaction_id, |
346 bool committed) { | 359 bool committed) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
444 if (connection && connection->IsConnected()) { | 457 if (connection && connection->IsConnected()) { |
445 connection->Close(); | 458 connection->Close(); |
446 parent_->Context()->ConnectionClosed(iter->second, connection); | 459 parent_->Context()->ConnectionClosed(iter->second, connection); |
447 } | 460 } |
448 } | 461 } |
449 } | 462 } |
450 | 463 |
451 bool IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMessageReceived( | 464 bool IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMessageReceived( |
452 const IPC::Message& message, | 465 const IPC::Message& message, |
453 bool* msg_is_ok) { | 466 bool* msg_is_ok) { |
467 | |
454 DCHECK( | 468 DCHECK( |
469 (message.type() == IndexedDBHostMsg_DatabasePut::ID) || | |
455 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 470 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
471 | |
456 bool handled = true; | 472 bool handled = true; |
457 IPC_BEGIN_MESSAGE_MAP_EX( | 473 IPC_BEGIN_MESSAGE_MAP_EX( |
458 IndexedDBDispatcherHost::DatabaseDispatcherHost, message, *msg_is_ok) | 474 IndexedDBDispatcherHost::DatabaseDispatcherHost, message, *msg_is_ok) |
459 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCreateObjectStore, | 475 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCreateObjectStore, |
460 OnCreateObjectStore) | 476 OnCreateObjectStore) |
461 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDeleteObjectStore, | 477 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDeleteObjectStore, |
462 OnDeleteObjectStore) | 478 OnDeleteObjectStore) |
463 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCreateTransaction, | 479 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCreateTransaction, |
464 OnCreateTransaction) | 480 OnCreateTransaction) |
465 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseClose, OnClose) | 481 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseClose, OnClose) |
466 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDestroyed, OnDestroyed) | 482 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDestroyed, OnDestroyed) |
467 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseGet, OnGet) | 483 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseGet, OnGet) |
468 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabasePut, OnPut) | 484 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabasePut, OnPutWrapper) |
469 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseSetIndexKeys, OnSetIndexKeys) | 485 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseSetIndexKeys, OnSetIndexKeys) |
470 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseSetIndexesReady, | 486 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseSetIndexesReady, |
471 OnSetIndexesReady) | 487 OnSetIndexesReady) |
472 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseOpenCursor, OnOpenCursor) | 488 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseOpenCursor, OnOpenCursor) |
473 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCount, OnCount) | 489 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCount, OnCount) |
474 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDeleteRange, OnDeleteRange) | 490 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDeleteRange, OnDeleteRange) |
475 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseClear, OnClear) | 491 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseClear, OnClear) |
476 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCreateIndex, OnCreateIndex) | 492 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCreateIndex, OnCreateIndex) |
477 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDeleteIndex, OnDeleteIndex) | 493 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDeleteIndex, OnDeleteIndex) |
478 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseAbort, OnAbort) | 494 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseAbort, OnAbort) |
479 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCommit, OnCommit) | 495 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCommit, OnCommit) |
480 IPC_MESSAGE_UNHANDLED(handled = false) | 496 IPC_MESSAGE_UNHANDLED(handled = false) |
481 IPC_END_MESSAGE_MAP() | 497 IPC_END_MESSAGE_MAP() |
498 | |
482 return handled; | 499 return handled; |
483 } | 500 } |
484 | 501 |
485 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateObjectStore( | 502 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateObjectStore( |
486 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params) { | 503 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params) { |
487 DCHECK( | 504 DCHECK( |
488 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 505 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
489 IndexedDBConnection* connection = | 506 IndexedDBConnection* connection = |
490 parent_->GetOrTerminateProcess(&map_, params.ipc_database_id); | 507 parent_->GetOrTerminateProcess(&map_, params.ipc_database_id); |
491 if (!connection || !connection->IsConnected()) | 508 if (!connection || !connection->IsConnected()) |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
581 parent_, params.ipc_thread_id, params.ipc_callbacks_id)); | 598 parent_, params.ipc_thread_id, params.ipc_callbacks_id)); |
582 connection->database()->Get( | 599 connection->database()->Get( |
583 parent_->HostTransactionId(params.transaction_id), | 600 parent_->HostTransactionId(params.transaction_id), |
584 params.object_store_id, | 601 params.object_store_id, |
585 params.index_id, | 602 params.index_id, |
586 make_scoped_ptr(new IndexedDBKeyRange(params.key_range)), | 603 make_scoped_ptr(new IndexedDBKeyRange(params.key_range)), |
587 params.key_only, | 604 params.key_only, |
588 callbacks); | 605 callbacks); |
589 } | 606 } |
590 | 607 |
608 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnPutWrapper( | |
609 const IndexedDBHostMsg_DatabasePut_Params& params) { | |
610 std::vector<webkit_blob::BlobDataHandle*> handles; | |
611 for (size_t i = 0; i < params.blob_or_file_info.size(); ++i) { | |
612 const IndexedDBMsg_BlobOrFileInfo& info = params.blob_or_file_info[i]; | |
613 handles.push_back(parent_->blob_storage_context_->context() | |
614 ->GetBlobDataFromUUID(info.uuid) | |
615 .release()); | |
616 } | |
617 parent_->indexed_db_context_->TaskRunner()->PostTask( | |
618 FROM_HERE, | |
619 base::Bind( | |
620 &IndexedDBDispatcherHost::OnPutHelper, parent_, params, handles)); | |
621 } | |
622 | |
591 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnPut( | 623 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnPut( |
592 const IndexedDBHostMsg_DatabasePut_Params& params) { | 624 const IndexedDBHostMsg_DatabasePut_Params& params, |
625 std::vector<webkit_blob::BlobDataHandle*> handles) { | |
626 | |
593 DCHECK( | 627 DCHECK( |
594 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 628 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
595 | 629 |
630 ScopedVector<webkit_blob::BlobDataHandle> scoped_handles; | |
631 scoped_handles.swap(handles); | |
632 | |
596 IndexedDBConnection* connection = | 633 IndexedDBConnection* connection = |
597 parent_->GetOrTerminateProcess(&map_, params.ipc_database_id); | 634 parent_->GetOrTerminateProcess(&map_, params.ipc_database_id); |
598 if (!connection || !connection->IsConnected()) | 635 if (!connection || !connection->IsConnected()) |
599 return; | 636 return; |
600 scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks( | 637 scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks( |
601 parent_, params.ipc_thread_id, params.ipc_callbacks_id)); | 638 parent_, params.ipc_thread_id, params.ipc_callbacks_id)); |
602 | 639 |
603 int64 host_transaction_id = parent_->HostTransactionId(params.transaction_id); | 640 int64 host_transaction_id = parent_->HostTransactionId(params.transaction_id); |
641 | |
642 std::vector<IndexedDBBlobInfo> blob_info(params.blob_or_file_info.size()); | |
643 | |
644 ChildProcessSecurityPolicyImpl* policy = | |
645 ChildProcessSecurityPolicyImpl::GetInstance(); | |
646 | |
647 for (size_t i = 0; i < params.blob_or_file_info.size(); ++i) { | |
648 const IndexedDBMsg_BlobOrFileInfo& info = params.blob_or_file_info[i]; | |
649 if (info.is_file) { | |
650 base::FilePath path = base::FilePath::FromUTF16Unsafe(info.file_path); | |
651 if (!policy->CanReadFile(parent_->ipc_process_id_, path)) { | |
652 parent_->BadMessageReceived(); | |
653 return; | |
654 } | |
655 blob_info[i] = IndexedDBBlobInfo(path, info.file_name, info.mime_type); | |
656 } else { | |
657 blob_info[i] = IndexedDBBlobInfo(info.uuid, info.mime_type, info.size); | |
658 } | |
659 } | |
660 | |
604 // TODO(alecflett): Avoid a copy here. | 661 // TODO(alecflett): Avoid a copy here. |
605 IndexedDBValue value; | 662 IndexedDBValue value; |
606 value.bits = params.value; | 663 value.bits = params.value; |
664 value.blob_info.swap(blob_info); | |
607 connection->database()->Put( | 665 connection->database()->Put( |
608 host_transaction_id, | 666 host_transaction_id, |
609 params.object_store_id, | 667 params.object_store_id, |
610 &value, | 668 &value, |
669 &scoped_handles, | |
611 make_scoped_ptr(new IndexedDBKey(params.key)), | 670 make_scoped_ptr(new IndexedDBKey(params.key)), |
612 static_cast<IndexedDBDatabase::PutMode>(params.put_mode), | 671 static_cast<IndexedDBDatabase::PutMode>(params.put_mode), |
613 callbacks, | 672 callbacks, |
614 params.index_keys); | 673 params.index_keys); |
615 TransactionIDToSizeMap* map = | 674 TransactionIDToSizeMap* map = |
616 &parent_->database_dispatcher_host_->transaction_size_map_; | 675 &parent_->database_dispatcher_host_->transaction_size_map_; |
617 // Size can't be big enough to overflow because it represents the | 676 // Size can't be big enough to overflow because it represents the |
618 // actual bytes passed through IPC. | 677 // actual bytes passed through IPC. |
619 (*map)[host_transaction_id] += params.value.size(); | 678 (*map)[host_transaction_id] += params.value.size(); |
620 } | 679 } |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
817 IndexedDBDispatcherHost* parent) | 876 IndexedDBDispatcherHost* parent) |
818 : parent_(parent) { | 877 : parent_(parent) { |
819 map_.set_check_on_null_data(true); | 878 map_.set_check_on_null_data(true); |
820 } | 879 } |
821 | 880 |
822 IndexedDBDispatcherHost::CursorDispatcherHost::~CursorDispatcherHost() {} | 881 IndexedDBDispatcherHost::CursorDispatcherHost::~CursorDispatcherHost() {} |
823 | 882 |
824 bool IndexedDBDispatcherHost::CursorDispatcherHost::OnMessageReceived( | 883 bool IndexedDBDispatcherHost::CursorDispatcherHost::OnMessageReceived( |
825 const IPC::Message& message, | 884 const IPC::Message& message, |
826 bool* msg_is_ok) { | 885 bool* msg_is_ok) { |
827 DCHECK( | |
828 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | |
829 | |
830 bool handled = true; | 886 bool handled = true; |
831 IPC_BEGIN_MESSAGE_MAP_EX( | 887 IPC_BEGIN_MESSAGE_MAP_EX( |
832 IndexedDBDispatcherHost::CursorDispatcherHost, message, *msg_is_ok) | 888 IndexedDBDispatcherHost::CursorDispatcherHost, message, *msg_is_ok) |
833 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorAdvance, OnAdvance) | 889 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorAdvance, OnAdvance) |
834 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorContinue, OnContinue) | 890 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorContinue, OnContinue) |
835 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorPrefetch, OnPrefetch) | 891 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorPrefetch, OnPrefetch) |
836 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorPrefetchReset, OnPrefetchReset) | 892 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorPrefetchReset, OnPrefetchReset) |
837 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorDestroyed, OnDestroyed) | 893 IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorDestroyed, OnDestroyed) |
838 IPC_MESSAGE_UNHANDLED(handled = false) | 894 IPC_MESSAGE_UNHANDLED(handled = false) |
839 IPC_END_MESSAGE_MAP() | 895 IPC_END_MESSAGE_MAP() |
896 | |
897 DCHECK( | |
898 !handled || | |
899 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | |
900 | |
840 return handled; | 901 return handled; |
841 } | 902 } |
842 | 903 |
843 void IndexedDBDispatcherHost::CursorDispatcherHost::OnAdvance( | 904 void IndexedDBDispatcherHost::CursorDispatcherHost::OnAdvance( |
844 int32 ipc_cursor_id, | 905 int32 ipc_cursor_id, |
845 int32 ipc_thread_id, | 906 int32 ipc_thread_id, |
846 int32 ipc_callbacks_id, | 907 int32 ipc_callbacks_id, |
847 unsigned long count) { | 908 unsigned long count) { |
848 DCHECK( | 909 DCHECK( |
849 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 910 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
913 } | 974 } |
914 | 975 |
915 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( | 976 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( |
916 int32 ipc_object_id) { | 977 int32 ipc_object_id) { |
917 DCHECK( | 978 DCHECK( |
918 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 979 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
919 parent_->DestroyObject(&map_, ipc_object_id); | 980 parent_->DestroyObject(&map_, ipc_object_id); |
920 } | 981 } |
921 | 982 |
922 } // namespace content | 983 } // namespace content |
OLD | NEW |