| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "core/MediaTypeNames.h" | 42 #include "core/MediaTypeNames.h" |
| 43 #include "core/SVGNames.h" | 43 #include "core/SVGNames.h" |
| 44 #include "core/XLinkNames.h" | 44 #include "core/XLinkNames.h" |
| 45 #include "core/XMLNSNames.h" | 45 #include "core/XMLNSNames.h" |
| 46 #include "core/XMLNames.h" | 46 #include "core/XMLNames.h" |
| 47 #include "core/css/parser/CSSParserTokenRange.h" | 47 #include "core/css/parser/CSSParserTokenRange.h" |
| 48 #include "core/dom/Document.h" | 48 #include "core/dom/Document.h" |
| 49 #include "core/dom/StyleChangeReason.h" | 49 #include "core/dom/StyleChangeReason.h" |
| 50 #include "core/events/EventFactory.h" | 50 #include "core/events/EventFactory.h" |
| 51 #include "core/fetch/FetchInitiatorTypeNames.h" | 51 #include "core/fetch/FetchInitiatorTypeNames.h" |
| 52 #include "core/fetch/WebCacheMemoryDumpProvider.h" | |
| 53 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 52 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| 54 #include "core/html/parser/HTMLParserThread.h" | 53 #include "core/html/parser/HTMLParserThread.h" |
| 55 #include "core/workers/WorkerThread.h" | 54 #include "core/workers/WorkerThread.h" |
| 56 #include "platform/EventTracer.h" | 55 #include "platform/EventTracer.h" |
| 57 #include "platform/FontFamilyNames.h" | 56 #include "platform/FontFamilyNames.h" |
| 58 #include "platform/HTTPNames.h" | 57 #include "platform/HTTPNames.h" |
| 59 #include "platform/weborigin/KURL.h" | 58 #include "platform/weborigin/KURL.h" |
| 60 #include "platform/weborigin/SchemeRegistry.h" | 59 #include "platform/weborigin/SchemeRegistry.h" |
| 61 #include "platform/weborigin/SecurityPolicy.h" | 60 #include "platform/weborigin/SecurityPolicy.h" |
| 62 #include "wtf/allocator/Partitions.h" | 61 #include "wtf/allocator/Partitions.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 130 |
| 132 EventTracer::initialize(); | 131 EventTracer::initialize(); |
| 133 KURL::initialize(); | 132 KURL::initialize(); |
| 134 SchemeRegistry::initialize(); | 133 SchemeRegistry::initialize(); |
| 135 SecurityPolicy::init(); | 134 SecurityPolicy::init(); |
| 136 | 135 |
| 137 registerEventFactory(); | 136 registerEventFactory(); |
| 138 | 137 |
| 139 StringImpl::freezeStaticStrings(); | 138 StringImpl::freezeStaticStrings(); |
| 140 | 139 |
| 141 Platform::current()->registerMemoryDumpProvider(WebCacheMemoryDumpProvider::
instance(), "MemoryCache"); | |
| 142 | |
| 143 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but | 140 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but |
| 144 // does not start the threads. | 141 // does not start the threads. |
| 145 HTMLParserThread::init(); | 142 HTMLParserThread::init(); |
| 146 ScriptStreamerThread::init(); | 143 ScriptStreamerThread::init(); |
| 147 } | 144 } |
| 148 | 145 |
| 149 void CoreInitializer::shutdown() | 146 void CoreInitializer::shutdown() |
| 150 { | 147 { |
| 151 // Shutdown V8-related background threads before V8 is ramped down. Note | 148 // Shutdown V8-related background threads before V8 is ramped down. Note |
| 152 // that this will wait the thread to stop its operations. | 149 // that this will wait the thread to stop its operations. |
| 153 ScriptStreamerThread::shutdown(); | 150 ScriptStreamerThread::shutdown(); |
| 154 | 151 |
| 155 // Make sure we stop the HTMLParserThread before Platform::current() is | 152 // Make sure we stop the HTMLParserThread before Platform::current() is |
| 156 // cleared. | 153 // cleared. |
| 157 ASSERT(Platform::current()); | 154 ASSERT(Platform::current()); |
| 158 HTMLParserThread::shutdown(); | 155 HTMLParserThread::shutdown(); |
| 159 | 156 |
| 160 Platform::current()->unregisterMemoryDumpProvider(WebCacheMemoryDumpProvider
::instance()); | |
| 161 | |
| 162 WorkerThread::terminateAndWaitForAllWorkers(); | 157 WorkerThread::terminateAndWaitForAllWorkers(); |
| 163 } | 158 } |
| 164 | 159 |
| 165 } // namespace blink | 160 } // namespace blink |
| OLD | NEW |