| 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 11 matching lines...) Expand all Loading... |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 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 "bindings/core/v8/V8Initializer.h" | 31 #include "bindings/core/v8/V8Initializer.h" |
| 32 #include "bindings/modules/v8/V8ContextSnapshotExternalReferences.h" | |
| 33 #include "core/animation/AnimationClock.h" | 32 #include "core/animation/AnimationClock.h" |
| 34 #include "modules/ModulesInitializer.h" | 33 #include "modules/ModulesInitializer.h" |
| 35 #include "platform/bindings/Microtask.h" | 34 #include "platform/bindings/Microtask.h" |
| 36 #include "platform/bindings/V8PerIsolateData.h" | 35 #include "platform/bindings/V8PerIsolateData.h" |
| 37 #include "platform/heap/Heap.h" | 36 #include "platform/heap/Heap.h" |
| 38 #include "platform/wtf/Assertions.h" | 37 #include "platform/wtf/Assertions.h" |
| 39 #include "platform/wtf/PtrUtil.h" | 38 #include "platform/wtf/PtrUtil.h" |
| 40 #include "platform/wtf/WTF.h" | 39 #include "platform/wtf/WTF.h" |
| 41 #include "public/platform/Platform.h" | 40 #include "public/platform/Platform.h" |
| 42 #include "public/platform/WebThread.h" | 41 #include "public/platform/WebThread.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 63 | 62 |
| 64 static ModulesInitializer& GetModulesInitializer() { | 63 static ModulesInitializer& GetModulesInitializer() { |
| 65 DEFINE_STATIC_LOCAL(std::unique_ptr<ModulesInitializer>, initializer, | 64 DEFINE_STATIC_LOCAL(std::unique_ptr<ModulesInitializer>, initializer, |
| 66 (WTF::WrapUnique(new ModulesInitializer))); | 65 (WTF::WrapUnique(new ModulesInitializer))); |
| 67 return *initializer; | 66 return *initializer; |
| 68 } | 67 } |
| 69 | 68 |
| 70 void Initialize(Platform* platform) { | 69 void Initialize(Platform* platform) { |
| 71 Platform::Initialize(platform); | 70 Platform::Initialize(platform); |
| 72 | 71 |
| 73 V8Initializer::InitializeMainThread( | 72 V8Initializer::InitializeMainThread(); |
| 74 V8ContextSnapshotExternalReferences::GetTable()); | 73 |
| 75 GetModulesInitializer().Initialize(); | 74 GetModulesInitializer().Initialize(); |
| 76 | 75 |
| 77 WebFactoryImpl::Initialize(); | 76 WebFactoryImpl::Initialize(); |
| 78 | 77 |
| 79 // currentThread is null if we are running on a thread without a message loop. | 78 // currentThread is null if we are running on a thread without a message loop. |
| 80 if (WebThread* current_thread = platform->CurrentThread()) { | 79 if (WebThread* current_thread = platform->CurrentThread()) { |
| 81 DCHECK(!g_end_of_task_runner); | 80 DCHECK(!g_end_of_task_runner); |
| 82 g_end_of_task_runner = new EndOfTaskRunner; | 81 g_end_of_task_runner = new EndOfTaskRunner; |
| 83 current_thread->AddTaskObserver(g_end_of_task_runner); | 82 current_thread->AddTaskObserver(g_end_of_task_runner); |
| 84 } | 83 } |
| 85 } | 84 } |
| 86 | 85 |
| 87 } // namespace blink | 86 } // namespace blink |
| OLD | NEW |