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 17 matching lines...) Expand all Loading... |
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 "public/web/WebKit.h" | 31 #include "public/web/WebKit.h" |
32 | 32 |
33 #include <memory> | 33 #include <memory> |
34 | 34 |
35 #include "bindings/core/v8/V8BindingForCore.h" | 35 #include "bindings/core/v8/V8BindingForCore.h" |
36 #include "bindings/core/v8/V8GCController.h" | 36 #include "bindings/core/v8/V8GCController.h" |
37 #include "bindings/core/v8/V8Initializer.h" | 37 #include "bindings/core/v8/V8Initializer.h" |
| 38 #include "bindings/modules/v8/V8SnapshotReference.h" |
38 #include "core/animation/AnimationClock.h" | 39 #include "core/animation/AnimationClock.h" |
39 #include "core/layout/LayoutTheme.h" | 40 #include "core/layout/LayoutTheme.h" |
40 #include "core/page/Page.h" | 41 #include "core/page/Page.h" |
41 #include "core/workers/WorkerBackingThread.h" | 42 #include "core/workers/WorkerBackingThread.h" |
42 #include "gin/public/v8_platform.h" | 43 #include "gin/public/v8_platform.h" |
43 #include "modules/ModulesInitializer.h" | 44 #include "modules/ModulesInitializer.h" |
44 #include "platform/LayoutTestSupport.h" | 45 #include "platform/LayoutTestSupport.h" |
45 #include "platform/bindings/Microtask.h" | 46 #include "platform/bindings/Microtask.h" |
46 #include "platform/heap/Heap.h" | 47 #include "platform/heap/Heap.h" |
47 #include "platform/wtf/Assertions.h" | 48 #include "platform/wtf/Assertions.h" |
(...skipping 25 matching lines...) Expand all Loading... |
73 | 74 |
74 static ModulesInitializer& GetModulesInitializer() { | 75 static ModulesInitializer& GetModulesInitializer() { |
75 DEFINE_STATIC_LOCAL(std::unique_ptr<ModulesInitializer>, initializer, | 76 DEFINE_STATIC_LOCAL(std::unique_ptr<ModulesInitializer>, initializer, |
76 (WTF::WrapUnique(new ModulesInitializer))); | 77 (WTF::WrapUnique(new ModulesInitializer))); |
77 return *initializer; | 78 return *initializer; |
78 } | 79 } |
79 | 80 |
80 void Initialize(Platform* platform) { | 81 void Initialize(Platform* platform) { |
81 Platform::Initialize(platform); | 82 Platform::Initialize(platform); |
82 | 83 |
83 V8Initializer::InitializeMainThread(); | 84 V8Initializer::InitializeMainThread( |
| 85 V8SnapshotReference::getExternalReferences()); |
84 | 86 |
85 GetModulesInitializer().Initialize(); | 87 GetModulesInitializer().Initialize(); |
86 | 88 |
87 // currentThread is null if we are running on a thread without a message loop. | 89 // currentThread is null if we are running on a thread without a message loop. |
88 if (WebThread* current_thread = platform->CurrentThread()) { | 90 if (WebThread* current_thread = platform->CurrentThread()) { |
89 DCHECK(!g_end_of_task_runner); | 91 DCHECK(!g_end_of_task_runner); |
90 g_end_of_task_runner = new EndOfTaskRunner; | 92 g_end_of_task_runner = new EndOfTaskRunner; |
91 current_thread->AddTaskObserver(g_end_of_task_runner); | 93 current_thread->AddTaskObserver(g_end_of_task_runner); |
92 } | 94 } |
93 } | 95 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 void MemoryPressureNotificationToWorkerThreadIsolates( | 134 void MemoryPressureNotificationToWorkerThreadIsolates( |
133 v8::MemoryPressureLevel level) { | 135 v8::MemoryPressureLevel level) { |
134 WorkerBackingThread::MemoryPressureNotificationToWorkerThreadIsolates(level); | 136 WorkerBackingThread::MemoryPressureNotificationToWorkerThreadIsolates(level); |
135 } | 137 } |
136 | 138 |
137 void SetRAILModeOnWorkerThreadIsolates(v8::RAILMode rail_mode) { | 139 void SetRAILModeOnWorkerThreadIsolates(v8::RAILMode rail_mode) { |
138 WorkerBackingThread::SetRAILModeOnWorkerThreadIsolates(rail_mode); | 140 WorkerBackingThread::SetRAILModeOnWorkerThreadIsolates(rail_mode); |
139 } | 141 } |
140 | 142 |
141 } // namespace blink | 143 } // namespace blink |
OLD | NEW |