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

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

Issue 1127693006: Reland #2 "Wrap v8natives.js into a function." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/messages.js ('k') | src/object-observe.js » ('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 "use strict"; 4 "use strict";
5 5
6 // Handle id counters. 6 // Handle id counters.
7 var next_handle_ = 0; 7 var next_handle_ = 0;
8 var next_transient_handle_ = -1; 8 var next_transient_handle_ = -1;
9 9
10 // Mirror cache. 10 // Mirror cache.
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 1001
1002 /** 1002 /**
1003 * Returns the source code for the function. 1003 * Returns the source code for the function.
1004 * @return {string or undefined} The source code for the function. If the 1004 * @return {string or undefined} The source code for the function. If the
1005 * function is not resolved undefined will be returned. 1005 * function is not resolved undefined will be returned.
1006 */ 1006 */
1007 FunctionMirror.prototype.source = function() { 1007 FunctionMirror.prototype.source = function() {
1008 // Return source if function is resolved. Otherwise just fall through to 1008 // Return source if function is resolved. Otherwise just fall through to
1009 // return undefined. 1009 // return undefined.
1010 if (this.resolved()) { 1010 if (this.resolved()) {
1011 return builtins.FunctionSourceString(this.value_); 1011 return builtins.$functionSourceString(this.value_);
1012 } 1012 }
1013 }; 1013 };
1014 1014
1015 1015
1016 /** 1016 /**
1017 * Returns the script object for the function. 1017 * Returns the script object for the function.
1018 * @return {ScriptMirror or undefined} Script object for the function or 1018 * @return {ScriptMirror or undefined} Script object for the function or
1019 * undefined if the function has no script 1019 * undefined if the function has no script
1020 */ 1020 */
1021 FunctionMirror.prototype.script = function() { 1021 FunctionMirror.prototype.script = function() {
(...skipping 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after
3062 } 3062 }
3063 if (!NUMBER_IS_FINITE(value)) { 3063 if (!NUMBER_IS_FINITE(value)) {
3064 if (value > 0) { 3064 if (value > 0) {
3065 return 'Infinity'; 3065 return 'Infinity';
3066 } else { 3066 } else {
3067 return '-Infinity'; 3067 return '-Infinity';
3068 } 3068 }
3069 } 3069 }
3070 return value; 3070 return value;
3071 } 3071 }
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698