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

Side by Side Diff: src/mirror-debugger.js

Issue 17636007: Allow debugger evaluate expressions to mute local variables (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: clean Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | src/runtime.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2012 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 }; 1664 };
1665 1665
1666 1666
1667 FrameMirror.prototype.scope = function(index) { 1667 FrameMirror.prototype.scope = function(index) {
1668 return new ScopeMirror(this, void 0, index); 1668 return new ScopeMirror(this, void 0, index);
1669 }; 1669 };
1670 1670
1671 1671
1672 FrameMirror.prototype.evaluate = function(source, disable_break, 1672 FrameMirror.prototype.evaluate = function(source, disable_break,
1673 opt_context_object) { 1673 opt_context_object) {
1674 var result = %DebugEvaluate(this.break_id_, 1674 var result_array = %DebugEvaluate(this.break_id_,
1675 this.details_.frameId(), 1675 this.details_.frameId(),
Yang 2013/06/25 11:15:01 indentation is off by one.
Peter Rybin 2013/06/25 12:22:41 Done.
1676 this.details_.inlinedFrameIndex(), 1676 this.details_.inlinedFrameIndex(),
1677 source, 1677 source,
1678 Boolean(disable_break), 1678 Boolean(disable_break),
1679 opt_context_object); 1679 opt_context_object);
1680 return MakeMirror(result); 1680 // TODO: Check against optimized function somehow.
1681 var local_scope_before = result_array[1];
1682 var local_scope_after = result_array[2];
1683 for (var n in local_scope_after) {
1684 var value_before = local_scope_before[n];
1685 var value_after = local_scope_after[n];
1686 if (value_before !== value_after) {
1687 %SetScopeVariableValue(this.break_id_,
1688 this.details_.frameId(),
1689 this.details_.inlinedFrameIndex(),
1690 0,
1691 n,
1692 value_after);
1693 }
1694 }
1695 return MakeMirror(result_array[0]);
1681 }; 1696 };
1682 1697
1683 1698
1684 FrameMirror.prototype.invocationText = function() { 1699 FrameMirror.prototype.invocationText = function() {
1685 // Format frame invoaction (receiver, function and arguments). 1700 // Format frame invoaction (receiver, function and arguments).
1686 var result = ''; 1701 var result = '';
1687 var func = this.func(); 1702 var func = this.func();
1688 var receiver = this.receiver(); 1703 var receiver = this.receiver();
1689 if (this.isConstructCall()) { 1704 if (this.isConstructCall()) {
1690 // For constructor frames display new followed by the function name. 1705 // For constructor frames display new followed by the function name.
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2617 } 2632 }
2618 if (!NUMBER_IS_FINITE(value)) { 2633 if (!NUMBER_IS_FINITE(value)) {
2619 if (value > 0) { 2634 if (value > 0) {
2620 return 'Infinity'; 2635 return 'Infinity';
2621 } else { 2636 } else {
2622 return '-Infinity'; 2637 return '-Infinity';
2623 } 2638 }
2624 } 2639 }
2625 return value; 2640 return value;
2626 } 2641 }
OLDNEW
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698