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

Side by Side Diff: src/debug/mirrors.js

Issue 2685483002: [debugger] expose side-effect free evaluate to inspector. (Closed)
Patch Set: add inspector test Created 3 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
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | src/flag-definitions.h » ('j') | 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-2012 the V8 project authors. All rights reserved. 1 // Copyright 2006-2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(global, utils) { 5 (function(global, utils) {
6 "use strict"; 6 "use strict";
7 7
8 // ---------------------------------------------------------------------------- 8 // ----------------------------------------------------------------------------
9 // Imports 9 // Imports
10 10
(...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 !!opt_ignore_nested_scopes); 1912 !!opt_ignore_nested_scopes);
1913 var result = []; 1913 var result = [];
1914 for (var i = 0; i < scopeDetails.length; ++i) { 1914 for (var i = 0; i < scopeDetails.length; ++i) {
1915 result.push(new ScopeMirror(this, UNDEFINED, UNDEFINED, i, 1915 result.push(new ScopeMirror(this, UNDEFINED, UNDEFINED, i,
1916 scopeDetails[i])); 1916 scopeDetails[i]));
1917 } 1917 }
1918 return result; 1918 return result;
1919 }; 1919 };
1920 1920
1921 1921
1922 FrameMirror.prototype.evaluate = function(source) { 1922 FrameMirror.prototype.evaluate = function(source, throw_on_side_effect = false) {
1923 return MakeMirror(%DebugEvaluate(this.break_id_, 1923 return MakeMirror(%DebugEvaluate(this.break_id_,
1924 this.details_.frameId(), 1924 this.details_.frameId(),
1925 this.details_.inlinedFrameIndex(), 1925 this.details_.inlinedFrameIndex(),
1926 source)); 1926 source,
1927 throw_on_side_effect));
1927 }; 1928 };
1928 1929
1929 1930
1930 FrameMirror.prototype.invocationText = function() { 1931 FrameMirror.prototype.invocationText = function() {
1931 // Format frame invoaction (receiver, function and arguments). 1932 // Format frame invoaction (receiver, function and arguments).
1932 var result = ''; 1933 var result = '';
1933 var func = this.func(); 1934 var func = this.func();
1934 var receiver = this.receiver(); 1935 var receiver = this.receiver();
1935 if (this.isConstructCall()) { 1936 if (this.isConstructCall()) {
1936 // For constructor frames display new followed by the function name. 1937 // For constructor frames display new followed by the function name.
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
2400 "GeneratorMirror", GeneratorMirror, 2401 "GeneratorMirror", GeneratorMirror,
2401 "PropertyMirror", PropertyMirror, 2402 "PropertyMirror", PropertyMirror,
2402 "InternalPropertyMirror", InternalPropertyMirror, 2403 "InternalPropertyMirror", InternalPropertyMirror,
2403 "FrameMirror", FrameMirror, 2404 "FrameMirror", FrameMirror,
2404 "ScriptMirror", ScriptMirror, 2405 "ScriptMirror", ScriptMirror,
2405 "ScopeMirror", ScopeMirror, 2406 "ScopeMirror", ScopeMirror,
2406 "FrameDetails", FrameDetails, 2407 "FrameDetails", FrameDetails,
2407 ]); 2408 ]);
2408 2409
2409 }) 2410 })
OLDNEW
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698