| OLD | NEW |
| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 static bool s_webKitInitialized = false; | 94 static bool s_webKitInitialized = false; |
| 95 | 95 |
| 96 void initialize(Platform* platform) | 96 void initialize(Platform* platform) |
| 97 { | 97 { |
| 98 initializeWithoutV8(platform); | 98 initializeWithoutV8(platform); |
| 99 | 99 |
| 100 V8Initializer::initializeMainThreadIfNeeded(); | 100 V8Initializer::initializeMainThreadIfNeeded(); |
| 101 | 101 |
| 102 s_isolateInterruptor = new V8IsolateInterruptor(V8PerIsolateData::mainThread
Isolate()); | 102 s_isolateInterruptor = new V8IsolateInterruptor(V8PerIsolateData::mainThread
Isolate()); |
| 103 ThreadState::current()->addInterruptor(s_isolateInterruptor); | 103 ThreadState::current()->addInterruptor(s_isolateInterruptor); |
| 104 ThreadState::current()->registerTraceDOMWrappers(V8PerIsolateData::mainThrea
dIsolate(), V8GCController::traceDOMWrappers); |
| 104 | 105 |
| 105 // currentThread will always be non-null in production, but can be null in C
hromium unit tests. | 106 // currentThread will always be non-null in production, but can be null in C
hromium unit tests. |
| 106 if (WebThread* currentThread = platform->currentThread()) { | 107 if (WebThread* currentThread = platform->currentThread()) { |
| 107 ASSERT(!s_endOfTaskRunner); | 108 ASSERT(!s_endOfTaskRunner); |
| 108 s_endOfTaskRunner = new EndOfTaskRunner; | 109 s_endOfTaskRunner = new EndOfTaskRunner; |
| 109 currentThread->addTaskObserver(s_endOfTaskRunner); | 110 currentThread->addTaskObserver(s_endOfTaskRunner); |
| 110 } | 111 } |
| 111 } | 112 } |
| 112 | 113 |
| 113 v8::Isolate* mainThreadIsolate() | 114 v8::Isolate* mainThreadIsolate() |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 channel->state = WTFLogChannelOn; | 256 channel->state = WTFLogChannelOn; |
| 256 #endif // !LOG_DISABLED | 257 #endif // !LOG_DISABLED |
| 257 } | 258 } |
| 258 | 259 |
| 259 void resetPluginCache(bool reloadPages) | 260 void resetPluginCache(bool reloadPages) |
| 260 { | 261 { |
| 261 Page::refreshPlugins(reloadPages); | 262 Page::refreshPlugins(reloadPages); |
| 262 } | 263 } |
| 263 | 264 |
| 264 } // namespace blink | 265 } // namespace blink |
| OLD | NEW |