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

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

Issue 2013223003: Debugger: fix crash in DebugEvaluate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/debug/debug-evaluate.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 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 | « src/debug/debug-evaluate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698