OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/workers/MainThreadWorkletGlobalScope.h" | 5 #include "core/workers/MainThreadWorkletGlobalScope.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptSourceCode.h" | 7 #include "bindings/core/v8/ScriptSourceCode.h" |
8 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" | 8 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" |
9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
10 #include "core/frame/Deprecation.h" | 10 #include "core/frame/Deprecation.h" |
11 #include "core/frame/FrameConsole.h" | 11 #include "core/frame/FrameConsole.h" |
12 #include "core/frame/LocalFrame.h" | 12 #include "core/frame/LocalFrame.h" |
13 #include "core/inspector/MainThreadDebugger.h" | 13 #include "core/inspector/MainThreadDebugger.h" |
| 14 #include "core/probe/CoreProbes.h" |
14 | 15 |
15 namespace blink { | 16 namespace blink { |
16 | 17 |
17 MainThreadWorkletGlobalScope::MainThreadWorkletGlobalScope( | 18 MainThreadWorkletGlobalScope::MainThreadWorkletGlobalScope( |
18 LocalFrame* frame, | 19 LocalFrame* frame, |
19 const KURL& url, | 20 const KURL& url, |
20 const String& user_agent, | 21 const String& user_agent, |
21 PassRefPtr<SecurityOrigin> security_origin, | 22 PassRefPtr<SecurityOrigin> security_origin, |
22 v8::Isolate* isolate) | 23 v8::Isolate* isolate) |
23 : WorkletGlobalScope(url, user_agent, std::move(security_origin), isolate), | 24 : WorkletGlobalScope(url, user_agent, std::move(security_origin), isolate), |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 118 |
118 void MainThreadWorkletGlobalScope::AddConsoleMessage( | 119 void MainThreadWorkletGlobalScope::AddConsoleMessage( |
119 ConsoleMessage* console_message) { | 120 ConsoleMessage* console_message) { |
120 GetFrame()->Console().AddMessage(console_message); | 121 GetFrame()->Console().AddMessage(console_message); |
121 } | 122 } |
122 | 123 |
123 void MainThreadWorkletGlobalScope::ExceptionThrown(ErrorEvent* event) { | 124 void MainThreadWorkletGlobalScope::ExceptionThrown(ErrorEvent* event) { |
124 MainThreadDebugger::Instance()->ExceptionThrown(this, event); | 125 MainThreadDebugger::Instance()->ExceptionThrown(this, event); |
125 } | 126 } |
126 | 127 |
| 128 CoreProbeSink* MainThreadWorkletGlobalScope::GetProbeSink() { |
| 129 return probe::ToCoreProbeSink(GetFrame()); |
| 130 } |
| 131 |
127 DEFINE_TRACE(MainThreadWorkletGlobalScope) { | 132 DEFINE_TRACE(MainThreadWorkletGlobalScope) { |
128 visitor->Trace(loader_map_); | 133 visitor->Trace(loader_map_); |
129 WorkletGlobalScope::Trace(visitor); | 134 WorkletGlobalScope::Trace(visitor); |
130 ContextClient::Trace(visitor); | 135 ContextClient::Trace(visitor); |
131 } | 136 } |
132 | 137 |
133 } // namespace blink | 138 } // namespace blink |
OLD | NEW |