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

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

Issue 7129002: Fix bug 1433: clear the global thread table when an isolate is disposed. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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
« no previous file with comments | « src/isolate.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-lockers.cc
diff --git a/test/cctest/test-lockers.cc b/test/cctest/test-lockers.cc
index 5b33f2ee06b7f8e50ca8ca46eb3f18b6424d97c7..9ca326448638daa27440009b2da7eb7c82b0e75e 100644
--- a/test/cctest/test-lockers.cc
+++ b/test/cctest/test-lockers.cc
@@ -607,3 +607,23 @@ TEST(LockUnlockLockDefaultIsolateMultithreaded) {
}
StartJoinAndDeleteThreads(threads);
}
+
+
+TEST(Regress1433) {
+ for (int i = 0; i < 10; i++) {
+ v8::Isolate* isolate = v8::Isolate::New();
+ {
+ v8::Locker l(isolate);
Mads Ager (chromium) 2011/06/07 18:28:18 l -> lock?
Vitaly Repeshko 2011/06/07 18:32:53 Done.
+ v8::Isolate::Scope iscope(isolate);
Mads Ager (chromium) 2011/06/07 18:28:18 iscope -> isolate_scope to match the other naming
Vitaly Repeshko 2011/06/07 18:32:53 Done.
+ v8::HandleScope handle_scope;
+ v8::Persistent<Context> context = v8::Context::New();
+ v8::Context::Scope context_scope(context);
+ v8::Handle<String> source = v8::String::New("1+1");
+ v8::Handle<Script> script = v8::Script::Compile(source);
+ v8::Handle<Value> result = script->Run();
+ v8::String::AsciiValue ascii(result);
+ context.Dispose();
+ }
+ isolate->Dispose();
+ }
+}
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698