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

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

Issue 1318043002: Native context: do not put public symbols and flags on the js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix and rebase Created 5 years, 3 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/date.js ('k') | src/factory.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
11 var FunctionSourceString; 11 var FunctionSourceString;
12 var GlobalArray = global.Array; 12 var GlobalArray = global.Array;
13 var IsNaN = global.isNaN; 13 var IsNaN = global.isNaN;
14 var JSONStringify = global.JSON.stringify; 14 var JSONStringify = global.JSON.stringify;
15 var MathMin = global.Math.min; 15 var MathMin = global.Math.min;
16 var promiseStatusSymbol = utils.GetPrivateSymbol("promise_status_symbol"); 16 var promiseStatusSymbol = utils.ImportNow("promise_status_symbol");
17 var promiseValueSymbol = utils.GetPrivateSymbol("promise_value_symbol"); 17 var promiseValueSymbol = utils.ImportNow("promise_value_symbol");
18 var SymbolToString;
18 var ToBoolean; 19 var ToBoolean;
19 var ToString; 20 var ToString;
20 21
21 utils.Import(function(from) { 22 utils.Import(function(from) {
22 FunctionSourceString = from.FunctionSourceString; 23 FunctionSourceString = from.FunctionSourceString;
24 SymbolToString = from.SymbolToString;
23 ToBoolean = from.ToBoolean; 25 ToBoolean = from.ToBoolean;
24 ToString = from.ToString; 26 ToString = from.ToString;
25 }); 27 });
26 28
27 // ---------------------------------------------------------------------------- 29 // ----------------------------------------------------------------------------
28 30
29 // Mirror hierarchy: 31 // Mirror hierarchy:
30 // - Mirror 32 // - Mirror
31 // - ValueMirror 33 // - ValueMirror
32 // - UndefinedMirror 34 // - UndefinedMirror
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 } 689 }
688 inherits(SymbolMirror, ValueMirror); 690 inherits(SymbolMirror, ValueMirror);
689 691
690 692
691 SymbolMirror.prototype.description = function() { 693 SymbolMirror.prototype.description = function() {
692 return %SymbolDescription(%_ValueOf(this.value_)); 694 return %SymbolDescription(%_ValueOf(this.value_));
693 } 695 }
694 696
695 697
696 SymbolMirror.prototype.toText = function() { 698 SymbolMirror.prototype.toText = function() {
697 return %_CallFunction(this.value_, builtins.$symbolToString); 699 return %_CallFunction(this.value_, SymbolToString);
698 } 700 }
699 701
700 702
701 /** 703 /**
702 * Mirror object for objects. 704 * Mirror object for objects.
703 * @param {object} value The object reflected by this mirror 705 * @param {object} value The object reflected by this mirror
704 * @param {boolean} transient indicate whether this object is transient with a 706 * @param {boolean} transient indicate whether this object is transient with a
705 * transient handle 707 * transient handle
706 * @constructor 708 * @constructor
707 * @extends ValueMirror 709 * @extends ValueMirror
(...skipping 2401 matching lines...) Expand 10 before | Expand all | Expand 10 after
3109 // Functions needed by the debugger runtime. 3111 // Functions needed by the debugger runtime.
3110 utils.InstallFunctions(utils, DONT_ENUM, [ 3112 utils.InstallFunctions(utils, DONT_ENUM, [
3111 "ClearMirrorCache", ClearMirrorCache 3113 "ClearMirrorCache", ClearMirrorCache
3112 ]); 3114 ]);
3113 3115
3114 // Export to debug.js 3116 // Export to debug.js
3115 utils.Export(function(to) { 3117 utils.Export(function(to) {
3116 to.MirrorType = MirrorType; 3118 to.MirrorType = MirrorType;
3117 }); 3119 });
3118 }) 3120 })
OLDNEW
« no previous file with comments | « src/date.js ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698