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

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

Issue 7348008: Merge up to 8597 to experimental/gc from the bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 5 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 | « test/cctest/test-liveedit.cc ('k') | test/cctest/test-log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-lockers.cc
===================================================================
--- test/cctest/test-lockers.cc (revision 8618)
+++ test/cctest/test-lockers.cc (working copy)
@@ -64,7 +64,7 @@
public:
KangarooThread(v8::Isolate* isolate,
v8::Handle<v8::Context> context, int value)
- : Thread(NULL, "KangarooThread"),
+ : Thread("KangarooThread"),
isolate_(isolate), context_(context), value_(value) {
}
@@ -150,7 +150,7 @@
class ThreadWithSemaphore : public i::Thread {
public:
explicit ThreadWithSemaphore(JoinableThread* joinable_thread)
- : Thread(NULL, joinable_thread->name_),
+ : Thread(joinable_thread->name_),
joinable_thread_(joinable_thread) {
}
@@ -314,7 +314,11 @@
// Run parallel threads that lock and access different isolates in parallel
TEST(SeparateIsolatesLocksNonexclusive) {
+#ifdef V8_TARGET_ARCH_ARM
+ const int kNThreads = 50;
+#else
const int kNThreads = 100;
+#endif
v8::Isolate* isolate1 = v8::Isolate::New();
v8::Isolate* isolate2 = v8::Isolate::New();
i::List<JoinableThread*> threads(kNThreads);
@@ -383,7 +387,11 @@
// Use unlocker inside of a Locker, multiple threads.
TEST(LockerUnlocker) {
+#ifdef V8_TARGET_ARCH_ARM
+ const int kNThreads = 50;
+#else
const int kNThreads = 100;
+#endif
i::List<JoinableThread*> threads(kNThreads);
v8::Isolate* isolate = v8::Isolate::New();
for (int i = 0; i < kNThreads; i++) {
@@ -431,7 +439,11 @@
// Use Unlocker inside two Lockers.
TEST(LockTwiceAndUnlock) {
+#ifdef V8_TARGET_ARCH_ARM
+ const int kNThreads = 50;
+#else
const int kNThreads = 100;
+#endif
i::List<JoinableThread*> threads(kNThreads);
v8::Isolate* isolate = v8::Isolate::New();
for (int i = 0; i < kNThreads; i++) {
@@ -607,3 +619,23 @@
}
StartJoinAndDeleteThreads(threads);
}
+
+
+TEST(Regress1433) {
+ for (int i = 0; i < 10; i++) {
+ v8::Isolate* isolate = v8::Isolate::New();
+ {
+ v8::Locker lock(isolate);
+ v8::Isolate::Scope isolate_scope(isolate);
+ 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 | « test/cctest/test-liveedit.cc ('k') | test/cctest/test-log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698