OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/in_process_webkit/indexed_db_dispatcher_host.h" | 5 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
10 #include "chrome/browser/metrics/user_metrics.h" | 10 #include "chrome/browser/metrics/user_metrics.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 *thread = BrowserThread::WEBKIT; | 106 *thread = BrowserThread::WEBKIT; |
107 } | 107 } |
108 | 108 |
109 bool IndexedDBDispatcherHost::OnMessageReceived(const IPC::Message& message, | 109 bool IndexedDBDispatcherHost::OnMessageReceived(const IPC::Message& message, |
110 bool* message_was_ok) { | 110 bool* message_was_ok) { |
111 if (IPC_MESSAGE_CLASS(message) != IndexedDBMsgStart) | 111 if (IPC_MESSAGE_CLASS(message) != IndexedDBMsgStart) |
112 return false; | 112 return false; |
113 | 113 |
114 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); | 114 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); |
115 | 115 |
| 116 // TODO(dgrogan): The page cycler test can crash here because |
| 117 // database_dispatcher_host_ becomes invalid. |
116 bool handled = | 118 bool handled = |
117 database_dispatcher_host_->OnMessageReceived(message, message_was_ok) || | 119 database_dispatcher_host_->OnMessageReceived(message, message_was_ok) || |
118 index_dispatcher_host_->OnMessageReceived(message, message_was_ok) || | 120 index_dispatcher_host_->OnMessageReceived(message, message_was_ok) || |
119 object_store_dispatcher_host_->OnMessageReceived( | 121 object_store_dispatcher_host_->OnMessageReceived( |
120 message, message_was_ok) || | 122 message, message_was_ok) || |
121 cursor_dispatcher_host_->OnMessageReceived(message, message_was_ok) || | 123 cursor_dispatcher_host_->OnMessageReceived(message, message_was_ok) || |
122 transaction_dispatcher_host_->OnMessageReceived(message, message_was_ok); | 124 transaction_dispatcher_host_->OnMessageReceived(message, message_was_ok); |
123 | 125 |
124 if (!handled) { | 126 if (!handled) { |
125 handled = true; | 127 handled = true; |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 if (!idb_transaction) | 1058 if (!idb_transaction) |
1057 return; | 1059 return; |
1058 | 1060 |
1059 idb_transaction->didCompleteTaskEvents(); | 1061 idb_transaction->didCompleteTaskEvents(); |
1060 } | 1062 } |
1061 | 1063 |
1062 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( | 1064 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( |
1063 int32 object_id) { | 1065 int32 object_id) { |
1064 parent_->DestroyObject(&map_, object_id); | 1066 parent_->DestroyObject(&map_, object_id); |
1065 } | 1067 } |
OLD | NEW |