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/inspector/ThreadDebugger.h" | 5 #include "core/inspector/ThreadDebugger.h" |
6 | 6 |
7 #include "bindings/core/v8/V8Binding.h" | 7 #include "bindings/core/v8/V8Binding.h" |
8 #include "bindings/core/v8/V8ScriptRunner.h" | 8 #include "bindings/core/v8/V8ScriptRunner.h" |
9 #include "core/inspector/InspectorDOMDebuggerAgent.h" | 9 #include "core/inspector/InspectorDOMDebuggerAgent.h" |
10 #include "public/platform/Platform.h" | 10 #include "public/platform/Platform.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 { | 27 { |
28 const WebData& debuggerScriptSourceResource = Platform::current()->loadResou
rce("DebuggerScriptSource.js"); | 28 const WebData& debuggerScriptSourceResource = Platform::current()->loadResou
rce("DebuggerScriptSource.js"); |
29 v8::Local<v8::String> source = v8String(m_isolate, String(debuggerScriptSour
ceResource.data(), debuggerScriptSourceResource.size())); | 29 v8::Local<v8::String> source = v8String(m_isolate, String(debuggerScriptSour
ceResource.data(), debuggerScriptSourceResource.size())); |
30 v8::Local<v8::Value> value; | 30 v8::Local<v8::Value> value; |
31 if (!V8ScriptRunner::compileAndRunInternalScript(source, m_isolate).ToLocal(
&value)) | 31 if (!V8ScriptRunner::compileAndRunInternalScript(source, m_isolate).ToLocal(
&value)) |
32 return v8::Local<v8::Object>(); | 32 return v8::Local<v8::Object>(); |
33 ASSERT(value->IsObject()); | 33 ASSERT(value->IsObject()); |
34 return value.As<v8::Object>(); | 34 return value.As<v8::Object>(); |
35 } | 35 } |
36 | 36 |
37 void ThreadDebugger::eventListeners(v8::Isolate* isolate, v8::Local<v8::Value> v
alue, EventListenerInfoMap& result) | 37 void ThreadDebugger::eventListeners(v8::Local<v8::Value> value, EventListenerInf
oMap& result) |
38 { | 38 { |
39 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(isolate, value, resul
t); | 39 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(m_isolate, value, res
ult); |
40 } | 40 } |
41 | 41 |
42 v8::MaybeLocal<v8::Value> ThreadDebugger::callFunction(v8::Local<v8::Function> f
unction, v8::Local<v8::Context> context, v8::Local<v8::Value> receiver, int argc
, v8::Local<v8::Value> info[]) | 42 v8::MaybeLocal<v8::Value> ThreadDebugger::callFunction(v8::Local<v8::Function> f
unction, v8::Local<v8::Context> context, v8::Local<v8::Value> receiver, int argc
, v8::Local<v8::Value> info[]) |
43 { | 43 { |
44 ScriptState* scriptState = ScriptState::from(context); | 44 ScriptState* scriptState = ScriptState::from(context); |
45 return V8ScriptRunner::callFunction(function, scriptState->executionContext(
), receiver, argc, info, m_isolate); | 45 return V8ScriptRunner::callFunction(function, scriptState->executionContext(
), receiver, argc, info, m_isolate); |
46 } | 46 } |
47 | 47 |
48 } // namespace blink | 48 } // namespace blink |
OLD | NEW |