mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-02 20:47:33 +09:00
parent
3b34f87a5b
commit
748c69d7fd
30 changed files with 750 additions and 81 deletions
|
|
@ -116,7 +116,7 @@ js::WrapAsyncFunctionWithProto(JSContext* cx, HandleFunction unwrapped, HandleOb
|
|||
// Create a new function with AsyncFunctionPrototype, reusing the name and
|
||||
// the length of `unwrapped`.
|
||||
|
||||
RootedAtom funName(cx, unwrapped->name());
|
||||
RootedAtom funName(cx, unwrapped->explicitName());
|
||||
uint16_t length;
|
||||
if (!unwrapped->getLength(cx, &length))
|
||||
return nullptr;
|
||||
|
|
@ -130,6 +130,9 @@ js::WrapAsyncFunctionWithProto(JSContext* cx, HandleFunction unwrapped, HandleOb
|
|||
if (!wrapped)
|
||||
return nullptr;
|
||||
|
||||
if (unwrapped->hasCompileTimeName())
|
||||
wrapped->setCompileTimeName(unwrapped->compileTimeName());
|
||||
|
||||
// Link them to each other to make GetWrappedAsyncFunction and
|
||||
// GetUnwrappedAsyncFunction work.
|
||||
unwrapped->setExtendedSlot(UNWRAPPED_ASYNC_WRAPPED_SLOT, ObjectValue(*wrapped));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue