summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Temporal
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/non262/Temporal')
-rw-r--r--js/src/tests/non262/Temporal/TimeZone/browser.js0
-rw-r--r--js/src/tests/non262/Temporal/TimeZone/getPossibleInstantsFor-returns-dead-proxy.js21
-rw-r--r--js/src/tests/non262/Temporal/TimeZone/shell.js0
-rw-r--r--js/src/tests/non262/Temporal/browser.js0
-rw-r--r--js/src/tests/non262/Temporal/shell.js0
5 files changed, 21 insertions, 0 deletions
diff --git a/js/src/tests/non262/Temporal/TimeZone/browser.js b/js/src/tests/non262/Temporal/TimeZone/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/non262/Temporal/TimeZone/browser.js
diff --git a/js/src/tests/non262/Temporal/TimeZone/getPossibleInstantsFor-returns-dead-proxy.js b/js/src/tests/non262/Temporal/TimeZone/getPossibleInstantsFor-returns-dead-proxy.js
new file mode 100644
index 0000000000..0af1889bea
--- /dev/null
+++ b/js/src/tests/non262/Temporal/TimeZone/getPossibleInstantsFor-returns-dead-proxy.js
@@ -0,0 +1,21 @@
+// |reftest| skip-if(!this.hasOwnProperty("Temporal")||!xulRuntime.shell)
+
+var g = newGlobal({newCompartment: true});
+
+var tz = new class extends Temporal.TimeZone {
+ *getPossibleInstantsFor() {
+ // Return an Instant from a different compartment.
+ yield new g.Temporal.Instant(0n);
+
+ // Turn the CCW into a dead proxy wrapper.
+ nukeAllCCWs();
+ }
+}("UTC");
+
+var dt = new Temporal.PlainDateTime(2000, 1, 1);
+
+// Throws a TypeError when attempting to unwrap the dead proxy.
+assertThrowsInstanceOf(() => dt.toZonedDateTime(tz), TypeError);
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);
diff --git a/js/src/tests/non262/Temporal/TimeZone/shell.js b/js/src/tests/non262/Temporal/TimeZone/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/non262/Temporal/TimeZone/shell.js
diff --git a/js/src/tests/non262/Temporal/browser.js b/js/src/tests/non262/Temporal/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/non262/Temporal/browser.js
diff --git a/js/src/tests/non262/Temporal/shell.js b/js/src/tests/non262/Temporal/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/non262/Temporal/shell.js