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

Unified Diff: test/debugger/regress/regress-5901-1.js

Issue 2664793002: [debugger] account for inlined functions when stepping. (Closed)
Patch Set: comment addressed Created 3 years, 11 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 | « test/cctest/test-debug.cc ('k') | test/debugger/regress/regress-5901-2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/debugger/regress/regress-5901-1.js
diff --git a/test/debugger/regress/regress-5901-1.js b/test/debugger/regress/regress-5901-1.js
new file mode 100644
index 0000000000000000000000000000000000000000..49becc9294f9c0be015d950ba6d56db6b1f536d7
--- /dev/null
+++ b/test/debugger/regress/regress-5901-1.js
@@ -0,0 +1,50 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --ignition --turbo
+
+function f() {
+ throw new Error();
+}
+
+function g() {
+ try {
+ f();
+ } catch (e) {
+ return 1; // Break
+ }
+}
+
+function h() {
+ return g();
+}
+
+h();
+h();
+
+var Debug = debug.Debug;
+var step_count = 0;
+var exception = null;
+
+function listener(event, exec_state, event_data, data) {
+ if (event == Debug.DebugEvent.Exception) {
+ step_count++;
+ exec_state.prepareStep(Debug.StepAction.StepNext);
+ } else if (event == Debug.DebugEvent.Break) {
+ step_count++;
+ try {
+ assertTrue(exec_state.frame().sourceLineText().includes('Break'));
+ } catch (e) {
+ exception = e;
+ print(e);
+ }
+ }
+}
+
+Debug.setListener(listener);
+Debug.setBreakOnException();
+% OptimizeFunctionOnNextCall(h);
+h();
+Debug.setListener(null);
+assertNull(exception);
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/debugger/regress/regress-5901-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698