Index: src/inspector/v8-inspector-impl.cc |
diff --git a/src/inspector/v8-inspector-impl.cc b/src/inspector/v8-inspector-impl.cc |
index 5c5d7b96d4780542d69b7cb1cc48572a662a687e..97aa3fae860567b04080df1415fb6623c1266cf5 100644 |
--- a/src/inspector/v8-inspector-impl.cc |
+++ b/src/inspector/v8-inspector-impl.cc |
@@ -97,8 +97,22 @@ v8::MaybeLocal<v8::Value> V8InspectorImpl::runCompiledScript( |
v8::MaybeLocal<v8::Value> V8InspectorImpl::callFunction( |
v8::Local<v8::Function> function, v8::Local<v8::Context> context, |
v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[]) { |
- v8::MicrotasksScope microtasksScope(m_isolate, |
- v8::MicrotasksScope::kRunMicrotasks); |
+ return callFunction(function, context, receiver, argc, info, |
+ v8::MicrotasksScope::kRunMicrotasks); |
+} |
+ |
+v8::MaybeLocal<v8::Value> V8InspectorImpl::callInternalFunction( |
+ v8::Local<v8::Function> function, v8::Local<v8::Context> context, |
+ v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[]) { |
+ return callFunction(function, context, receiver, argc, info, |
+ v8::MicrotasksScope::kDoNotRunMicrotasks); |
+} |
+ |
+v8::MaybeLocal<v8::Value> V8InspectorImpl::callFunction( |
+ v8::Local<v8::Function> function, v8::Local<v8::Context> context, |
+ v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[], |
+ v8::MicrotasksScope::Type runMicrotasks) { |
+ v8::MicrotasksScope microtasksScope(m_isolate, runMicrotasks); |
int groupId = V8Debugger::getGroupId(context); |
if (V8DebuggerAgentImpl* agent = enabledDebuggerAgentForGroup(groupId)) |
agent->willExecuteScript(function->ScriptId()); |