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

Unified Diff: src/inspector/v8-debugger-agent-impl.cc

Issue 2685483002: [debugger] expose side-effect free evaluate to inspector. (Closed)
Patch Set: Created 3 years, 10 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: src/inspector/v8-debugger-agent-impl.cc
diff --git a/src/inspector/v8-debugger-agent-impl.cc b/src/inspector/v8-debugger-agent-impl.cc
index 664c2ed095a0545d2ee655c3b15178e21e056f3f..d4e75abee5887f9c16b1e38c7b6a1908eba35c82 100644
--- a/src/inspector/v8-debugger-agent-impl.cc
+++ b/src/inspector/v8-debugger-agent-impl.cc
@@ -690,8 +690,8 @@ void V8DebuggerAgentImpl::setPauseOnExceptionsImpl(int pauseState) {
Response V8DebuggerAgentImpl::evaluateOnCallFrame(
const String16& callFrameId, const String16& expression,
Maybe<String16> objectGroup, Maybe<bool> includeCommandLineAPI,
- Maybe<bool> silent, Maybe<bool> returnByValue, Maybe<bool> generatePreview,
- std::unique_ptr<RemoteObject>* result,
+ Maybe<bool> allowSideEffect, Maybe<bool> silent, Maybe<bool> returnByValue,
+ Maybe<bool> generatePreview, std::unique_ptr<RemoteObject>* result,
Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails) {
if (!isPaused()) return Response::Error(kDebuggerNotPaused);
InjectedScript::CallFrameScope scope(m_inspector, m_session->contextGroupId(),
@@ -706,7 +706,7 @@ Response V8DebuggerAgentImpl::evaluateOnCallFrame(
v8::MaybeLocal<v8::Value> maybeResultValue =
m_pausedCallFrames[scope.frameOrdinal()]->evaluate(
- toV8String(m_isolate, expression));
+ toV8String(m_isolate, expression), allowSideEffect.fromMaybe(true));
// Re-initialize after running client's code, as it could have destroyed
// context or session.

Powered by Google App Engine
This is Rietveld 408576698