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

Side by Side Diff: test/mjsunit/debug-step.js

Issue 1744123003: [debugger] fix break locations for assignments and return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes and addressed comments 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
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/mjsunit/debug-step-end-of-script.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 function f() { 57 function f() {
58 var i; // Line 1. 58 var i; // Line 1.
59 for (i = 0; i < 1000; i++) { // Line 2. 59 for (i = 0; i < 1000; i++) { // Line 2.
60 x = 1; // Line 3. 60 x = 1; // Line 3.
61 } 61 }
62 }; 62 };
63 63
64 // Set a breakpoint on the for statement (line 1). 64 // Set a breakpoint on the for statement (line 1).
65 bp1 = Debug.setBreakPoint(f, 1); 65 bp1 = Debug.setBreakPoint(f, 1);
66 66
67 // Check that performing 1000 steps will make i 499. 67 // Check that performing 1000 steps will make i 333.
68 var step_count = 1000; 68 var step_count = 1000;
69 result = -1; 69 result = -1;
70 f(); 70 f();
71 assertEquals(332, result); 71 assertEquals(333, result);
72 Debug.setListener(null); 72 Debug.setListener(null);
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/mjsunit/debug-step-end-of-script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698