| Index: test/cctest/test-lockers.cc
|
| ===================================================================
|
| --- test/cctest/test-lockers.cc (revision 15486)
|
| +++ test/cctest/test-lockers.cc (working copy)
|
| @@ -96,6 +96,7 @@
|
| Persistent<v8::Context> context_;
|
| };
|
|
|
| +
|
| // Migrates an isolate from one thread to another
|
| TEST(KangarooIsolates) {
|
| v8::Isolate* isolate = v8::Isolate::New();
|
| @@ -114,6 +115,7 @@
|
| thread1->Join();
|
| }
|
|
|
| +
|
| static void CalcFibAndCheck() {
|
| Local<Value> v = CompileRun("function fib(n) {"
|
| " if (n <= 2) return 1;"
|
| @@ -192,6 +194,7 @@
|
| v8::Isolate* isolate_;
|
| };
|
|
|
| +
|
| static void StartJoinAndDeleteThreads(const i::List<JoinableThread*>& threads) {
|
| for (int i = 0; i < threads.length(); i++) {
|
| threads[i]->Start();
|
| @@ -242,6 +245,7 @@
|
| private:
|
| };
|
|
|
| +
|
| // Run many threads each accessing its own isolate without locking
|
| TEST(MultithreadedParallelIsolates) {
|
| #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
|
| @@ -280,6 +284,7 @@
|
| v8::Isolate* isolate_;
|
| };
|
|
|
| +
|
| // Run many threads with nested locks
|
| TEST(IsolateNestedLocking) {
|
| #if V8_TARGET_ARCH_MIPS
|
| @@ -321,6 +326,7 @@
|
| v8::Isolate* isolate2_;
|
| };
|
|
|
| +
|
| // Run parallel threads that lock and access different isolates in parallel
|
| TEST(SeparateIsolatesLocksNonexclusive) {
|
| #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
|
| @@ -397,6 +403,7 @@
|
| v8::Isolate* isolate_;
|
| };
|
|
|
| +
|
| // Use unlocker inside of a Locker, multiple threads.
|
| TEST(LockerUnlocker) {
|
| #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
|
| @@ -450,6 +457,7 @@
|
| v8::Isolate* isolate_;
|
| };
|
|
|
| +
|
| // Use Unlocker inside two Lockers.
|
| TEST(LockTwiceAndUnlock) {
|
| #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
|
| @@ -517,6 +525,7 @@
|
| v8::Isolate* isolate2_;
|
| };
|
|
|
| +
|
| // Lock two isolates and unlock one of them.
|
| TEST(LockAndUnlockDifferentIsolates) {
|
| v8::Isolate* isolate1 = v8::Isolate::New();
|
| @@ -571,6 +580,7 @@
|
| v8::Persistent<v8::Context> context_;
|
| };
|
|
|
| +
|
| // Locker inside an Unlocker inside a Locker.
|
| TEST(LockUnlockLockMultithreaded) {
|
| #if V8_TARGET_ARCH_MIPS
|
| @@ -626,6 +636,7 @@
|
| v8::Persistent<v8::Context> context_;
|
| };
|
|
|
| +
|
| // Locker inside an Unlocker inside a Locker for default isolate.
|
| TEST(LockUnlockLockDefaultIsolateMultithreaded) {
|
| #if V8_TARGET_ARCH_MIPS
|
| @@ -696,6 +707,7 @@
|
| const char** extension_names_;
|
| };
|
|
|
| +
|
| // Test installing extensions in separate isolates concurrently.
|
| // http://code.google.com/p/v8/issues/detail?id=1821
|
| TEST(ExtensionsRegistration) {
|
|
|