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

Unified Diff: test/cctest/test-mark-compact.cc

Issue 18287003: Join threads after stopping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
« src/v8.cc ('K') | « src/v8.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-mark-compact.cc
diff --git a/test/cctest/test-mark-compact.cc b/test/cctest/test-mark-compact.cc
index a01c5dfae3aa40bce96ac62b0eb02b620479a0fc..cb5157f1e0d35b9ee72f89d203f38cff96acd6e1 100644
--- a/test/cctest/test-mark-compact.cc
+++ b/test/cctest/test-mark-compact.cc
@@ -566,4 +566,31 @@ TEST(BootUpMemoryUse) {
}
}
+
+intptr_t ShortLivingIsolate() {
+ v8::Isolate* isolate = v8::Isolate::New();
+ { v8::Isolate::Scope iscope(isolate);
+ v8::V8::Initialize();
+ v8::Locker l(isolate);
+
+ v8::HandleScope handle_scope;
+ v8::Local<v8::Context> context = v8::Context::New(isolate);
+ CHECK(!context.IsEmpty());
+ v8::Context::Scope context_scope(context);
+ v8::TryCatch try_catch;
+ CompileRun("Math.abs(2);");
+ }
+
+ isolate->Dispose();
+ return MemoryInUse();
+}
+
+
+TEST(RegressJoinThreadsOnIsolateDeinit) {
+ intptr_t first_size = ShortLivingIsolate();
+ for (int i = 0; i < 10; i++) {
+ CHECK_EQ(first_size, ShortLivingIsolate());
+ }
+}
+
#endif // __linux__ and !USE_SIMULATOR
« src/v8.cc ('K') | « src/v8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698