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

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

Issue 1235002: Allow empty handles to escape handle scopes. (Closed)
Patch Set: Created 10 years, 9 months 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-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 45c516038d5826bb05668ab7bb15b6c1ceceae12..5dc6ceb7ffdbc8ced081550139408d2ca8c9ff38 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -809,3 +809,19 @@ TEST(Iteration) {
CHECK_EQ(objs_count, next_objs_index);
CHECK_EQ(objs_count, ObjectsFoundInHeap(objs, objs_count));
}
+
+
+TEST(EmptyHandleEscapeFrom) {
+ InitializeVM();
+
+ v8::HandleScope scope;
+ Handle<JSObject> runaway;
+
+ {
+ v8::HandleScope nested;
+ Handle<JSObject> empty;
+ runaway = empty.EscapeFrom(&nested);
+ }
+
+ CHECK(runaway.is_null());
+}
« 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