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/V8ScriptStreamerThread.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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 | 111 |
111 initBindings(); | 112 initBindings(); |
112 registerEventFactory(); | 113 registerEventFactory(); |
113 | 114 |
114 // Ensure that the main thread's thread-local data is initialized before | 115 // Ensure that the main thread's thread-local data is initialized before |
115 // starting any worker threads. | 116 // starting any worker threads. |
116 PlatformThreadData::current(); | 117 PlatformThreadData::current(); |
117 | 118 |
118 StringImpl::freezeStaticStrings(); | 119 StringImpl::freezeStaticStrings(); |
119 | 120 |
120 // Creates HTMLParserThread::shared, but does not start the thread. | 121 // Creates HTMLParserThread::shared and V8ScriptStreamerThread::shared, but |
122 // does not start the threads. | |
121 HTMLParserThread::init(); | 123 HTMLParserThread::init(); |
124 V8ScriptStreamerThread::init(); | |
122 } | 125 } |
123 | 126 |
124 void CoreInitializer::shutdown() | 127 void CoreInitializer::shutdown() |
125 { | 128 { |
126 // Make sure we stop the HTMLParserThread before Platform::current() is clea red. | 129 // Make sure we stop the HTMLParserThread and V8ScriptStreamerThread before |
130 // Platform::current() is cleared. | |
127 HTMLParserThread::shutdown(); | 131 HTMLParserThread::shutdown(); |
132 V8ScriptStreamerThread::shutdown(); | |
haraken
2014/08/17 16:05:28
We want to shutdown threads in the reverse order o
marja
2014/08/20 11:45:56
Done. I guess it'd only make a difference if the t
haraken
2014/08/20 15:00:19
I don't know any specific cases where the order ma
| |
128 | 133 |
129 Partitions::shutdown(); | 134 Partitions::shutdown(); |
130 } | 135 } |
131 | 136 |
132 } // namespace blink | 137 } // namespace blink |
OLD | NEW |