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

Side by Side Diff: src/string-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, 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/string.js ('k') | src/symbol.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 ArrayIteratorCreateResultObject; 14 var ArrayIteratorCreateResultObject;
15 var GlobalString = global.String; 15 var GlobalString = global.String;
16 var iteratorSymbol = utils.ImportNow("iterator_symbol");
16 var stringIteratorIteratedStringSymbol = 17 var stringIteratorIteratedStringSymbol =
17 utils.GetPrivateSymbol("string_iterator_iterated_string_symbol"); 18 utils.ImportNow("string_iterator_iterated_string_symbol");
18 var stringIteratorNextIndexSymbol = 19 var stringIteratorNextIndexSymbol =
19 utils.GetPrivateSymbol("string_iterator_next_index_symbol"); 20 utils.ImportNow("string_iterator_next_index_symbol");
21 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
20 22
21 utils.Import(function(from) { 23 utils.Import(function(from) {
22 ArrayIteratorCreateResultObject = from.ArrayIteratorCreateResultObject; 24 ArrayIteratorCreateResultObject = from.ArrayIteratorCreateResultObject;
23 }); 25 });
24 26
25 // ------------------------------------------------------------------- 27 // -------------------------------------------------------------------
26 28
27 function StringIterator() {} 29 function StringIterator() {}
28 30
29 31
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 86 }
85 87
86 //------------------------------------------------------------------- 88 //-------------------------------------------------------------------
87 89
88 %FunctionSetPrototype(StringIterator, {__proto__: $iteratorPrototype}); 90 %FunctionSetPrototype(StringIterator, {__proto__: $iteratorPrototype});
89 %FunctionSetInstanceClassName(StringIterator, 'String Iterator'); 91 %FunctionSetInstanceClassName(StringIterator, 'String Iterator');
90 92
91 utils.InstallFunctions(StringIterator.prototype, DONT_ENUM, [ 93 utils.InstallFunctions(StringIterator.prototype, DONT_ENUM, [
92 'next', StringIteratorNext 94 'next', StringIteratorNext
93 ]); 95 ]);
94 %AddNamedProperty(StringIterator.prototype, symbolToStringTag, 96 %AddNamedProperty(StringIterator.prototype, toStringTagSymbol,
95 "String Iterator", READ_ONLY | DONT_ENUM); 97 "String Iterator", READ_ONLY | DONT_ENUM);
96 98
97 utils.SetFunctionName(StringPrototypeIterator, symbolIterator); 99 utils.SetFunctionName(StringPrototypeIterator, iteratorSymbol);
98 %AddNamedProperty(GlobalString.prototype, symbolIterator, 100 %AddNamedProperty(GlobalString.prototype, iteratorSymbol,
99 StringPrototypeIterator, DONT_ENUM); 101 StringPrototypeIterator, DONT_ENUM);
100 102
101 }) 103 })
OLDNEW
« no previous file with comments | « src/string.js ('k') | src/symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698