| 605 | } |
| 606 | |
| 607 | jsi::PropNameID V8Runtime::createPropNameIDFromString(const jsi::String &str) { |
| 608 | v8::Locker locker(isolate_); |
| 609 | v8::Isolate::Scope scopedIsolate(isolate_); |
| 610 | v8::HandleScope scopedHandle(isolate_); |
| 611 | v8::Context::Scope scopedContext(context_.Get(isolate_)); |
| 612 | |
| 613 | const V8PointerValue *v8PointerValue = |
| 614 | static_cast<const V8PointerValue *>(getPointerValue(str)); |
| 615 | assert(v8PointerValue->Get(isolate_)->IsString()); |
| 616 | |
| 617 | v8::String::Utf8Value utf8(isolate_, v8PointerValue->Get(isolate_)); |
| 618 | return createPropNameIDFromUtf8( |
| 619 | reinterpret_cast<const uint8_t *>(*utf8), utf8.length()); |
| 620 | } |
| 621 | |
| 622 | #if REACT_NATIVE_MINOR_VERSION >= 69 |
| 623 | jsi::PropNameID V8Runtime::createPropNameIDFromSymbol( |