Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 0eb139ff27f51f3763d065f55f6105615d046308..d027d7a1a3e9e71033460eadb28b001c8711a25f 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -653,13 +653,16 @@ void V8::DisposeGlobal(i::Object** obj) { |
} |
-int V8::Eternalize(i::Isolate* isolate, i::Object** handle) { |
- return isolate->eternal_handles()->Create(isolate, *handle); |
+void V8::Eternalize(Isolate* v8_isolate, Value* value, int* index) { |
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
+ i::Object* object = *Utils::OpenHandle(value); |
+ isolate->eternal_handles()->Create(isolate, object, index); |
} |
-i::Object** V8::GetEternal(i::Isolate* isolate, int index) { |
- return isolate->eternal_handles()->Get(index).location(); |
+Local<Value> V8::GetEternal(Isolate* v8_isolate, int index) { |
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
+ return Utils::ToLocal(isolate->eternal_handles()->Get(index)); |
} |