Function js::jsapi::NewPromiseObject
[−]
[src]
pub unsafe extern "C" fn NewPromiseObject(
cx: *mut JSContext,
executor: HandleObject,
proto: HandleObject
) -> *mut JSObject
Returns a new instance of the Promise builtin class in the current
compartment, with the right slot layout. If a proto
is passed, that gets
set as the instance's [[Prototype]] instead of the original value of
Promise.prototype
.