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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "core/XMLNames.h" | 48 #include "core/XMLNames.h" |
49 #include "core/css/parser/CSSParserTokenRange.h" | 49 #include "core/css/parser/CSSParserTokenRange.h" |
50 #include "core/dom/Document.h" | 50 #include "core/dom/Document.h" |
51 #include "core/dom/StyleChangeReason.h" | 51 #include "core/dom/StyleChangeReason.h" |
52 #include "core/events/EventFactory.h" | 52 #include "core/events/EventFactory.h" |
53 #include "core/html/parser/HTMLParserThread.h" | 53 #include "core/html/parser/HTMLParserThread.h" |
54 #include "core/workers/WorkerThread.h" | 54 #include "core/workers/WorkerThread.h" |
55 #include "platform/EventTracer.h" | 55 #include "platform/EventTracer.h" |
56 #include "platform/FontFamilyNames.h" | 56 #include "platform/FontFamilyNames.h" |
57 #include "platform/Partitions.h" | 57 #include "platform/Partitions.h" |
58 #include "platform/PlatformThreadData.h" | |
59 #include "platform/weborigin/KURL.h" | 58 #include "platform/weborigin/KURL.h" |
60 #include "wtf/text/StringStatics.h" | 59 #include "wtf/text/StringStatics.h" |
61 | 60 |
62 namespace blink { | 61 namespace blink { |
63 | 62 |
64 void CoreInitializer::registerEventFactory() | 63 void CoreInitializer::registerEventFactory() |
65 { | 64 { |
66 static bool isRegistered = false; | 65 static bool isRegistered = false; |
67 if (isRegistered) | 66 if (isRegistered) |
68 return; | 67 return; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 101 |
103 StyleChangeExtraData::init(); | 102 StyleChangeExtraData::init(); |
104 | 103 |
105 QualifiedName::init(); | 104 QualifiedName::init(); |
106 Partitions::init(); | 105 Partitions::init(); |
107 EventTracer::initialize(); | 106 EventTracer::initialize(); |
108 KURL::initialize(); | 107 KURL::initialize(); |
109 | 108 |
110 registerEventFactory(); | 109 registerEventFactory(); |
111 | 110 |
112 // Ensure that the main thread's thread-local data is initialized before | |
113 // starting any worker threads. | |
114 PlatformThreadData::current(); | |
115 | |
116 StringImpl::freezeStaticStrings(); | 111 StringImpl::freezeStaticStrings(); |
117 | 112 |
118 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but | 113 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but |
119 // does not start the threads. | 114 // does not start the threads. |
120 HTMLParserThread::init(); | 115 HTMLParserThread::init(); |
121 ScriptStreamerThread::init(); | 116 ScriptStreamerThread::init(); |
122 } | 117 } |
123 | 118 |
124 void CoreInitializer::shutdown() | 119 void CoreInitializer::shutdown() |
125 { | 120 { |
126 // Make sure we stop the HTMLParserThread before Platform::current() is | 121 // Make sure we stop the HTMLParserThread before Platform::current() is |
127 // cleared. | 122 // cleared. |
128 HTMLParserThread::shutdown(); | 123 HTMLParserThread::shutdown(); |
129 | 124 |
130 Partitions::shutdown(); | 125 Partitions::shutdown(); |
131 } | 126 } |
132 | 127 |
133 } // namespace blink | 128 } // namespace blink |
OLD | NEW |