| Index: src/collection.js
|
| diff --git a/src/collection.js b/src/collection.js
|
| index 01537e87b0973cee8a65fc759c17fad43fbf7387..deb1a8d902a2dfcbeb97c4902aa10139c233127d 100644
|
| --- a/src/collection.js
|
| +++ b/src/collection.js
|
| @@ -44,11 +44,7 @@ var undefined_sentinel = {};
|
| // Harmony Set
|
|
|
| function SetConstructor() {
|
| - if (%_IsConstructCall()) {
|
| - %SetInitialize(this);
|
| - } else {
|
| - throw MakeTypeError('constructor_not_function', ['Set']);
|
| - }
|
| + %SetInitialize(this);
|
| }
|
|
|
|
|
| @@ -108,7 +104,7 @@ function SetClear() {
|
| ['Set.prototype.clear', this]);
|
| }
|
| // Replace the internal table with a new empty table.
|
| - %SetInitialize(this);
|
| + %SetClear(this);
|
| }
|
|
|
|
|
| @@ -138,11 +134,7 @@ SetUpSet();
|
| // Harmony Map
|
|
|
| function MapConstructor() {
|
| - if (%_IsConstructCall()) {
|
| - %MapInitialize(this);
|
| - } else {
|
| - throw MakeTypeError('constructor_not_function', ['Map']);
|
| - }
|
| + %MapInitialize(this);
|
| }
|
|
|
|
|
| @@ -209,7 +201,7 @@ function MapClear() {
|
| ['Map.prototype.clear', this]);
|
| }
|
| // Replace the internal table with a new empty table.
|
| - %MapInitialize(this);
|
| + %MapClear(this);
|
| }
|
|
|
|
|
| @@ -240,11 +232,7 @@ SetUpMap();
|
| // Harmony WeakMap
|
|
|
| function WeakMapConstructor() {
|
| - if (%_IsConstructCall()) {
|
| - %WeakCollectionInitialize(this);
|
| - } else {
|
| - throw MakeTypeError('constructor_not_function', ['WeakMap']);
|
| - }
|
| + %WeakMapInitialize(this);
|
| }
|
|
|
|
|
| @@ -302,7 +290,7 @@ function WeakMapClear() {
|
| ['WeakMap.prototype.clear', this]);
|
| }
|
| // Replace the internal table with a new empty table.
|
| - %WeakCollectionInitialize(this);
|
| + %WeakCollectionClear(this);
|
| }
|
|
|
|
|
| @@ -332,11 +320,7 @@ SetUpWeakMap();
|
| // Harmony WeakSet
|
|
|
| function WeakSetConstructor() {
|
| - if (%_IsConstructCall()) {
|
| - %WeakCollectionInitialize(this);
|
| - } else {
|
| - throw MakeTypeError('constructor_not_function', ['WeakSet']);
|
| - }
|
| + %WeakSetInitialize(this);
|
| }
|
|
|
|
|
| @@ -382,7 +366,7 @@ function WeakSetClear() {
|
| ['WeakSet.prototype.clear', this]);
|
| }
|
| // Replace the internal table with a new empty table.
|
| - %WeakCollectionInitialize(this);
|
| + %WeakCollectionClear(this);
|
| }
|
|
|
|
|
|
|