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

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

Issue 1819123002: Remove support for legacy const, part 1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased, deleted one more file Created 4 years, 9 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
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 --legacy-const
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 | « test/mjsunit/regress/regress-88591.js ('k') | test/mjsunit/regress/regress-handle-illegal-redeclaration.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698