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

Side by Side Diff: src/debug-delay.js

Issue 21350: Better handling debug evaluation when there is no JavaScript stack (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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/d8.js ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 response.body = 1414 response.body =
1415 this.exec_state_.evaluateGlobal(expression), Boolean(disable_break); 1415 this.exec_state_.evaluateGlobal(expression), Boolean(disable_break);
1416 return; 1416 return;
1417 } 1417 }
1418 1418
1419 // Default value for disable_break is true. 1419 // Default value for disable_break is true.
1420 if (IS_UNDEFINED(disable_break)) { 1420 if (IS_UNDEFINED(disable_break)) {
1421 disable_break = true; 1421 disable_break = true;
1422 } 1422 }
1423 1423
1424 // No frames no evaluate in frame.
1425 if (this.exec_state_.frameCount() == 0) {
1426 return response.failed('No frames');
1427 }
1428
1424 // Check whether a frame was specified. 1429 // Check whether a frame was specified.
1425 if (!IS_UNDEFINED(frame)) { 1430 if (!IS_UNDEFINED(frame)) {
1426 var frame_number = %ToNumber(frame); 1431 var frame_number = %ToNumber(frame);
1427 if (frame_number < 0 || frame_number >= this.exec_state_.frameCount()) { 1432 if (frame_number < 0 || frame_number >= this.exec_state_.frameCount()) {
1428 return response.failed('Invalid frame "' + frame + '"'); 1433 return response.failed('Invalid frame "' + frame + '"');
1429 } 1434 }
1430 // Evaluate in the specified frame. 1435 // Evaluate in the specified frame.
1431 response.body = this.exec_state_.frame(frame_number).evaluate( 1436 response.body = this.exec_state_.frame(frame_number).evaluate(
1432 expression, Boolean(disable_break)); 1437 expression, Boolean(disable_break));
1433 return; 1438 return;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 json += NumberToJSON_(elem); 1714 json += NumberToJSON_(elem);
1710 } else if (IS_STRING(elem)) { 1715 } else if (IS_STRING(elem)) {
1711 json += StringToJSON_(elem); 1716 json += StringToJSON_(elem);
1712 } else { 1717 } else {
1713 json += elem; 1718 json += elem;
1714 } 1719 }
1715 } 1720 }
1716 json += ']'; 1721 json += ']';
1717 return json; 1722 return json;
1718 } 1723 }
OLDNEW
« no previous file with comments | « src/d8.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698