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

Method valueToStaticString

valdi/src/valdi/v8/V8JavaScriptContext.cpp:786–804  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

784 } else {
785 exceptionTracker.onError("Failed to set key object because it does not belong to a supported type");
786 }
787}
788
789void V8JavaScriptContext::setObjectPropertyIndex(const JSValue& object,
790 size_t index,
791 const JSValue& value,
792 JSExceptionTracker& exceptionTracker) {
793 v8::HandleScope handleScope(_isolate);
794 auto obj = v8::Local<v8::Object>::Cast(fromValdiJSValue(_isolate, object, exceptionTracker));
795 if (!exceptionTracker) {
796 return;
797 }
798 if (!obj->IsObject()) {
799 exceptionTracker.onError("Cannot setObject property on non object value");
800 return;
801 }
802
803 auto val = fromValdiJSValue(_isolate, value, exceptionTracker);
804 if (!exceptionTracker) {
805 return;
806 }
807

Callers 4

runtimeOutputLogMethod · 0.45
valueToStringMethod · 0.45

Calls 5

ToLocalMethod · 0.80
utf8DataMethod · 0.80
fromValdiJSValueFunction · 0.70
onErrorMethod · 0.65
NewFunction · 0.50

Tested by

no test coverage detected