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

Side by Side Diff: test/mjsunit/debug-set-variable-value.js

Issue 11519020: Fix set variable value bug: a function argument must be updated in 2 places (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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/runtime.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 RunPauseTest(0, 'mouse', 'v1', 'dog', 'dog', (function Factory() { 251 RunPauseTest(0, 'mouse', 'v1', 'dog', 'dog', (function Factory() {
252 return function() { 252 return function() {
253 eval("var v1 = 'mouse'"); 253 eval("var v1 = 'mouse'");
254 debugger; 254 debugger;
255 return v1; 255 return v1;
256 } 256 }
257 })()); 257 })());
258 258
259 259
260 // Check that we correctly update local variable that
261 // is referenced from an inner closure.
262 RunPauseTest(0, 'Blue', 'v', 'Green', 'Green', (function Factory() {
263 return function() {
264 function A() {
265 var v = "Blue";
266 function Inner() {
267 return void v;
268 }
269 debugger;
270 return v;
271 }
272 return A();
273 }
274 })());
275
276 // Check that we correctly update parameter, that is known to be stored
277 // both on stack and in heap.
278 RunPauseTest(0, 5, 'p', 2012, 2012, (function Factory() {
279 return function() {
280 function A(p) {
281 function Inner() {
282 return void p;
283 }
284 debugger;
285 return p;
286 }
287 return A(5);
288 }
289 })());
290
291
260 // Test value description protocol JSON 292 // Test value description protocol JSON
261 293
262 assertEquals(true, Debug.TestApi.CommandProcessorResolveValue({value: true})); 294 assertEquals(true, Debug.TestApi.CommandProcessorResolveValue({value: true}));
263 295
264 assertSame(null, Debug.TestApi.CommandProcessorResolveValue({type: "null"})); 296 assertSame(null, Debug.TestApi.CommandProcessorResolveValue({type: "null"}));
265 assertSame(undefined, 297 assertSame(undefined,
266 Debug.TestApi.CommandProcessorResolveValue({type: "undefined"})); 298 Debug.TestApi.CommandProcessorResolveValue({type: "undefined"}));
267 299
268 assertSame("123", Debug.TestApi.CommandProcessorResolveValue( 300 assertSame("123", Debug.TestApi.CommandProcessorResolveValue(
269 {type: "string", stringDescription: "123"})); 301 {type: "string", stringDescription: "123"}));
270 assertSame(123, Debug.TestApi.CommandProcessorResolveValue( 302 assertSame(123, Debug.TestApi.CommandProcessorResolveValue(
271 {type: "number", stringDescription: "123"})); 303 {type: "number", stringDescription: "123"}));
272 304
273 assertSame(Number, Debug.TestApi.CommandProcessorResolveValue( 305 assertSame(Number, Debug.TestApi.CommandProcessorResolveValue(
274 {handle: Debug.MakeMirror(Number).handle()})); 306 {handle: Debug.MakeMirror(Number).handle()}));
275 assertSame(RunClosureTest, Debug.TestApi.CommandProcessorResolveValue( 307 assertSame(RunClosureTest, Debug.TestApi.CommandProcessorResolveValue(
276 {handle: Debug.MakeMirror(RunClosureTest).handle()})); 308 {handle: Debug.MakeMirror(RunClosureTest).handle()}));
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698