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

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

Issue 1932343002: [DevTools] Don't run microtasks after call to InjectedScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 590bb2d2ed420cf07d0786ec3c2757a38a07f911..12927b4a98dfab16d648f3f5bbe42e3fc92bc2b6 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
@@ -84,6 +84,10 @@ v8::Local<v8::Value> V8FunctionCall::call(bool& hadException, bool reportExcepti
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))
@@ -98,8 +102,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