MCPcopy Create free account
hub / github.com/Kudo/react-native-v8 / cloneString

Method cloneString

src/v8runtime/V8Runtime.cpp:536–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534#endif
535
536jsi::Runtime::PointerValue *V8Runtime::cloneString(
537 const Runtime::PointerValue *pv) {
538 if (!pv) {
539 return nullptr;
540 }
541
542 v8::Locker locker(isolate_);
543 v8::Isolate::Scope scopedIsolate(isolate_);
544 v8::HandleScope scopedHandle(isolate_);
545 v8::Context::Scope scopedContext(context_.Get(isolate_));
546
547 const V8PointerValue *v8PointerValue =
548 static_cast<const V8PointerValue *>(pv);
549 assert(v8PointerValue->Get(isolate_)->IsString());
550 return new V8PointerValue(isolate_, v8PointerValue->Get(isolate_));
551}
552
553jsi::Runtime::PointerValue *V8Runtime::cloneObject(
554 const Runtime::PointerValue *pv) {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.80

Tested by

no test coverage detected