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

Method valueToString

valdi/src/valdi/jscore/JavaScriptCoreContext.cpp:518–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516 Valdi::JSExceptionTracker& exceptionTracker) {
517 Valdi::SmallVector<JSValueRef, 16> temp;
518 for (size_t i = 0; i < size; i++) {
519 temp.emplace_back(fromValdiJSValue(values[i]).valueRef);
520 }
521
522 JSValueRef exception = nullptr;
523 auto array = JSObjectMakeArray(getJSGlobalContext(), size, temp.data(), &exception);
524 return checkCallAndGetValue(exceptionTracker, array, exception);
525}
526
527void bufferDeallocator(void* bytes, void* deallocatorContext) {
528 Valdi::RefCountableAutoreleasePool::release(deallocatorContext);
529}
530
531Valdi::JSValueRef JavaScriptCoreContext::newArrayBuffer(const Valdi::BytesView& buffer,
532 Valdi::JSExceptionTracker& exceptionTracker) {
533 auto context = getJSGlobalContext();

Callers

nothing calls this directly

Calls 3

jsStringtoStdStringFunction · 0.85
fromValdiJSValueFunction · 0.70
StringBoxClass · 0.50

Tested by

no test coverage detected