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

Side by Side Diff: test/mjsunit/regress/regress-419663.js

Issue 658723005: Fix break location calculation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/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 2012 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 var o = {
8 f: function(x) {
9 var a = x + 1;
10 o = 1;
11 }
12 }
13
14 function sentinel() {}
15
16 var Debug = debug.Debug;
17
18 Debug.setListener(function() {});
19
20 var script = Debug.findScript(sentinel);
21
22 // Used in Debug.setScriptBreakPointById.
23 var p1 = Debug.findScriptSourcePosition(script, 9, 0);
24 var p2 = Debug.setBreakPointByScriptIdAndPosition(script.id, p1).actual_position ;
25 var p3 = Debug.setBreakPointByScriptIdAndPosition(script.id, p2).actual_position ;
26
27 assertEquals(p2, p3);
28
29 function assertLocation(p, l, c) {
30 var location = script.locationFromPosition(p, false);
31 assertEquals(l, location.line);
32 assertEquals(c, location.column);
33 }
34
35 assertLocation(p1, 9, 0);
36 assertLocation(p2, 9, 4);
37 assertLocation(p3, 9, 4);
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698