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