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 28 matching lines...) Expand all Loading... | |
39 #include "core/HTMLNames.h" | 39 #include "core/HTMLNames.h" |
40 #include "core/HTMLTokenizerNames.h" | 40 #include "core/HTMLTokenizerNames.h" |
41 #include "core/InputTypeNames.h" | 41 #include "core/InputTypeNames.h" |
42 #include "core/MathMLNames.h" | 42 #include "core/MathMLNames.h" |
43 #include "core/MediaFeatureNames.h" | 43 #include "core/MediaFeatureNames.h" |
44 #include "core/MediaTypeNames.h" | 44 #include "core/MediaTypeNames.h" |
45 #include "core/SVGNames.h" | 45 #include "core/SVGNames.h" |
46 #include "core/XLinkNames.h" | 46 #include "core/XLinkNames.h" |
47 #include "core/XMLNSNames.h" | 47 #include "core/XMLNSNames.h" |
48 #include "core/XMLNames.h" | 48 #include "core/XMLNames.h" |
49 #include "core/css/invalidation/DescendantInvalidationSet.h" | |
50 #include "core/css/invalidation/StyleInvalidator.h" | |
49 #include "core/dom/Document.h" | 51 #include "core/dom/Document.h" |
50 #include "core/dom/StyleChangeReason.h" | 52 #include "core/dom/StyleChangeReason.h" |
51 #include "core/events/EventFactory.h" | 53 #include "core/events/EventFactory.h" |
52 #include "core/html/parser/HTMLParserThread.h" | 54 #include "core/html/parser/HTMLParserThread.h" |
53 #include "core/workers/WorkerThread.h" | 55 #include "core/workers/WorkerThread.h" |
54 #include "platform/EventTracer.h" | 56 #include "platform/EventTracer.h" |
55 #include "platform/FontFamilyNames.h" | 57 #include "platform/FontFamilyNames.h" |
56 #include "platform/Partitions.h" | 58 #include "platform/Partitions.h" |
57 #include "platform/PlatformThreadData.h" | 59 #include "platform/PlatformThreadData.h" |
58 #include "platform/heap/Heap.h" | 60 #include "platform/heap/Heap.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 | 96 |
95 // It would make logical sense to do this in WTF::initialize() but there are | 97 // It would make logical sense to do this in WTF::initialize() but there are |
96 // ordering dependencies, e.g. about "xmlns". | 98 // ordering dependencies, e.g. about "xmlns". |
97 WTF::StringStatics::init(); | 99 WTF::StringStatics::init(); |
98 | 100 |
99 StyleChangeExtraData::init(); | 101 StyleChangeExtraData::init(); |
100 | 102 |
101 QualifiedName::init(); | 103 QualifiedName::init(); |
102 Partitions::init(); | 104 Partitions::init(); |
103 EventTracer::initialize(); | 105 EventTracer::initialize(); |
106 DescendantInvalidationSet::init(); // Depends on EventTracer::initialize() | |
pdr.
2014/10/14 01:36:47
Are these still needed?
kouhei (in TOK)
2014/10/14 02:02:10
Yes. These caches pointers to tracing flag. Accoun
kouhei (in TOK)
2014/10/14 04:18:13
Discussed offline. I changed these flags to be ini
| |
107 StyleInvalidator::init(); // Depends on EventTracer::initialize() | |
104 | 108 |
105 registerEventFactory(); | 109 registerEventFactory(); |
106 | 110 |
107 // Ensure that the main thread's thread-local data is initialized before | 111 // Ensure that the main thread's thread-local data is initialized before |
108 // starting any worker threads. | 112 // starting any worker threads. |
109 PlatformThreadData::current(); | 113 PlatformThreadData::current(); |
110 | 114 |
111 StringImpl::freezeStaticStrings(); | 115 StringImpl::freezeStaticStrings(); |
112 | 116 |
113 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but | 117 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but |
114 // does not start the threads. | 118 // does not start the threads. |
115 HTMLParserThread::init(); | 119 HTMLParserThread::init(); |
116 ScriptStreamerThread::init(); | 120 ScriptStreamerThread::init(); |
117 } | 121 } |
118 | 122 |
119 void CoreInitializer::shutdown() | 123 void CoreInitializer::shutdown() |
120 { | 124 { |
121 // Make sure we stop the HTMLParserThread and ScriptStreamerThread before | 125 // Make sure we stop the HTMLParserThread and ScriptStreamerThread before |
122 // Platform::current() is cleared. | 126 // Platform::current() is cleared. |
123 ScriptStreamerThread::shutdown(); | 127 ScriptStreamerThread::shutdown(); |
124 HTMLParserThread::shutdown(); | 128 HTMLParserThread::shutdown(); |
125 | 129 |
126 // Make sure we stop WorkerThreads before Partition::shutdown() which frees ExecutionContext. | 130 // Make sure we stop WorkerThreads before Partition::shutdown() which frees ExecutionContext. |
127 WorkerThread::terminateAndWaitForAllWorkers(); | 131 WorkerThread::terminateAndWaitForAllWorkers(); |
128 | 132 |
129 Partitions::shutdown(); | 133 Partitions::shutdown(); |
130 } | 134 } |
131 | 135 |
132 } // namespace blink | 136 } // namespace blink |
OLD | NEW |