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

Side by Side Diff: test/mjsunit/debug-stepin-function-call.js

Issue 9705018: Debugger: naive implementation of "step into Function.prototype.bind". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing with additional test. Created 8 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 | 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
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Test step into function apply from a function with some local variables. 128 // Test step into function apply from a function with some local variables.
129 function apply4() { 129 function apply4() {
130 var alias = g; 130 var alias = g;
131 debugger; 131 debugger;
132 alias.apply(null, [3]); 132 alias.apply(null, [3]);
133 var aLocalVar = 'test'; 133 var aLocalVar = 'test';
134 var anotherLocalVar = g(aLocalVar) + 's'; 134 var anotherLocalVar = g(aLocalVar) + 's';
135 var yetAnotherLocal = 10; 135 var yetAnotherLocal = 10;
136 } 136 }
137 137
138 // Test step into bound function.
139 function bind1() {
140 var bound = g.bind(null, 3);
141 debugger;
142 bound();
143 }
144
138 var testFunctions = 145 var testFunctions =
139 [call1, call2, call3, call4, apply1, apply2, apply3, apply4]; 146 [call1, call2, call3, call4, apply1, apply2, apply3, apply4, bind1];
140 147
141 for (var i = 0; i < testFunctions.length; i++) { 148 for (var i = 0; i < testFunctions.length; i++) {
142 state = 0; 149 state = 0;
143 testFunctions[i](); 150 testFunctions[i]();
144 assertNull(exception); 151 assertNull(exception);
145 assertEquals(3, state); 152 assertEquals(3, state);
146 } 153 }
147 154
155 // Test global bound function.
156 state = 0;
157 var globalBound = g.bind(null, 3);
158 debugger;
159 globalBound();
160 assertNull(exception);
161 assertEquals(3, state);
162
148 // Get rid of the debug event listener. 163 // Get rid of the debug event listener.
149 Debug.setListener(null); 164 Debug.setListener(null);
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