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

Method postMessage

valdi/src/valdi/runtime/JavaScript/JavaScriptWorker.cpp:59–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58 });
59}
60
61void JavaScriptWorker::setHostOnMessage(Shared<JSValueRefHolder> func) {
62 std::lock_guard<Mutex> lock(_mutex);
63 if (_state == State::Running) {
64 _hostOnMessage = std::move(func);
65 }
66}
67
68Shared<JSValueRefHolder> JavaScriptWorker::getHostOnMessage() const {

Callers

nothing calls this directly

Calls 3

doPostMessageMethod · 0.95
strongSmallRefFunction · 0.85
dispatchOnJsThreadMethod · 0.45

Tested by

no test coverage detected