summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-08 15:03:53 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:15 -0400
commit986ae6266566447f22be68caf6371cbf98cafd52 (patch)
treeb07587264a039e817a5fa003f7e8060c543e1db9 /js/src/tests/ecma_6
parent7ecc50d90d13690d610f26d0056a326e52bc834c (diff)
downloadUXP-986ae6266566447f22be68caf6371cbf98cafd52.tar
UXP-986ae6266566447f22be68caf6371cbf98cafd52.tar.gz
UXP-986ae6266566447f22be68caf6371cbf98cafd52.tar.lz
UXP-986ae6266566447f22be68caf6371cbf98cafd52.tar.xz
UXP-986ae6266566447f22be68caf6371cbf98cafd52.zip
636635 - Do not create named lambda binding for a function created by Function constructor.
Diffstat (limited to 'js/src/tests/ecma_6')
-rw-r--r--js/src/tests/ecma_6/Function/constructor-binding.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Function/constructor-binding.js b/js/src/tests/ecma_6/Function/constructor-binding.js
new file mode 100644
index 000000000..e82274d27
--- /dev/null
+++ b/js/src/tests/ecma_6/Function/constructor-binding.js
@@ -0,0 +1,11 @@
+var BUGNUMBER = 636635;
+var summary = "A function created by Function constructor shouldn't have anonymous binding";
+
+print(BUGNUMBER + ": " + summary);
+
+assertEq(new Function("return typeof anonymous")(), "undefined");
+assertEq(new Function("return function() { return typeof anonymous; }")()(), "undefined");
+assertEq(new Function("return function() { eval(''); return typeof anonymous; }")()(), "undefined");
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);