mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
1325606 - Return wrapped async function from caller property.
This commit is contained in:
parent
e4867e8b4d
commit
ff46e0c58c
2 changed files with 30 additions and 0 deletions
26
js/src/tests/ecma_2017/AsyncFunctions/inner-caller.js
Normal file
26
js/src/tests/ecma_2017/AsyncFunctions/inner-caller.js
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue