| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "core/XMLNames.h" | 47 #include "core/XMLNames.h" |
| 48 #include "core/css/parser/CSSParserTokenRange.h" | 48 #include "core/css/parser/CSSParserTokenRange.h" |
| 49 #include "core/dom/Document.h" | 49 #include "core/dom/Document.h" |
| 50 #include "core/dom/StyleChangeReason.h" | 50 #include "core/dom/StyleChangeReason.h" |
| 51 #include "core/events/EventFactory.h" | 51 #include "core/events/EventFactory.h" |
| 52 #include "core/fetch/FetchInitiatorTypeNames.h" | 52 #include "core/fetch/FetchInitiatorTypeNames.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" | |
| 58 #include "platform/PlatformThreadData.h" | 57 #include "platform/PlatformThreadData.h" |
| 59 #include "platform/weborigin/KURL.h" | 58 #include "platform/weborigin/KURL.h" |
| 59 #include "wtf/Partitions.h" |
| 60 #include "wtf/text/StringStatics.h" | 60 #include "wtf/text/StringStatics.h" |
| 61 | 61 |
| 62 namespace blink { | 62 namespace blink { |
| 63 | 63 |
| 64 void CoreInitializer::registerEventFactory() | 64 void CoreInitializer::registerEventFactory() |
| 65 { | 65 { |
| 66 static bool isRegistered = false; | 66 static bool isRegistered = false; |
| 67 if (isRegistered) | 67 if (isRegistered) |
| 68 return; | 68 return; |
| 69 isRegistered = true; | 69 isRegistered = true; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 96 CSSPrimitiveValue::initUnitTable(); | 96 CSSPrimitiveValue::initUnitTable(); |
| 97 CSSParserTokenRange::initStaticEOFToken(); | 97 CSSParserTokenRange::initStaticEOFToken(); |
| 98 | 98 |
| 99 // It would make logical sense to do this in WTF::initialize() but there are | 99 // It would make logical sense to do this in WTF::initialize() but there are |
| 100 // ordering dependencies, e.g. about "xmlns". | 100 // ordering dependencies, e.g. about "xmlns". |
| 101 WTF::StringStatics::init(); | 101 WTF::StringStatics::init(); |
| 102 | 102 |
| 103 StyleChangeExtraData::init(); | 103 StyleChangeExtraData::init(); |
| 104 | 104 |
| 105 QualifiedName::init(); | 105 QualifiedName::init(); |
| 106 Partitions::init(); | 106 WTF::Partitions::initialize(); |
| 107 EventTracer::initialize(); | 107 EventTracer::initialize(); |
| 108 KURL::initialize(); | 108 KURL::initialize(); |
| 109 | 109 |
| 110 registerEventFactory(); | 110 registerEventFactory(); |
| 111 | 111 |
| 112 // Ensure that the main thread's thread-local data is initialized before | 112 // Ensure that the main thread's thread-local data is initialized before |
| 113 // starting any worker threads. | 113 // starting any worker threads. |
| 114 PlatformThreadData::current(); | 114 PlatformThreadData::current(); |
| 115 | 115 |
| 116 StringImpl::freezeStaticStrings(); | 116 StringImpl::freezeStaticStrings(); |
| 117 | 117 |
| 118 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but | 118 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but |
| 119 // does not start the threads. | 119 // does not start the threads. |
| 120 HTMLParserThread::init(); | 120 HTMLParserThread::init(); |
| 121 ScriptStreamerThread::init(); | 121 ScriptStreamerThread::init(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void CoreInitializer::shutdown() | 124 void CoreInitializer::shutdown() |
| 125 { | 125 { |
| 126 // Make sure we stop the HTMLParserThread before Platform::current() is | 126 // Make sure we stop the HTMLParserThread before Platform::current() is |
| 127 // cleared. | 127 // cleared. |
| 128 HTMLParserThread::shutdown(); | 128 HTMLParserThread::shutdown(); |
| 129 | 129 |
| 130 Partitions::shutdown(); | 130 WTF::Partitions::shutdown(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 } // namespace blink | 133 } // namespace blink |
| OLD | NEW |