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

Method evalModuleSync

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

Source from the content-addressed store, hash-verified

3174 }
3175 }
3176
3177 if (!_daemonClients.empty() && _onDaemonClientEventFunction) {
3178 for (const auto& it : _daemonClients) {
3179 notifyDaemonClientEvent(jsContext,
3180 DaemonClientEventTypeConnected,
3181 it.second.get(),
3182 JSValue(),
3183 _onDaemonClientEventFunction.value().get(),
3184 exceptionTracker);
3185 }
3186 }
3187 }
3188}
3189
3190void JavaScriptRuntime::onModuleUnloaded(const ResourceId& resourceId, JavaScriptEntryParameters& /*jsEntry*/) {
3191 if (resourceId == valdiModuleResourceId()) {
3192 _onDaemonClientEventFunction = Result<JSValueRef>();
3193
3194 _contextHandler->removeJsContextHandler();
3195
3196 if (_contextHandler->needsJsContextHandler()) {
3197 _pendingModulesToReload.insert(resourceId);
3198 }
3199 } else if (resourceId == symbolicatorResourceId()) {
3200 _symbolicateFunction = Result<JSValueRef>();
3201 }
3202}
3203

Callers 2

doEvalScriptMethod · 0.80
doPostInitMethod · 0.80

Calls 5

importModuleMethod · 0.95
extractErrorMethod · 0.80
insertMethod · 0.65
valueMethod · 0.65
VoidClass · 0.50

Tested by

no test coverage detected