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

Function getBuildType

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

Source from the content-addressed store, hash-verified

2199 }
2200 }
2201 });
2202 }
2203 return callContext.getContext().newUndefined();
2204}
2205
2206JSValueRef JavaScriptRuntime::runtimeSetColorPalette(JSFunctionNativeCallContext& callContext) {
2207 if (!_isWorker) {
2208 auto colorPaletteMap = callContext.getParameterAsValue(0);
2209 CHECK_CALL_CONTEXT(callContext);
2210
2211 dispatchOnMainThread([weakSelf = weakRef(this), colorPaletteMap = std::move(colorPaletteMap)]() {
2212 auto self = weakSelf.lock();
2213 if (self != nullptr) {
2214 if (auto listener = self->getListener()) {
2215 listener->configureColorPalette(STRING_LITERAL("default"), colorPaletteMap);
2216 listener->setActiveColorPalette(STRING_LITERAL("default"));
2217 }
2218 }
2219 });
2220 }
2221 return callContext.getContext().newUndefined();
2222}

Callers 1

buildContextMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected