Skip to main content

MaybeGetPromiseAllocationSiteFromPossiblyWrappedPromise

Function MaybeGetPromiseAllocationSiteFromPossiblyWrappedPromise 

Source
pub unsafe extern "C" fn MaybeGetPromiseAllocationSiteFromPossiblyWrappedPromise(
    maybePromise: Handle<*mut JSObject>,
) -> *mut JSObject
Expand description

A more flexible version of the above: Handles the cases where

  1. maybePromise is wrapped
  2. maybePromise is null
  3. maybePromise isn’t actually a promise.

Returns js::SavedFrame if the passed argument is a wrapped promise (that’s not a dead object wrapper) and it has an allocation site.