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 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "Init.h" | 32 #include "Init.h" |
33 | 33 |
| 34 #include "bindings/core/v8/ScriptStreamerThread.h" |
34 #include "core/EventNames.h" | 35 #include "core/EventNames.h" |
35 #include "core/EventTargetNames.h" | 36 #include "core/EventTargetNames.h" |
36 #include "core/EventTypeNames.h" | 37 #include "core/EventTypeNames.h" |
37 #include "core/FetchInitiatorTypeNames.h" | 38 #include "core/FetchInitiatorTypeNames.h" |
38 #include "core/HTMLNames.h" | 39 #include "core/HTMLNames.h" |
39 #include "core/HTMLTokenizerNames.h" | 40 #include "core/HTMLTokenizerNames.h" |
40 #include "core/InputTypeNames.h" | 41 #include "core/InputTypeNames.h" |
41 #include "core/MathMLNames.h" | 42 #include "core/MathMLNames.h" |
42 #include "core/MediaFeatureNames.h" | 43 #include "core/MediaFeatureNames.h" |
43 #include "core/MediaTypeNames.h" | 44 #include "core/MediaTypeNames.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 EventTracer::initialize(); | 100 EventTracer::initialize(); |
100 | 101 |
101 registerEventFactory(); | 102 registerEventFactory(); |
102 | 103 |
103 // Ensure that the main thread's thread-local data is initialized before | 104 // Ensure that the main thread's thread-local data is initialized before |
104 // starting any worker threads. | 105 // starting any worker threads. |
105 PlatformThreadData::current(); | 106 PlatformThreadData::current(); |
106 | 107 |
107 StringImpl::freezeStaticStrings(); | 108 StringImpl::freezeStaticStrings(); |
108 | 109 |
109 // Creates HTMLParserThread::shared, but does not start the thread. | 110 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but |
| 111 // does not start the threads. |
110 HTMLParserThread::init(); | 112 HTMLParserThread::init(); |
| 113 ScriptStreamerThread::init(); |
111 } | 114 } |
112 | 115 |
113 void CoreInitializer::shutdown() | 116 void CoreInitializer::shutdown() |
114 { | 117 { |
115 // Make sure we stop the HTMLParserThread before Platform::current() is clea
red. | 118 // Make sure we stop the HTMLParserThread and ScriptStreamerThread before |
| 119 // Platform::current() is cleared. |
| 120 ScriptStreamerThread::shutdown(); |
116 HTMLParserThread::shutdown(); | 121 HTMLParserThread::shutdown(); |
117 | 122 |
118 // Make sure we stop WorkerThreads before Partition::shutdown() which frees
ExecutionContext. | 123 // Make sure we stop WorkerThreads before Partition::shutdown() which frees
ExecutionContext. |
119 WorkerThread::terminateAndWaitForAllWorkers(); | 124 WorkerThread::terminateAndWaitForAllWorkers(); |
120 | 125 |
121 Partitions::shutdown(); | 126 Partitions::shutdown(); |
122 } | 127 } |
123 | 128 |
124 } // namespace blink | 129 } // namespace blink |
OLD | NEW |