summaryrefslogtreecommitdiff
path: root/core/00_primordials.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/00_primordials.js')
-rw-r--r--core/00_primordials.js24
1 files changed, 20 insertions, 4 deletions
diff --git a/core/00_primordials.js b/core/00_primordials.js
index f49a11de4..60474e649 100644
--- a/core/00_primordials.js
+++ b/core/00_primordials.js
@@ -405,7 +405,11 @@
Map,
class SafeMap extends Map {
constructor(i) {
- super(i);
+ if (i == null) {
+ super();
+ return;
+ }
+ super(new SafeArrayIterator(i));
}
},
);
@@ -413,7 +417,11 @@
WeakMap,
class SafeWeakMap extends WeakMap {
constructor(i) {
- super(i);
+ if (i == null) {
+ super();
+ return;
+ }
+ super(new SafeArrayIterator(i));
}
},
);
@@ -422,7 +430,11 @@
Set,
class SafeSet extends Set {
constructor(i) {
- super(i);
+ if (i == null) {
+ super();
+ return;
+ }
+ super(new SafeArrayIterator(i));
}
},
);
@@ -430,7 +442,11 @@
WeakSet,
class SafeWeakSet extends WeakSet {
constructor(i) {
- super(i);
+ if (i == null) {
+ super();
+ return;
+ }
+ super(new SafeArrayIterator(i));
}
},
);