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

Side by Side Diff: content/worker/worker_thread.cc

Issue 19641008: Implement ChildThread::shutdown and clear members that have refs into blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/utility/utility_thread_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/worker/worker_thread.h" 5 #include "content/worker/worker_thread.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/thread_local.h" 9 #include "base/threading/thread_local.h"
10 #include "content/child/appcache_dispatcher.h" 10 #include "content/child/appcache_dispatcher.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 channel()->AddFilter(indexed_db_message_filter_.get()); 51 channel()->AddFilter(indexed_db_message_filter_.get());
52 52
53 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 53 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
54 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); 54 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line);
55 } 55 }
56 56
57 WorkerThread::~WorkerThread() { 57 WorkerThread::~WorkerThread() {
58 } 58 }
59 59
60 void WorkerThread::Shutdown() { 60 void WorkerThread::Shutdown() {
61 ChildThread::Shutdown();
62
61 // Shutdown in reverse of the initialization order. 63 // Shutdown in reverse of the initialization order.
62 channel()->RemoveFilter(indexed_db_message_filter_.get()); 64 channel()->RemoveFilter(indexed_db_message_filter_.get());
63 indexed_db_message_filter_ = NULL; 65 indexed_db_message_filter_ = NULL;
64 66
65 channel()->RemoveFilter(db_message_filter_.get()); 67 channel()->RemoveFilter(db_message_filter_.get());
66 db_message_filter_ = NULL; 68 db_message_filter_ = NULL;
67 69
68 WebKit::shutdown(); 70 WebKit::shutdown();
69 lazy_tls.Pointer()->Set(NULL); 71 lazy_tls.Pointer()->Set(NULL);
70 } 72 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 110
109 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { 111 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) {
110 worker_stubs_.erase(stub); 112 worker_stubs_.erase(stub);
111 } 113 }
112 114
113 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { 115 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) {
114 worker_stubs_.insert(stub); 116 worker_stubs_.insert(stub);
115 } 117 }
116 118
117 } // namespace content 119 } // namespace content
OLDNEW
« no previous file with comments | « content/utility/utility_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698