JSFunction* js::GetUnwrappedAsyncFunction(JSFunction* wrapped) { MOZ_ASSERT(IsWrappedAsyncFunction(wrapped)); JSFunction* unwrapped = &wrapped->getExtendedSlot(WRAPPED_ASYNC_UNWRAPPED_SLOT).toObject().as<JSFunction>(); MOZ_ASSERT(unwrapped->isAsync()); return unwrapped; }