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

Method runtimeTrace

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

NOLINTNEXTLINE(readability-convert-member-functions-to-static)

Source from the content-addressed store, hash-verified

942 if (callContext.getContext().isValueUndefined(jsContextHandler)) {
943 context = _contextManager->createContext(nullptr, nullptr, /* deferRender */ true);
944 } else {
945 if (_defaultViewManagerContext == nullptr) {
946 return callContext.throwError(Error("Cannot create context without a default ViewManagerContext"));
947 }
948
949 auto handler = Valdi::makeShared<JavaScriptComponentContextHandler>(*this, nullptr, *_logger);
950 auto globalRef =
951 makeShared<JSValueRefHolder>(callContext.getContext(),
952 jsContextHandler,
953 ReferenceInfoBuilder(callContext.getReferenceInfo()).withParameter(0).build(),
954 callContext.getExceptionTracker(),
955 true);
956 handler->setJsContextHandler(globalRef);

Callers

nothing calls this directly

Calls 5

makeSubContextMethod · 0.80
getParameterMethod · 0.80
getParameterAsStringMethod · 0.45
callObjectAsFunctionMethod · 0.45
getContextMethod · 0.45

Tested by

no test coverage detected