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

Side by Side Diff: test/mjsunit/regress/regress-debugger-redirect.js

Issue 1269733002: Debugger: correctly redirect code with no stack check. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove printf Created 5 years, 4 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 | « src/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --expose-debug-as debug
6
7 function f(x) {
8 // This function compiles into code that only throws a redeclaration
9 // error. It contains no stack check and has no function body.
10 const x = 0;
11 return x;
12 }
13
14 function g() {
15 f(0);
16 }
17
18 var exception = null;
19 var called = false;
20 var Debug = debug.Debug;
21 Debug.setBreakOnException();
22
23 function listener(event, exec_state, event_data, data) {
24 if (event != Debug.DebugEvent.Exception) return;
25 try {
26 called = true;
27 Debug.setBreakPoint(f, 1);
28 } catch (e) {
29 exception = e;
30 }
31 }
32
33 Debug.setListener(listener);
34
35 assertThrows(g);
36 assertNull(exception);
37 assertTrue(called);
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698