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

Unified Diff: src/collection.js

Issue 448013005: ES6: Implement WeakMap and WeakSet constructor logic (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « no previous file | src/v8natives.js » ('j') | test/mjsunit/es6/collections.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/collection.js
diff --git a/src/collection.js b/src/collection.js
index e5fc0b33c8813a8071b85871d59166eca6d76eee..5e4421eb1072448a186f47eb85f909cb60bdf6bb 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -12,35 +12,6 @@ var $Set = global.Set;
var $Map = global.Map;
-// TODO(arv): Move these general functions to v8natives.js when Map and Set are
-// no longer experimental.
-
-
-// 7.4.1 CheckIterable ( obj )
-function ToIterable(obj) {
- if (!IS_SPEC_OBJECT(obj)) {
- return UNDEFINED;
- }
- return obj[symbolIterator];
-}
-
-
-// 7.4.2 GetIterator ( obj, method )
-function GetIterator(obj, method) {
- if (IS_UNDEFINED(method)) {
- method = ToIterable(obj);
- }
- if (!IS_SPEC_FUNCTION(method)) {
- throw MakeTypeError('not_iterable', [obj]);
- }
- var iterator = %_CallFunction(obj, method);
- if (!IS_SPEC_OBJECT(iterator)) {
- throw MakeTypeError('not_an_iterator', [iterator]);
- }
- return iterator;
-}
-
-
// -------------------------------------------------------------------
// Harmony Set
« no previous file with comments | « no previous file | src/v8natives.js » ('j') | test/mjsunit/es6/collections.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698