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

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

Issue 1233073005: Debugger: prepare code for debugging on a per-function basis. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments. Created 5 years, 5 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-func-name-inference.cc ('k') | test/mjsunit/debug-optimize.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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Add the debug event listener. 129 // Add the debug event listener.
130 Debug.setListener(listener); 130 Debug.setListener(listener);
131 131
132 function f() { 132 function f() {
133 var a = 3; 133 var a = 3;
134 }; 134 };
135 135
136 function g() { 136 function g() {
137 var a = 2; 137 var a = 2;
138 f(); 138 f();
139 return a; // Use the value to prevent it being removed by DCE.
139 }; 140 };
140 141
141 a = 1; 142 a = 1;
142 143
143 // String which is longer than 80 chars. 144 // String which is longer than 80 chars.
144 var longString = "1234567890_"; 145 var longString = "1234567890_";
145 for (var i = 0; i < 4; i++) { 146 for (var i = 0; i < 4; i++) {
146 longString += longString; 147 longString += longString;
147 } 148 }
148 149
149 // Set a break point at return in f and invoke g to hit the breakpoint. 150 // Set a break point at return in f and invoke g to hit the breakpoint.
150 Debug.setBreakPoint(f, 2, 0); 151 Debug.setBreakPoint(f, 2, 0);
151 g(); 152 g();
152 153
153 assertFalse(exception, "exception in listener") 154 assertFalse(exception, "exception in listener")
154 // Make sure that the debug event listener vas invoked. 155 // Make sure that the debug event listener vas invoked.
155 assertTrue(listenerComplete, "listener did not run to completion"); 156 assertTrue(listenerComplete, "listener did not run to completion");
OLDNEW
« no previous file with comments | « test/cctest/test-func-name-inference.cc ('k') | test/mjsunit/debug-optimize.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698