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

Method newPropertyName

valdi/src/valdi/v8/V8JavaScriptContext.cpp:255–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253 return BytesView();
254}
255
256JSPropertyNameRef V8JavaScriptContext::newPropertyName(const std::string_view& str) {
257 v8::HandleScope handleScope(_isolate);
258
259 auto maybeValue =
260 v8::String::NewFromUtf8(_isolate, str.data(), v8::NewStringType::kNormal, static_cast<int32_t>(str.length()));
261 v8::Local<v8::String> val;
262 if (!maybeValue.ToLocal(&val)) {
263 return JSPropertyNameRef();
264 }
265
266 return JSPropertyNameRef(this, toValdiJSPropertyName(IndirectV8Persistent::make(_isolate, val)), true);
267}
268
269StringBox V8JavaScriptContext::propertyNameToString(const JSPropertyName& propertyName) {

Callers 6

loadPropertyNamesFunction · 0.45
runtimeGetAssetsMethod · 0.45
JavaScriptObjectStoreMethod · 0.45
newObjectClassMethod · 0.45
mainFunction · 0.45

Calls 4

ToLocalMethod · 0.80
toValdiJSPropertyNameFunction · 0.70
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected