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

Method createArena

valdi/src/valdi/runtime/JavaScript/Modules/ProtobufModule.cpp:855–865  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

853 auto arena = Valdi::makeShared<ProtobufArena>(eagerDecoding, includeAllFieldsDuringEncoding);
854
855 return makeWrappedObject(callContext.getContext(), arena, callContext.getExceptionTracker(), true);
856}
857
858// NOLINTNEXTLINE(readability-convert-member-functions-to-static)
859JSValueRef ProtobufModule::getFieldsForMessageDescriptor(JSFunctionNativeCallContext& callContext) {
860 auto messageFactory = getMessageFactory(callContext, 0);
861 CHECK_CALL_CONTEXT(callContext);
862
863 auto descriptorIndex = getIndex(callContext, 1);
864 CHECK_CALL_CONTEXT(callContext);
865
866 // Hold the factory lock for the entire sequence of factory calls so they complete atomically.
867 auto factoryLock = messageFactory->lock();
868

Callers

nothing calls this directly

Calls 3

makeWrappedObjectFunction · 0.85
getParameterAsBoolMethod · 0.45
getContextMethod · 0.45

Tested by

no test coverage detected