Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 401007b4359b6c86c4184dd9183c561adb37a58f..c1d3d1be9eaba4fb581511e564c0accd3ce3819c 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -5369,17 +5369,22 @@ bool FunctionTemplate::HasInstance(v8::Handle<v8::Value> value) { |
} |
-Local<External> v8::External::New(void* value) { |
+Local<External> v8::External::New(Isolate* isolate, void* value) { |
STATIC_ASSERT(sizeof(value) == sizeof(i::Address)); |
- i::Isolate* isolate = i::Isolate::Current(); |
- EnsureInitializedForIsolate(isolate, "v8::External::New()"); |
- LOG_API(isolate, "External::New"); |
- ENTER_V8(isolate); |
- i::Handle<i::JSObject> external = isolate->factory()->NewExternal(value); |
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
+ EnsureInitializedForIsolate(i_isolate, "v8::External::New()"); |
+ LOG_API(i_isolate, "External::New"); |
+ ENTER_V8(i_isolate); |
+ i::Handle<i::JSObject> external = i_isolate->factory()->NewExternal(value); |
return Utils::ExternalToLocal(external); |
} |
+Local<External> v8::External::New(void* value) { |
+ return v8::External::New(Isolate::GetCurrent(), value); |
+} |
+ |
+ |
void* External::Value() const { |
return ExternalValue(*Utils::OpenHandle(this)); |
} |