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

Method workerSetOnMessage

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

worker.onmessage = func

Source from the content-addressed store, hash-verified

2171JSValueRef JavaScriptRuntime::runtimeDumpMemoryStatistics(JSFunctionNativeCallContext& callContext) {
2172 auto memoryStatistics = callContext.getContext().dumpMemoryStatistics();
2173 auto serializedMemoryStatistics =
2174 Value()
2175 .setMapValue("memoryUsageBytes", Value(static_cast<double>(memoryStatistics.memoryUsageBytes)))
2176 .setMapValue("objectsCount", Value(static_cast<double>(memoryStatistics.objectsCount)));
2177
2178 return valueToJSValue(callContext.getContext(),
2179 serializedMemoryStatistics,
2180 ReferenceInfoBuilder(),
2181 callContext.getExceptionTracker());
2182}
2183

Callers

nothing calls this directly

Calls 4

setHostOnMessageMethod · 0.80
newUndefinedMethod · 0.80
getContextMethod · 0.45

Tested by

no test coverage detected