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

Side by Side Diff: test/mjsunit/es6/debug-evaluate-receiver-before-super.js

Issue 2497973002: [debug-wrapper] Further extend the debug wrapper (Closed)
Patch Set: Address comments Created 4 years, 1 month 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 2016 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 // Test that debug-evaluate doesn't crash when this is used before super() call
8 // in constructor.
9
10 Debug = debug.Debug
11
12 var result;
13
14 function listener(event, exec_state, event_data, data)
15 {
16 try {
17 if (event == Debug.DebugEvent.Break) {
18 result = exec_state.frame(0).evaluate("this.a").value();
19 }
20 } catch (e) {
21 result = e.message;
22 }
23 }
24
25 Debug.setListener(listener);
26
27 class A { constructor () { this.a = 239; } }
28 class B extends A {
29 constructor () {
30 debugger;
31 assertEquals("Cannot read property 'a' of undefined", result);
32 super();
33 debugger;
34 assertEquals(239, result);
35 }
36 }
37 new B();
38
39 Debug.setListener(null);
OLDNEW
« no previous file with comments | « test/mjsunit/es6/debug-evaluate-blockscopes.js ('k') | test/mjsunit/es6/debug-exception-generators.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698