Index: test/cctest/test-global-handles.cc |
diff --git a/test/cctest/test-global-handles.cc b/test/cctest/test-global-handles.cc |
index ee295d6991cce0db19cdfebb090aba1aea99ba73..20aaeac73eea5d10a1d7dadc31e179aaebe36a9c 100644 |
--- a/test/cctest/test-global-handles.cc |
+++ b/test/cctest/test-global-handles.cc |
@@ -380,3 +380,20 @@ TEST(EternalHandles) { |
CHECK_EQ(2*kArrayLength + 1, eternal_handles->NumberOfHandles()); |
} |
+ |
+ |
+TEST(PersistentBaseGetLocal) { |
+ CcTest::InitializeVM(); |
+ v8::Isolate* isolate = CcTest::isolate(); |
+ |
+ v8::HandleScope scope(isolate); |
+ v8::Local<v8::Object> o = v8::Object::New(isolate); |
+ CHECK(!o.IsEmpty()); |
+ v8::Persistent<v8::Object> p(isolate, o); |
+ CHECK(o == p.Get(isolate)); |
+ CHECK(v8::Local<v8::Object>::New(isolate, p) == p.Get(isolate)); |
+ |
+ v8::Global<v8::Object> g(isolate, o); |
+ CHECK(o == g.Get(isolate)); |
+ CHECK(v8::Local<v8::Object>::New(isolate, g) == g.Get(isolate)); |
+} |