| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 StyleChangeExtraData::init(); | 134 StyleChangeExtraData::init(); |
| 135 | 135 |
| 136 KURL::initialize(); | 136 KURL::initialize(); |
| 137 SchemeRegistry::initialize(); | 137 SchemeRegistry::initialize(); |
| 138 SecurityPolicy::init(); | 138 SecurityPolicy::init(); |
| 139 | 139 |
| 140 registerEventFactory(); | 140 registerEventFactory(); |
| 141 | 141 |
| 142 StringImpl::freezeStaticStrings(); | 142 StringImpl::freezeStaticStrings(); |
| 143 | 143 |
| 144 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but | |
| 145 // does not start the threads. | |
| 146 if (!RuntimeEnabledFeatures::parseHTMLOnMainThreadEnabled()) | |
| 147 HTMLParserThread::init(); | |
| 148 ScriptStreamerThread::init(); | 144 ScriptStreamerThread::init(); |
| 149 } | 145 } |
| 150 | 146 |
| 151 void CoreInitializer::shutdown() { | 147 void CoreInitializer::shutdown() { |
| 152 // Shutdown V8-related background threads before V8 is ramped down. Note | 148 // Shutdown V8-related background threads before V8 is ramped down. Note |
| 153 // that this will wait the thread to stop its operations. | 149 // that this will wait the thread to stop its operations. |
| 154 ScriptStreamerThread::shutdown(); | 150 ScriptStreamerThread::shutdown(); |
| 155 | 151 |
| 156 // Make sure we stop the HTMLParserThread before Platform::current() is | |
| 157 // cleared. | |
| 158 ASSERT(Platform::current()); | 152 ASSERT(Platform::current()); |
| 159 if (!RuntimeEnabledFeatures::parseHTMLOnMainThreadEnabled()) | |
| 160 HTMLParserThread::shutdown(); | |
| 161 | 153 |
| 162 WorkerThread::terminateAndWaitForAllWorkers(); | 154 WorkerThread::terminateAndWaitForAllWorkers(); |
| 163 } | 155 } |
| 164 | 156 |
| 165 } // namespace blink | 157 } // namespace blink |
| OLD | NEW |