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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.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
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
index 5600d5a87a6b1a2c300742c86312b5f3d1ce4d87..0cbcebab870a3f49c4c199e7561265fa154af247 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
@@ -121,7 +121,12 @@ void V8RuntimeAgentImpl::evaluate(
// Temporarily enable allow evals for inspector.
if (evalIsDisabled)
context->AllowCodeGenerationFromStrings(true);
- v8::MaybeLocal<v8::Value> maybeResultValue = m_debugger->compileAndRunInternalScript(injectedScript->context()->context(), toV8String(injectedScript->isolate(), expression));
+
+ v8::MaybeLocal<v8::Value> maybeResultValue;
+ v8::Local<v8::Script> script = m_debugger->compileInternalScript(context, toV8String(m_debugger->isolate(), expression), String16());
+ if (!script.IsEmpty())
+ maybeResultValue = m_debugger->runCompiledScript(context, script);
+
if (evalIsDisabled)
context->AllowCodeGenerationFromStrings(false);
// InjectedScript may be gone after any evaluate call - find it again.
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698