Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: test/cctest/test-api.cc

Issue 11368053: Implement IsIndependent(Isolate*) (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: A correct patch for IsIndependent(Isolate*) Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 3be068009e275e53bb60903d812af6f841ab6069..425cc53aa770886804cef41f52bf07b8297ee8ac 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -5315,11 +5315,14 @@ THREADED_TEST(IndependentWeakHandle) {
object_a = v8::Persistent<v8::Object>::New(v8::Object::New());
}
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
bool object_a_disposed = false;
object_a.MakeWeak(&object_a_disposed, &DisposeAndSetFlag);
CHECK(!object_a.IsIndependent());
+ CHECK(!object_a.IsIndependent(isolate));
object_a.MarkIndependent();
CHECK(object_a.IsIndependent());
+ CHECK(object_a.IsIndependent(isolate));
HEAP->PerformScavenge();
CHECK(object_a_disposed);
}
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698