pub unsafe extern "C" fn CallOriginalPromiseThen(
cx: *mut JSContext,
promise: Handle<*mut JSObject>,
onFulfilled: Handle<*mut JSObject>,
onRejected: Handle<*mut JSObject>,
) -> *mut JSObject
Expand description
Create a Promise with the given fulfill/reject handlers, that will be
fulfilled/rejected with the value/reason that the promise promise
is
fulfilled/rejected with.
This function basically acts like promise.then(onFulfilled, onRejected)
,
except that its behavior is unaffected by changes to Promise
,
Promise[Symbol.species]
, Promise.prototype.then
, promise.constructor
,
promise.then
, and so on.
This function throws if promise
is not a Promise from this or another
realm.
This function will assert if onFulfilled
or onRejected
is non-null and
also not IsCallable.