summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/super-native-newtarget.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/warp/super-native-newtarget.js')
-rw-r--r--js/src/jit-test/tests/warp/super-native-newtarget.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/warp/super-native-newtarget.js b/js/src/jit-test/tests/warp/super-native-newtarget.js
new file mode 100644
index 0000000000..3f9fb24a3a
--- /dev/null
+++ b/js/src/jit-test/tests/warp/super-native-newtarget.js
@@ -0,0 +1,20 @@
+class A {}
+
+class B extends A {
+ constructor() {
+ super();
+ }
+}
+
+function h() {}
+h = h.bind();
+
+function f() {
+ for (var i = 0; i < 1000; ++i) {
+ var o = Reflect.construct(B, [], h);
+ }
+}
+
+for (var i = 0; i < 5; ++i) {
+ f();
+}