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

Method importModule

valdi/src/valdi/runtime/JavaScript/JavaScriptRuntime.cpp:2590–2598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2588 return callContext.getContext().newUndefined();
2589}
2590
2591// worker.postMessage(any, MessagePort[] | undefined)
2592JSValueRef JavaScriptRuntime::workerPostMessage(JSFunctionNativeCallContext& callContext) {
2593 auto worker = thisFromCallContext<JavaScriptWorker>(callContext);
2594 if (worker != nullptr) {
2595 ScopedNativeCallActivity activity(this, worker->getSendANRAttribution());
2596 auto data = callContext.getParameterAsValue(0);
2597 CHECK_CALL_CONTEXT(callContext);
2598 auto transfer = callContext.getParameterSize() > 1 ? callContext.getParameterAsValue(1) : Value::undefined();
2599 CHECK_CALL_CONTEXT(callContext);
2600 auto message = JavaScriptMessage::make(data, transfer, nullptr);
2601 if (!message) {

Callers 5

callModuleFunctionMethod · 0.95
registerTypeConverterMethod · 0.95
evalModuleSyncMethod · 0.95

Calls 11

getBundleMethod · 0.80
callObjectPropertyMethod · 0.80
valueMethod · 0.65
endMethod · 0.65
getMethod · 0.65
findMethod · 0.45
toAbsolutePathMethod · 0.45
newStringUTF8Method · 0.45
newBoolMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected