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

Unified Diff: src/v8natives.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/typedarray.js ('k') | src/weak-collection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 7d8b78a6b2f4ee249510421725e05328a8de8159..77a2a31a8c35f99a4ba8e0e7f00fc6cedf32de7d 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -9,20 +9,23 @@
// ----------------------------------------------------------------------------
// Imports
+var FLAG_harmony_tostring;
var GlobalArray = global.Array;
var GlobalBoolean = global.Boolean;
var GlobalFunction = global.Function;
var GlobalNumber = global.Number;
var GlobalObject = global.Object;
var InternalArray = utils.InternalArray;
+var iteratorSymbol = utils.ImportNow("iterator_symbol");
var MathAbs;
var ProxyDelegateCallAndConstruct;
var ProxyDerivedHasOwnTrap;
var ProxyDerivedKeysTrap;
var StringIndexOf;
-var ToBoolean;
-var ToNumber;
+var ToBoolean = utils.ImportNow("ToBoolean");
+var ToNumber = utils.ImportNow("ToNumber");
var ToString;
+var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
utils.Import(function(from) {
MathAbs = from.MathAbs;
@@ -30,12 +33,8 @@ utils.Import(function(from) {
ToString = from.ToString;
});
-utils.ImportNow(function(from) {
- ToBoolean = from.ToBoolean;
- ToNumber = from.ToNumber;
-});
-
utils.ImportFromExperimental(function(from) {
+ FLAG_harmony_tostring = from.FLAG_harmony_tostring;
ProxyDelegateCallAndConstruct = from.ProxyDelegateCallAndConstruct;
ProxyDerivedHasOwnTrap = from.ProxyDerivedHasOwnTrap;
ProxyDerivedKeysTrap = from.ProxyDerivedKeysTrap;
@@ -148,8 +147,8 @@ function ObjectToString() {
var tag;
// TODO(caitp): cannot wait to get rid of this flag :>
- if (harmony_tostring) {
- tag = O[symbolToStringTag];
+ if (FLAG_harmony_tostring) {
+ tag = O[toStringTagSymbol];
if (!IS_STRING(tag)) {
tag = builtinTag;
}
@@ -1773,7 +1772,7 @@ utils.InstallFunctions(GlobalFunction.prototype, DONT_ENUM, [
// 7.4.1 GetIterator ( obj, method )
function GetIterator(obj, method) {
if (IS_UNDEFINED(method)) {
- method = obj[symbolIterator];
+ method = obj[iteratorSymbol];
}
if (!IS_SPEC_FUNCTION(method)) {
throw MakeTypeError(kNotIterable, obj);
« no previous file with comments | « src/typedarray.js ('k') | src/weak-collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698