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

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

Issue 656463004: Use the scheduling mechanism provided by the platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Mike's comments. Created 6 years, 1 month 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 | « Source/platform/scheduler/TracedTask.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 ASSERT(!s_webKitInitialized); 141 ASSERT(!s_webKitInitialized);
142 s_webKitInitialized = true; 142 s_webKitInitialized = true;
143 143
144 ASSERT(platform); 144 ASSERT(platform);
145 Platform::initialize(platform); 145 Platform::initialize(platform);
146 146
147 WTF::setRandomSource(cryptographicallyRandomValues); 147 WTF::setRandomSource(cryptographicallyRandomValues);
148 WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction); 148 WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction);
149 WTF::initializeMainThread(callOnMainThreadFunction); 149 WTF::initializeMainThread(callOnMainThreadFunction);
150 Heap::init(); 150 Heap::init();
151 Scheduler::initializeOnMainThread();
152 151
153 ThreadState::attachMainThread(); 152 ThreadState::attachMainThread();
154 // currentThread will always be non-null in production, but can be null in C hromium unit tests. 153 // currentThread will always be non-null in production, but can be null in C hromium unit tests.
155 if (WebThread* currentThread = platform->currentThread()) { 154 if (WebThread* currentThread = platform->currentThread()) {
156 ASSERT(!s_pendingGCRunner); 155 ASSERT(!s_pendingGCRunner);
157 s_pendingGCRunner = new PendingGCRunner; 156 s_pendingGCRunner = new PendingGCRunner;
158 currentThread->addTaskObserver(s_pendingGCRunner); 157 currentThread->addTaskObserver(s_pendingGCRunner);
159 158
160 ASSERT(!s_messageLoopInterruptor); 159 ASSERT(!s_messageLoopInterruptor);
161 s_messageLoopInterruptor = new MessageLoopInterruptor(currentThread); 160 s_messageLoopInterruptor = new MessageLoopInterruptor(currentThread);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 channel->state = WTFLogChannelOn; 260 channel->state = WTFLogChannelOn;
262 #endif // !LOG_DISABLED 261 #endif // !LOG_DISABLED
263 } 262 }
264 263
265 void resetPluginCache(bool reloadPages) 264 void resetPluginCache(bool reloadPages)
266 { 265 {
267 Page::refreshPlugins(reloadPages); 266 Page::refreshPlugins(reloadPages);
268 } 267 }
269 268
270 } // namespace blink 269 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/scheduler/TracedTask.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698