1325606 - Return wrapped async function from caller property.

This commit is contained in:
Gaming4JC 2019-06-08 16:16:14 -04:00 committed by Roy Tam
commit ff46e0c58c
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,26 @@
var BUGNUMBER = 1185106;
var summary = "caller property of function inside async function should return wrapped async function";
print(BUGNUMBER + ": " + summary);
(async function f() {
var inner = (function g() {
return g.caller;
})();
assertEq(inner, f);
})();
(async function f() {
"use strict";
try {
(function g() {
return g.caller;
})();
assertEq(true, false);
} catch (e) {
assertEq(e instanceof TypeError, true);
}
})();
if (typeof reportCompare === "function")
reportCompare(true, true);