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

Unified Diff: test/debugger/test-api.js

Issue 2685483002: [debugger] expose side-effect free evaluate to inspector. (Closed)
Patch Set: add inspector test 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: test/debugger/test-api.js
diff --git a/test/debugger/test-api.js b/test/debugger/test-api.js
index 2dec3248b329639f787ef83c1c3c95501f3d6933..22dac703194f618840067a32c4fe12a9786c1f4b 100644
--- a/test/debugger/test-api.js
+++ b/test/debugger/test-api.js
@@ -677,12 +677,13 @@ class DebugWrapper {
};
}
- evaluateOnCallFrame(frame, expr) {
+ evaluateOnCallFrame(frame, expr, throw_on_side_effect = false) {
const frameid = frame.callFrameId;
const {msgid, msg} = this.createMessage(
"Debugger.evaluateOnCallFrame",
{ callFrameId : frameid,
- expression : expr
+ expression : expr,
+ throwOnSideEffect : throw_on_side_effect,
});
this.sendMessage(msg);
const reply = this.takeReplyChecked(msgid);
@@ -727,7 +728,8 @@ class DebugWrapper {
sourceLine : () => line + 1,
sourceLineText : () => loc.sourceText,
sourcePosition : () => loc.position,
- evaluate : (expr) => this.evaluateOnCallFrame(frame, expr),
+ evaluate : (expr, throw_on_side_effect) =>
+ this.evaluateOnCallFrame(frame, expr, throw_on_side_effect),
functionName : () => frame.functionName,
func : () => func,
index : () => index,

Powered by Google App Engine
This is Rietveld 408576698