Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 15 matching lines...) Expand all Loading... | |
| 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 "WebKit.h" | 32 #include "WebKit.h" |
| 33 | 33 |
| 34 #include "CustomElementRegistry.h" | 34 #include "CustomElementRegistry.h" |
| 35 #include "EventTracer.h" | 35 #include "EventTracer.h" |
| 36 #include "Frame.h" | |
| 36 #include "IDBFactoryBackendProxy.h" | 37 #include "IDBFactoryBackendProxy.h" |
| 37 #include "ImageDecodingStore.h" | 38 #include "ImageDecodingStore.h" |
| 38 #include "LayoutTestSupport.h" | 39 #include "LayoutTestSupport.h" |
| 39 #include "Logging.h" | 40 #include "Logging.h" |
| 40 #include "MutationObserver.h" | 41 #include "MutationObserver.h" |
| 41 #include "Page.h" | 42 #include "Page.h" |
| 42 #include "RuntimeEnabledFeatures.h" | 43 #include "RuntimeEnabledFeatures.h" |
| 43 #include "Settings.h" | 44 #include "Settings.h" |
| 44 #include "TextEncoding.h" | 45 #include "TextEncoding.h" |
| 45 #include "V8Binding.h" | 46 #include "V8Binding.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 s_webKitInitialized = true; | 135 s_webKitInitialized = true; |
| 135 | 136 |
| 136 #if OS(DARWIN) | 137 #if OS(DARWIN) |
| 137 InitWebCoreSystemInterface(); | 138 InitWebCoreSystemInterface(); |
| 138 #endif | 139 #endif |
| 139 | 140 |
| 140 ASSERT(webKitPlatformSupport); | 141 ASSERT(webKitPlatformSupport); |
| 141 ASSERT(!s_webKitPlatformSupport); | 142 ASSERT(!s_webKitPlatformSupport); |
| 142 s_webKitPlatformSupport = webKitPlatformSupport; | 143 s_webKitPlatformSupport = webKitPlatformSupport; |
| 143 Platform::initialize(s_webKitPlatformSupport); | 144 Platform::initialize(s_webKitPlatformSupport); |
| 144 WebCore::ImageDecodingStore::initializeOnce(); | |
| 145 | 145 |
| 146 WTF::initializeThreading(); | 146 WTF::initializeThreading(); |
| 147 WTF::initializeMainThread(); | 147 WTF::initializeMainThread(); |
| 148 WTF::AtomicString::init(); | 148 WebCore::init(); |
|
eseidel
2013/04/10 20:53:50
This is also really just about initalializing stat
abarth-chromium
2013/04/10 21:00:51
I'd like to move all the initialization code into
| |
| 149 WebCore::ImageDecodingStore::initializeOnce(); | |
| 149 | 150 |
| 150 // There are some code paths (for example, running WebKit in the browser | 151 // There are some code paths (for example, running WebKit in the browser |
| 151 // process and calling into LocalStorage before anything else) where the | 152 // process and calling into LocalStorage before anything else) where the |
| 152 // UTF8 string encoding tables are used on a background thread before | 153 // UTF8 string encoding tables are used on a background thread before |
| 153 // they're set up. This is a problem because their set up routines assert | 154 // they're set up. This is a problem because their set up routines assert |
| 154 // they're running on the main WebKitThread. It might be possible to make | 155 // they're running on the main WebKitThread. It might be possible to make |
| 155 // the initialization thread-safe, but given that so many code paths use | 156 // the initialization thread-safe, but given that so many code paths use |
| 156 // this, initializing this lazily probably doesn't buy us much. | 157 // this, initializing this lazily probably doesn't buy us much. |
| 157 WebCore::UTF8Encoding(); | 158 WebCore::UTF8Encoding(); |
| 158 | 159 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 UNUSED_PARAM(name); | 213 UNUSED_PARAM(name); |
| 213 #endif // !LOG_DISABLED | 214 #endif // !LOG_DISABLED |
| 214 } | 215 } |
| 215 | 216 |
| 216 void resetPluginCache(bool reloadPages) | 217 void resetPluginCache(bool reloadPages) |
| 217 { | 218 { |
| 218 WebCore::Page::refreshPlugins(reloadPages); | 219 WebCore::Page::refreshPlugins(reloadPages); |
| 219 } | 220 } |
| 220 | 221 |
| 221 } // namespace WebKit | 222 } // namespace WebKit |
| OLD | NEW |