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

Side by Side Diff: test/mjsunit/regress/regress-crbug-465298.js

Issue 1074793003: [turbofan] Fix FrameInspector when deoptimizer is disabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/runtime/runtime-debug.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: --noturbo-osr --expose-debug-as debug
6
7 var stdlib = this;
8 var buffer = new ArrayBuffer(64 * 1024);
9 var foreign = { thrower: thrower, debugme: debugme }
10
11 // Get the Debug object exposed from the debug context global object.
12 Debug = debug.Debug;
13
14 var listenerCalled = false;
15 function listener(event, exec_state, event_data, data) {
16 try {
17 if (event == Debug.DebugEvent.Break) {
18 var frame = exec_state.frame(1);
19 assertEquals(m.foo, frame.func().value());
20 listenerCalled = true;
21 }
22 } catch (e) {
23 print("Caught: " + e + " " + e.stack);
24 };
25 }
26
27 function thrower() { throw "boom"; }
28 function debugme() { Debug.setListener(listener); debugger; }
29
30 function Module(stdlib, foreign, heap) {
31 "use asm";
32 var thrower = foreign.thrower;
33 var debugme = foreign.debugme;
34 function foo(i) {
35 i = i|0;
36 var a = 101; // Local variables exist ...
37 var b = 102; // ... to make the debugger ...
38 var c = 103; // ... inspect them during break.
39 if (i > 0) {
40 debugme();
41 i = 23;
42 } else {
43 thrower();
44 i = 42;
45 }
46 return i|0;
47 }
48 return { foo: foo };
49 }
50
51 var m = Module(stdlib, foreign, buffer);
52
53 assertThrows("m.foo(0)");
54 assertEquals(23, m.foo(1));
55 assertTrue(listenerCalled);
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698