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

Function fromValdiJSPropertyName

valdi/src/valdi/v8/V8JavaScriptContext.cpp:111–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111inline v8::Local<v8::String> fromValdiJSPropertyName(v8::Isolate* isolate,
112 const JSPropertyName& value,
113 JSExceptionTracker& exceptionTracker) {
114 auto indirect = fromValdiJSPropertyNameToIndirect(value);
115 auto retval = indirect.get(isolate);
116 if (retval.IsEmpty() || !retval->IsString()) {
117 exceptionTracker.onError("Failed to get the underlying key for property name");
118 return v8::Local<v8::String>();
119 } else {
120 return v8::Local<v8::String>::Cast(retval);
121 }
122}
123
124inline JSValueRef V8JavaScriptContext::toRetainedJSValueRef(const IndirectV8Persistent& value) {
125 return JSValueRef::makeRetained(*this, toValdiJSValue(value));

Callers 4

propertyNameToStringMethod · 0.70
getObjectPropertyMethod · 0.70
hasObjectPropertyMethod · 0.70
setObjectPropertyMethod · 0.70

Calls 6

IsStringMethod · 0.80
getMethod · 0.65
onErrorMethod · 0.65
CastFunction · 0.50
IsEmptyMethod · 0.45

Tested by

no test coverage detected