Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp

Issue 1940783002: [DevTools] Don't run microtasks after call to InjectedScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
index 5d7c210b2517a484df266e6bf78155e295a23757..fba5ed2fa681ed98052add69723c716e1026198b 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
@@ -90,6 +90,10 @@ v8::Local<v8::Value> V8FunctionCall::call()
v8::Local<v8::Value> V8FunctionCall::callWithoutExceptionHandling()
{
+ // TODO(dgozman): get rid of this check.
+ if (!m_debugger->client()->isExecutionAllowed())
+ return v8::Local<v8::Value>();
+
v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(m_value);
v8::Local<v8::Value> value;
if (!thisObject->Get(m_context, m_name).ToLocal(&value))
@@ -104,8 +108,9 @@ v8::Local<v8::Value> V8FunctionCall::callWithoutExceptionHandling()
ASSERT(!info[i].IsEmpty());
}
+ v8::MicrotasksScope microtasksScope(m_context->GetIsolate(), v8::MicrotasksScope::kDoNotRunMicrotasks);
v8::Local<v8::Value> result;
- if (!m_debugger->callFunction(function, m_context, thisObject, m_arguments.size(), info.get()).ToLocal(&result))
+ if (!function->Call(m_context, thisObject, m_arguments.size(), info.get()).ToLocal(&result))
return v8::Local<v8::Value>();
return result;
}

Powered by Google App Engine
This is Rietveld 408576698