MCPcopy Create free account
hub / github.com/Snapchat/Valdi / onComplete

Method onComplete

valdi/src/valdi/runtime/JavaScript/JSPromise.cpp:133–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 return callContext.getContext().newUndefined();
132}
133
134JSPromise::JSPromise(IJavaScriptContext& jsContext,
135 const JSValue& jsValue,
136 const ReferenceInfo& referenceInfo,
137 const Ref<ValueMarshaller<JSValueRef>>& valueMarshaller,
138 JSExceptionTracker& exceptionTracker)
139 : _jsValue(jsContext, jsValue, referenceInfo, exceptionTracker, false),
140 _valueMarshaller(valueMarshaller),
141 _cancelable(JSPromiseCancel::isJSPromiseCancelable(jsContext, jsValue)) {
142 // onComplete() runs a task later, after the engine has already flushed its rejection tracker.
143 jsContext.markPromiseRejectionHandled(jsValue);
144}

Callers

nothing calls this directly

Calls 5

doOnCompleteMethod · 0.95
strongSmallRefFunction · 0.85
getTaskSchedulerMethod · 0.45
getContextMethod · 0.45

Tested by

no test coverage detected