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

Side by Side Diff: src/js/symbol.js

Issue 1413173003: Move error message makers off js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 2 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/js/string-iterator.js ('k') | src/js/typedarray.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
11 // ------------------------------------------------------------------- 11 // -------------------------------------------------------------------
12 // Imports 12 // Imports
13 13
14 var GlobalObject = global.Object; 14 var GlobalObject = global.Object;
15 var GlobalSymbol = global.Symbol; 15 var GlobalSymbol = global.Symbol;
16 var hasInstanceSymbol = utils.ImportNow("has_instance_symbol"); 16 var hasInstanceSymbol = utils.ImportNow("has_instance_symbol");
17 var isConcatSpreadableSymbol = 17 var isConcatSpreadableSymbol =
18 utils.ImportNow("is_concat_spreadable_symbol"); 18 utils.ImportNow("is_concat_spreadable_symbol");
19 var isRegExpSymbol = utils.ImportNow("is_regexp_symbol"); 19 var isRegExpSymbol = utils.ImportNow("is_regexp_symbol");
20 var iteratorSymbol = utils.ImportNow("iterator_symbol"); 20 var iteratorSymbol = utils.ImportNow("iterator_symbol");
21 var MakeTypeError;
21 var ObjectGetOwnPropertyKeys; 22 var ObjectGetOwnPropertyKeys;
22 var toPrimitiveSymbol = utils.ImportNow("to_primitive_symbol"); 23 var toPrimitiveSymbol = utils.ImportNow("to_primitive_symbol");
23 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); 24 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
24 var unscopablesSymbol = utils.ImportNow("unscopables_symbol"); 25 var unscopablesSymbol = utils.ImportNow("unscopables_symbol");
25 26
26 utils.Import(function(from) { 27 utils.Import(function(from) {
28 MakeTypeError = from.MakeTypeError;
27 ObjectGetOwnPropertyKeys = from.ObjectGetOwnPropertyKeys; 29 ObjectGetOwnPropertyKeys = from.ObjectGetOwnPropertyKeys;
28 }); 30 });
29 31
30 // ------------------------------------------------------------------- 32 // -------------------------------------------------------------------
31 33
32 // 19.4.3.4 Symbol.prototype [ @@toPrimitive ] ( hint ) 34 // 19.4.3.4 Symbol.prototype [ @@toPrimitive ] ( hint )
33 function SymbolToPrimitive(hint) { 35 function SymbolToPrimitive(hint) {
34 if (!(IS_SYMBOL(this) || IS_SYMBOL_WRAPPER(this))) { 36 if (!(IS_SYMBOL(this) || IS_SYMBOL_WRAPPER(this))) {
35 throw MakeTypeError(kIncompatibleMethodReceiver, 37 throw MakeTypeError(kIncompatibleMethodReceiver,
36 "Symbol.prototype [ @@toPrimitive ]", this); 38 "Symbol.prototype [ @@toPrimitive ]", this);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ]); 127 ]);
126 128
127 // ------------------------------------------------------------------- 129 // -------------------------------------------------------------------
128 // Exports 130 // Exports
129 131
130 utils.Export(function(to) { 132 utils.Export(function(to) {
131 to.SymbolToString = SymbolToString; 133 to.SymbolToString = SymbolToString;
132 }) 134 })
133 135
134 }) 136 })
OLDNEW
« no previous file with comments | « src/js/string-iterator.js ('k') | src/js/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698