| Index: src/collection.js
|
| diff --git a/src/collection.js b/src/collection.js
|
| index 950c7e73742f8ace234ed4cdb86a81647d6a8632..c5604ab30f359b1287a664ed22d3656d8843b075 100644
|
| --- a/src/collection.js
|
| +++ b/src/collection.js
|
| @@ -295,6 +295,16 @@ function WeakMapDelete(key) {
|
| }
|
|
|
|
|
| +function WeakMapClear() {
|
| + if (!IS_WEAKMAP(this)) {
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ['WeakMap.prototype.clear', this]);
|
| + }
|
| + // Replace the internal table with a new empty table.
|
| + %WeakMapInitialize(this);
|
| +}
|
| +
|
| +
|
| // -------------------------------------------------------------------
|
|
|
| function SetUpWeakMap() {
|
| @@ -309,7 +319,8 @@ function SetUpWeakMap() {
|
| "get", WeakMapGet,
|
| "set", WeakMapSet,
|
| "has", WeakMapHas,
|
| - "delete", WeakMapDelete
|
| + "delete", WeakMapDelete,
|
| + "clear", WeakMapClear
|
| ));
|
| }
|
|
|
|
|