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

Side by Side Diff: third_party/WebKit/Source/web/WebKit.cpp

Issue 1776183004: Move ScriptStreamerThread::shutdown to CoreInitializer::shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/Init.cpp ('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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 { 175 {
176 #if defined(LEAK_SANITIZER) 176 #if defined(LEAK_SANITIZER)
177 // If LSan is about to perform leak detection, release all the registered 177 // If LSan is about to perform leak detection, release all the registered
178 // static Persistent<> root references to global caches that Blink keeps, 178 // static Persistent<> root references to global caches that Blink keeps,
179 // followed by GCs to clear out all they referred to. A full v8 GC cycle 179 // followed by GCs to clear out all they referred to. A full v8 GC cycle
180 // is needed to flush out all garbage. 180 // is needed to flush out all garbage.
181 // 181 //
182 // This is not needed for caches over non-Oilpan objects, as they're 182 // This is not needed for caches over non-Oilpan objects, as they're
183 // not scanned by LSan due to being held in non-global storage 183 // not scanned by LSan due to being held in non-global storage
184 // ("static" references inside functions/methods.) 184 // ("static" references inside functions/methods.)
185 if (ThreadState* threadState = ThreadState::current()) { 185 if (ThreadState* threadState = ThreadState::current()) {
haraken 2016/03/09 13:02:36 Sigbjorn: Not related to this CL, do you think we
sof 2016/03/09 16:53:20 The comment is just out of date -- getting all the
186 threadState->releaseStaticPersistentNodes(); 186 threadState->releaseStaticPersistentNodes();
187 Heap::collectAllGarbage(); 187 Heap::collectAllGarbage();
188 } 188 }
189 #endif 189 #endif
190 190
191 // currentThread() is null if we are running on a thread without a message l oop. 191 // currentThread() is null if we are running on a thread without a message l oop.
192 if (Platform::current()->currentThread()) { 192 if (Platform::current()->currentThread()) {
193 Platform::current()->unregisterMemoryDumpProvider(WebCacheMemoryDumpProv ider::instance()); 193 Platform::current()->unregisterMemoryDumpProvider(WebCacheMemoryDumpProv ider::instance());
194 Platform::current()->unregisterMemoryDumpProvider(FontCacheMemoryDumpPro vider::instance()); 194 Platform::current()->unregisterMemoryDumpProvider(FontCacheMemoryDumpPro vider::instance());
195 195
196 // We don't need to (cannot) remove s_endOfTaskRunner from the current 196 // We don't need to (cannot) remove s_endOfTaskRunner from the current
197 // message loop, because the message loop is already destructed before 197 // message loop, because the message loop is already destructed before
198 // the shutdown() is called. 198 // the shutdown() is called.
199 delete s_endOfTaskRunner; 199 delete s_endOfTaskRunner;
200 s_endOfTaskRunner = nullptr; 200 s_endOfTaskRunner = nullptr;
201 } 201 }
202 202
203 // Shutdown V8-related background threads before V8 is ramped down. Note
204 // that this will wait the thread to stop its operations.
205 ScriptStreamerThread::shutdown();
206
207 ThreadState::current()->unregisterTraceDOMWrappers(); 203 ThreadState::current()->unregisterTraceDOMWrappers();
208 204
209 V8Initializer::shutdownMainThread(); 205 V8Initializer::shutdownMainThread();
210 206
211 modulesInitializer().shutdown(); 207 modulesInitializer().shutdown();
212 208
213 shutdownWithoutV8(); 209 shutdownWithoutV8();
214 } 210 }
215 211
216 void shutdownWithoutV8() 212 void shutdownWithoutV8()
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 ASSERT(!reloadPages); 283 ASSERT(!reloadPages);
288 Page::refreshPlugins(); 284 Page::refreshPlugins();
289 } 285 }
290 286
291 void decommitFreeableMemory() 287 void decommitFreeableMemory()
292 { 288 {
293 WTF::Partitions::decommitFreeableMemory(); 289 WTF::Partitions::decommitFreeableMemory();
294 } 290 }
295 291
296 } // namespace blink 292 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/Init.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698