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

Side by Side Diff: test/debugger/debug/debug-evaluate-no-side-effect-builtins.js

Issue 2687013003: Revert of [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 unified diff | Download patch
« no previous file with comments | « test/debugger/debug/debug-evaluate-no-side-effect.js ('k') | test/debugger/test-api.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --ignition 5 // Flags: --ignition --side-effect-free-debug-evaluate
6 6
7 Debug = debug.Debug 7 Debug = debug.Debug
8 8
9 var exception = null; 9 var exception = null;
10 10
11 function listener(event, exec_state, event_data, data) { 11 function listener(event, exec_state, event_data, data) {
12 if (event != Debug.DebugEvent.Break) return; 12 if (event != Debug.DebugEvent.Break) return;
13 try { 13 try {
14 function success(expectation, source) { 14 function success(expectation, source) {
15 assertEquals(expectation, 15 assertEquals(expectation, exec_state.frame(0).evaluate(source).value());
16 exec_state.frame(0).evaluate(source, true).value());
17 } 16 }
18 function fail(source) { 17 function fail(source) {
19 assertThrows(() => exec_state.frame(0).evaluate(source, true), 18 assertThrows(() => exec_state.frame(0).evaluate(source), EvalError);
20 EvalError);
21 } 19 }
22 20
23 // Test Math functions. 21 // Test Math functions.
24 for (f of Object.getOwnPropertyNames(Math)) { 22 for (f of Object.getOwnPropertyNames(Math)) {
25 if (typeof Math[f] === "function") { 23 if (typeof Math[f] === "function") {
26 var result = exec_state.frame(0).evaluate( 24 var result = exec_state.frame(0).evaluate(
27 `Math.${f}(0.5, -0.5);`).value(); 25 `Math.${f}(0.5, -0.5);`).value();
28 if (f != "random") assertEquals(Math[f](0.5, -0.5), result); 26 if (f != "random") assertEquals(Math[f](0.5, -0.5), result);
29 } 27 }
30 } 28 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Add the debug event listener. 80 // Add the debug event listener.
83 Debug.setListener(listener); 81 Debug.setListener(listener);
84 82
85 function f() { 83 function f() {
86 debugger; 84 debugger;
87 }; 85 };
88 86
89 f(); 87 f();
90 88
91 assertNull(exception); 89 assertNull(exception);
OLDNEW
« no previous file with comments | « test/debugger/debug/debug-evaluate-no-side-effect.js ('k') | test/debugger/test-api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698