Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 226d01db62955e0b76d91c14bb89b9fe245a8f30..6449594be4a5dcb4377906e9e969b78c8b061472 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -168,6 +168,23 @@ THREADED_TEST(Handles) { |
} |
+THREADED_TEST(IsolateOfContext) { |
+ v8::HandleScope scope; |
+ v8::Persistent<Context> env = Context::New(); |
+ |
+ CHECK(!env->InContext()); |
+ CHECK(env->GetIsolate() == v8::Isolate::GetCurrent()); |
+ env->Enter(); |
+ CHECK(env->InContext()); |
+ CHECK(env->GetIsolate() == v8::Isolate::GetCurrent()); |
+ env->Exit(); |
+ CHECK(!env->InContext()); |
+ CHECK(env->GetIsolate() == v8::Isolate::GetCurrent()); |
+ |
+ env.Dispose(); |
+} |
+ |
+ |
THREADED_TEST(ReceiverSignature) { |
v8::HandleScope scope; |
LocalContext env; |