Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index f1fe6eaabed1fdabfc6e29fd2f2cb7aabe560e52..3292be8f21c6f02dfa4b135dbdf3346263f2f7d2 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -5012,6 +5012,16 @@ v8::Local<v8::Context> Context::GetCurrent() { |
} |
+v8::Local<v8::Context> Context::GetCurrent(Isolate* exported_isolate) { |
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(exported_isolate); |
+ ASSERT(isolate == i::Isolate::Current()); |
+ i::Handle<i::Object> current = isolate->native_context(); |
+ if (current.is_null()) return Local<Context>(); |
+ i::Handle<i::Context> context = i::Handle<i::Context>::cast(current); |
+ return Utils::ToLocal(context); |
+} |
+ |
+ |
v8::Local<v8::Context> Context::GetCalling() { |
i::Isolate* isolate = i::Isolate::Current(); |
if (IsDeadCheck(isolate, "v8::Context::GetCalling()")) { |