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

Side by Side Diff: test/mjsunit/debug-liveedit-patch-positions.js

Issue 1181013007: Debugger: require debugger to be active when dealing with breaks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix yet another test Created 5 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 15 matching lines...) Expand all
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 // Flags: --expose-debug-as debug 28 // Flags: --expose-debug-as debug
29 // Get the Debug object exposed from the debug context global object. 29 // Get the Debug object exposed from the debug context global object.
30 30
31 // Scenario: some function is being edited; the outer function has to have its 31 // Scenario: some function is being edited; the outer function has to have its
32 // positions patched. Accoring to a special markup of function text 32 // positions patched. Accoring to a special markup of function text
33 // corresponding byte-code PCs should coincide before change and after it. 33 // corresponding byte-code PCs should coincide before change and after it.
34 34
35 Debug = debug.Debug 35 Debug = debug.Debug
36 Debug.setListener(function() {});
36 37
37 eval( 38 eval(
38 "function F1() { return 5; }\n" + 39 "function F1() { return 5; }\n" +
39 "function ChooseAnimal(/*$*/ ) {\n" + 40 "function ChooseAnimal(/*$*/ ) {\n" +
40 "/*$*/ var x = F1(/*$*/ );\n" + 41 "/*$*/ var x = F1(/*$*/ );\n" +
41 "/*$*/ var res/*$*/ =/*$*/ (function() { return 'Cat'; } )();\n" + 42 "/*$*/ var res/*$*/ =/*$*/ (function() { return 'Cat'; } )();\n" +
42 "/*$*/ var y/*$*/ = F2(/*$*/ F1()/*$*/ , F1(/*$*/ )/*$*/ );\n" + 43 "/*$*/ var y/*$*/ = F2(/*$*/ F1()/*$*/ , F1(/*$*/ )/*$*/ );\n" +
43 "/*$*/ if (/*$*/ x.toString(/*$*/ )) { /*$*/ y = 3;/*$*/ } else {/*$*/ y = 8;/*$*/ }\n" + 44 "/*$*/ if (/*$*/ x.toString(/*$*/ )) { /*$*/ y = 3;/*$*/ } else {/*$*/ y = 8;/*$*/ }\n" +
44 "/*$*/ var z = /*$*/ x * y;\n" + 45 "/*$*/ var z = /*$*/ x * y;\n" +
45 "/*$*/ return/*$*/ res/*$*/ + z;/*$*/ }\n" + 46 "/*$*/ return/*$*/ res/*$*/ + z;/*$*/ }\n" +
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 print(pcArray1); 118 print(pcArray1);
118 print(pcArray2); 119 print(pcArray2);
119 120
120 // Function can be marked for recompilation at any point (especially if we are 121 // Function can be marked for recompilation at any point (especially if we are
121 // running with --stress-opt). When we mark function for recompilation we 122 // running with --stress-opt). When we mark function for recompilation we
122 // replace it's code with stub. So there is no reliable way to get PCs for 123 // replace it's code with stub. So there is no reliable way to get PCs for
123 // function. 124 // function.
124 if (pcArray1 && pcArray2) { 125 if (pcArray1 && pcArray2) {
125 assertArrayEquals(pcArray1, pcArray2); 126 assertArrayEquals(pcArray1, pcArray2);
126 } 127 }
128
129 Debug.setListener(null);
OLDNEW
« no previous file with comments | « test/mjsunit/debug-liveedit-breakpoints.js ('k') | test/mjsunit/debug-liveedit-stack-padding.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698