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

Side by Side Diff: src/js/weak-collection.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/v8natives.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 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 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 GetExistingHash; 14 var GetExistingHash;
15 var GetHash; 15 var GetHash;
16 var GlobalObject = global.Object; 16 var GlobalObject = global.Object;
17 var GlobalWeakMap = global.WeakMap; 17 var GlobalWeakMap = global.WeakMap;
18 var GlobalWeakSet = global.WeakSet; 18 var GlobalWeakSet = global.WeakSet;
19 var MakeTypeError;
19 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); 20 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
20 21
21 utils.Import(function(from) { 22 utils.Import(function(from) {
22 GetExistingHash = from.GetExistingHash; 23 GetExistingHash = from.GetExistingHash;
23 GetHash = from.GetHash; 24 GetHash = from.GetHash;
25 MakeTypeError = from.MakeTypeError;
24 }); 26 });
25 27
26 // ------------------------------------------------------------------- 28 // -------------------------------------------------------------------
27 // Harmony WeakMap 29 // Harmony WeakMap
28 30
29 function WeakMapConstructor(iterable) { 31 function WeakMapConstructor(iterable) {
30 if (!%_IsConstructCall()) { 32 if (!%_IsConstructCall()) {
31 throw MakeTypeError(kConstructorNotFunction, "WeakMap"); 33 throw MakeTypeError(kConstructorNotFunction, "WeakMap");
32 } 34 }
33 35
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 DONT_ENUM | READ_ONLY); 181 DONT_ENUM | READ_ONLY);
180 182
181 // Set up the non-enumerable functions on the WeakSet prototype object. 183 // Set up the non-enumerable functions on the WeakSet prototype object.
182 utils.InstallFunctions(GlobalWeakSet.prototype, DONT_ENUM, [ 184 utils.InstallFunctions(GlobalWeakSet.prototype, DONT_ENUM, [
183 "add", WeakSetAdd, 185 "add", WeakSetAdd,
184 "has", WeakSetHas, 186 "has", WeakSetHas,
185 "delete", WeakSetDelete 187 "delete", WeakSetDelete
186 ]); 188 ]);
187 189
188 }) 190 })
OLDNEW
« no previous file with comments | « src/js/v8natives.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698