| 1060 | } |
| 1061 | |
| 1062 | static auto make(StoreImpl* store, v8::Local<v8::Object> obj) -> own<Ref> { |
| 1063 | static_assert(sizeof(RefImpl) == sizeof(v8::Persistent<v8::Object>), |
| 1064 | "incompatible object layout"); |
| 1065 | auto self = static_cast<RefImpl*>(store->make_handle()); |
| 1066 | if (!self) return nullptr; |
| 1067 | self->Reset(store->isolate(), obj); |
| 1068 | stats.make(Stats::categorize(*self), self); |
| 1069 | return own<Ref>(self); |
| 1070 | } |
| 1071 | |
| 1072 | auto copy() const -> own<Ref> { |
| 1073 | v8::HandleScope handle_scope(isolate()); |
nothing calls this directly
no test coverage detected