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

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

Issue 1619443002: Move Partitions::initialize() before Platform::initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move Partitions::shutdown out of WTF::shutdown Created 4 years, 11 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
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 static void adjustAmountOfExternalAllocatedMemory(int size) 156 static void adjustAmountOfExternalAllocatedMemory(int size)
157 { 157 {
158 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size); 158 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size);
159 } 159 }
160 160
161 void initializeWithoutV8(Platform* platform) 161 void initializeWithoutV8(Platform* platform)
162 { 162 {
163 ASSERT(!s_webKitInitialized); 163 ASSERT(!s_webKitInitialized);
164 s_webKitInitialized = true; 164 s_webKitInitialized = true;
165 165
166 WTF::Partitions::initialize(histogramEnumerationFunction);
166 ASSERT(platform); 167 ASSERT(platform);
167 Platform::initialize(platform); 168 Platform::initialize(platform);
168 169
169 WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction, hi stogramEnumerationFunction, adjustAmountOfExternalAllocatedMemory); 170 WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction, ad justAmountOfExternalAllocatedMemory);
170 WTF::initializeMainThread(callOnMainThreadFunction); 171 WTF::initializeMainThread(callOnMainThreadFunction);
171 Heap::init(); 172 Heap::init();
172 173
173 ThreadState::attachMainThread(); 174 ThreadState::attachMainThread();
174 // currentThread() is null if we are running on a thread without a message l oop. 175 // currentThread() is null if we are running on a thread without a message l oop.
175 if (WebThread* currentThread = platform->currentThread()) { 176 if (WebThread* currentThread = platform->currentThread()) {
176 ASSERT(!s_gcTaskRunner); 177 ASSERT(!s_gcTaskRunner);
177 s_gcTaskRunner = new GCTaskRunner(currentThread); 178 s_gcTaskRunner = new GCTaskRunner(currentThread);
178 } 179 }
179 180
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 241 }
241 242
242 void shutdownWithoutV8() 243 void shutdownWithoutV8()
243 { 244 {
244 ASSERT(!s_endOfTaskRunner); 245 ASSERT(!s_endOfTaskRunner);
245 CoreInitializer::shutdown(); 246 CoreInitializer::shutdown();
246 Heap::shutdown(); 247 Heap::shutdown();
247 WTF::shutdown(); 248 WTF::shutdown();
248 Platform::shutdown(); 249 Platform::shutdown();
249 WebPrerenderingSupport::shutdown(); 250 WebPrerenderingSupport::shutdown();
251 WTF::Partitions::shutdown();
250 } 252 }
251 253
252 // TODO(tkent): The following functions to wrap LayoutTestSupport should be 254 // TODO(tkent): The following functions to wrap LayoutTestSupport should be
253 // moved to public/platform/. 255 // moved to public/platform/.
254 256
255 void setLayoutTestMode(bool value) 257 void setLayoutTestMode(bool value)
256 { 258 {
257 LayoutTestSupport::setIsRunningLayoutTest(value); 259 LayoutTestSupport::setIsRunningLayoutTest(value);
258 } 260 }
259 261
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 ASSERT(!reloadPages); 303 ASSERT(!reloadPages);
302 Page::refreshPlugins(); 304 Page::refreshPlugins();
303 } 305 }
304 306
305 void decommitFreeableMemory() 307 void decommitFreeableMemory()
306 { 308 {
307 WTF::Partitions::decommitFreeableMemory(); 309 WTF::Partitions::decommitFreeableMemory();
308 } 310 }
309 311
310 } // namespace blink 312 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/testing/RunAllTests.cpp ('k') | third_party/WebKit/Source/wtf/WTF.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698