| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 StringImpl::freezeStaticStrings(); | 138 StringImpl::freezeStaticStrings(); |
| 139 | 139 |
| 140 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but | 140 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but |
| 141 // does not start the threads. | 141 // does not start the threads. |
| 142 HTMLParserThread::init(); | 142 HTMLParserThread::init(); |
| 143 ScriptStreamerThread::init(); | 143 ScriptStreamerThread::init(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void CoreInitializer::shutdown() | 146 void CoreInitializer::shutdown() |
| 147 { | 147 { |
| 148 // Shutdown V8-related background threads before V8 is ramped down. Note |
| 149 // that this will wait the thread to stop its operations. |
| 150 ScriptStreamerThread::shutdown(); |
| 151 |
| 148 // Make sure we stop the HTMLParserThread before Platform::current() is | 152 // Make sure we stop the HTMLParserThread before Platform::current() is |
| 149 // cleared. | 153 // cleared. |
| 150 ASSERT(Platform::current()); | 154 ASSERT(Platform::current()); |
| 151 HTMLParserThread::shutdown(); | 155 HTMLParserThread::shutdown(); |
| 152 | 156 |
| 153 WorkerThread::terminateAndWaitForAllWorkers(); | 157 WorkerThread::terminateAndWaitForAllWorkers(); |
| 154 } | 158 } |
| 155 | 159 |
| 156 } // namespace blink | 160 } // namespace blink |
| OLD | NEW |