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

Unified Diff: src/array-iterator.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/array.js ('k') | src/arraybuffer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array-iterator.js
diff --git a/src/array-iterator.js b/src/array-iterator.js
index 67f1eeff9ed4eca712dec66247eb821d76d75f39..e59bfd782ab0f24f5c76b3d1cd108fddfed1a6f6 100644
--- a/src/array-iterator.js
+++ b/src/array-iterator.js
@@ -14,12 +14,14 @@ var $arrayValues;
// Imports
var arrayIterationKindSymbol =
- utils.GetPrivateSymbol("array_iteration_kind_symbol");
+ utils.ImportNow("array_iteration_kind_symbol");
var arrayIteratorNextIndexSymbol =
- utils.GetPrivateSymbol("array_iterator_next_symbol");
+ utils.ImportNow("array_iterator_next_symbol");
var arrayIteratorObjectSymbol =
- utils.GetPrivateSymbol("array_iterator_object_symbol");
+ utils.ImportNow("array_iterator_object_symbol");
var GlobalArray = global.Array;
+var iteratorSymbol = utils.ImportNow("iterator_symbol");
+var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
macro TYPED_ARRAYS(FUNCTION)
FUNCTION(Uint8Array)
@@ -132,10 +134,10 @@ function ArrayKeys() {
utils.InstallFunctions(ArrayIterator.prototype, DONT_ENUM, [
'next', ArrayIteratorNext
]);
-utils.SetFunctionName(ArrayIteratorIterator, symbolIterator);
-%AddNamedProperty(ArrayIterator.prototype, symbolIterator,
+utils.SetFunctionName(ArrayIteratorIterator, iteratorSymbol);
+%AddNamedProperty(ArrayIterator.prototype, iteratorSymbol,
ArrayIteratorIterator, DONT_ENUM);
-%AddNamedProperty(ArrayIterator.prototype, symbolToStringTag,
+%AddNamedProperty(ArrayIterator.prototype, toStringTagSymbol,
"Array Iterator", READ_ONLY | DONT_ENUM);
utils.InstallFunctions(GlobalArray.prototype, DONT_ENUM, [
@@ -148,14 +150,14 @@ utils.InstallFunctions(GlobalArray.prototype, DONT_ENUM, [
// InstallFunctions block, as it'll be redundant.
utils.SetFunctionName(ArrayValues, 'values');
-%AddNamedProperty(GlobalArray.prototype, symbolIterator, ArrayValues,
+%AddNamedProperty(GlobalArray.prototype, iteratorSymbol, ArrayValues,
DONT_ENUM);
macro EXTEND_TYPED_ARRAY(NAME)
%AddNamedProperty(GlobalNAME.prototype, 'entries', ArrayEntries, DONT_ENUM);
%AddNamedProperty(GlobalNAME.prototype, 'values', ArrayValues, DONT_ENUM);
%AddNamedProperty(GlobalNAME.prototype, 'keys', ArrayKeys, DONT_ENUM);
- %AddNamedProperty(GlobalNAME.prototype, symbolIterator, ArrayValues,
+ %AddNamedProperty(GlobalNAME.prototype, iteratorSymbol, ArrayValues,
DONT_ENUM);
endmacro
« no previous file with comments | « src/array.js ('k') | src/arraybuffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698