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

Method callCompletionWithValue

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

Source from the content-addressed store, hash-verified

76 ScopedNativeCallActivity activity(getAttributingRuntime(callContext.getContext(), _anrAttribution),
77 _anrAttribution);
78 JSPromiseOnFulfilled::callCompletionWithValue(callContext.getContext(),
79 callContext.getParameter(0),
80 _valueMarshaller,
81 _callback,
82 callContext.getExceptionTracker());
83
84 return callContext.getContext().newUndefined();
85}
86
87void JSPromiseOnFulfilled::callCompletionWithValue(IJavaScriptContext& jsContext,
88 const JSValue& value,
89 const Ref<ValueMarshaller<JSValueRef>>& valueMarshaller,
90 const Ref<PromiseCallback>& callback,
91 JSExceptionTracker& exceptionTracker) {
92 auto resolvedValue = JSValueRef::makeUnretained(jsContext, value);
93 auto marshalledValue = valueMarshaller->marshall(nullptr, resolvedValue, ReferenceInfoBuilder(), exceptionTracker);
94

Callers

nothing calls this directly

Calls 5

extractErrorMethod · 0.80
marshallMethod · 0.45
onFailureMethod · 0.45
onSuccessMethod · 0.45

Tested by

no test coverage detected