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

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

Issue 1779733002: Move code to register Oilpan's interruptor to V8Initializer::initialize (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/bindings/core/v8/V8Initializer.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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void initialize(Platform* platform) 101 void initialize(Platform* platform)
102 { 102 {
103 initializeWithoutV8(platform); 103 initializeWithoutV8(platform);
104 104
105 modulesInitializer().init(); 105 modulesInitializer().init();
106 setIndexedDBClientCreateFunction(IndexedDBClientImpl::create); 106 setIndexedDBClientCreateFunction(IndexedDBClientImpl::create);
107 107
108 V8Initializer::initializeMainThread(); 108 V8Initializer::initializeMainThread();
109 109
110 OwnPtr<V8IsolateInterruptor> interruptor = adoptPtr(new V8IsolateInterruptor (V8PerIsolateData::mainThreadIsolate()));
111 ThreadState::current()->addInterruptor(interruptor.release());
112 ThreadState::current()->registerTraceDOMWrappers(V8PerIsolateData::mainThrea dIsolate(), V8GCController::traceDOMWrappers);
113
114 // currentThread is null if we are running on a thread without a message loo p. 110 // currentThread is null if we are running on a thread without a message loo p.
115 if (WebThread* currentThread = platform->currentThread()) { 111 if (WebThread* currentThread = platform->currentThread()) {
116 ASSERT(!s_endOfTaskRunner); 112 ASSERT(!s_endOfTaskRunner);
117 s_endOfTaskRunner = new EndOfTaskRunner; 113 s_endOfTaskRunner = new EndOfTaskRunner;
118 currentThread->addTaskObserver(s_endOfTaskRunner); 114 currentThread->addTaskObserver(s_endOfTaskRunner);
119 115
120 // Register web cache dump provider for tracing. 116 // Register web cache dump provider for tracing.
121 platform->registerMemoryDumpProvider(WebCacheMemoryDumpProvider::instanc e(), "MemoryCache"); 117 platform->registerMemoryDumpProvider(WebCacheMemoryDumpProvider::instanc e(), "MemoryCache");
122 platform->registerMemoryDumpProvider(FontCacheMemoryDumpProvider::instan ce(), "FontCaches"); 118 platform->registerMemoryDumpProvider(FontCacheMemoryDumpProvider::instan ce(), "FontCaches");
123 } 119 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // message loop, because the message loop is already destructed before 193 // message loop, because the message loop is already destructed before
198 // the shutdown() is called. 194 // the shutdown() is called.
199 delete s_endOfTaskRunner; 195 delete s_endOfTaskRunner;
200 s_endOfTaskRunner = nullptr; 196 s_endOfTaskRunner = nullptr;
201 } 197 }
202 198
203 // Shutdown V8-related background threads before V8 is ramped down. Note 199 // Shutdown V8-related background threads before V8 is ramped down. Note
204 // that this will wait the thread to stop its operations. 200 // that this will wait the thread to stop its operations.
205 ScriptStreamerThread::shutdown(); 201 ScriptStreamerThread::shutdown();
206 202
207 ThreadState::current()->unregisterTraceDOMWrappers();
208
209 V8Initializer::shutdownMainThread(); 203 V8Initializer::shutdownMainThread();
210 204
211 modulesInitializer().shutdown(); 205 modulesInitializer().shutdown();
212 206
213 shutdownWithoutV8(); 207 shutdownWithoutV8();
214 } 208 }
215 209
216 void shutdownWithoutV8() 210 void shutdownWithoutV8()
217 { 211 {
218 ASSERT(isMainThread()); 212 ASSERT(isMainThread());
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 ASSERT(!reloadPages); 281 ASSERT(!reloadPages);
288 Page::refreshPlugins(); 282 Page::refreshPlugins();
289 } 283 }
290 284
291 void decommitFreeableMemory() 285 void decommitFreeableMemory()
292 { 286 {
293 WTF::Partitions::decommitFreeableMemory(); 287 WTF::Partitions::decommitFreeableMemory();
294 } 288 }
295 289
296 } // namespace blink 290 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698