Index: webkit/tools/test_shell/simple_appcache_system.cc |
=================================================================== |
--- webkit/tools/test_shell/simple_appcache_system.cc (revision 65856) |
+++ webkit/tools/test_shell/simple_appcache_system.cc (working copy) |
@@ -390,7 +390,6 @@ |
DCHECK(!io_message_loop_); |
io_message_loop_ = MessageLoop::current(); |
- io_message_loop_->AddDestructionObserver(this); |
if (!db_thread_.IsRunning()) |
db_thread_.Start(); |
@@ -406,6 +405,19 @@ |
AppCacheInterceptor::EnsureRegistered(); |
} |
+void SimpleAppCacheSystem::CleanupIOThread() { |
+ DCHECK(is_io_thread()); |
+ |
+ delete backend_impl_; |
+ delete service_; |
+ backend_impl_ = NULL; |
+ service_ = NULL; |
+ io_message_loop_ = NULL; |
+ |
+ // Just in case the main thread is waiting on it. |
+ backend_proxy_->SignalEvent(); |
+} |
+ |
WebApplicationCacheHost* SimpleAppCacheSystem::CreateCacheHostForWebKit( |
WebApplicationCacheHostClient* client) { |
if (!is_initailized_on_ui_thread()) |
@@ -438,16 +450,3 @@ |
request, cache_id, manifest_url); |
} |
} |
- |
-void SimpleAppCacheSystem::WillDestroyCurrentMessageLoop() { |
- DCHECK(is_io_thread()); |
- |
- delete backend_impl_; |
- delete service_; |
- backend_impl_ = NULL; |
- service_ = NULL; |
- io_message_loop_ = NULL; |
- |
- // Just in case the main thread is waiting on it. |
- backend_proxy_->SignalEvent(); |
-} |