diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-08 15:03:53 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:15 -0400 |
commit | 30f6299c5a9a3ba68d592779b0c5404ebe22683d (patch) | |
tree | b07587264a039e817a5fa003f7e8060c543e1db9 /js/src/tests | |
parent | d5833cd1bf99a3188d02fe4ef77a51aea528d91f (diff) | |
download | uxp-30f6299c5a9a3ba68d592779b0c5404ebe22683d.tar.gz |
636635 - Do not create named lambda binding for a function created by Function constructor.
Diffstat (limited to 'js/src/tests')
-rw-r--r-- | js/src/tests/ecma_6/Function/constructor-binding.js | 11 |
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 0000000000..e82274d279 --- /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); |