diff options
Diffstat (limited to 'deps/v8/test/cctest/test-lockers.cc')
-rw-r--r-- | deps/v8/test/cctest/test-lockers.cc | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/deps/v8/test/cctest/test-lockers.cc b/deps/v8/test/cctest/test-lockers.cc index a143d583f..109451227 100644 --- a/deps/v8/test/cctest/test-lockers.cc +++ b/deps/v8/test/cctest/test-lockers.cc @@ -183,7 +183,7 @@ class IsolateLockingThreadWithLocalContext : public JoinableThread { v8::Locker locker(isolate_); v8::Isolate::Scope isolate_scope(isolate_); v8::HandleScope handle_scope(isolate_); - LocalContext local_context; + LocalContext local_context(isolate_); CHECK_EQ(isolate_, v8::internal::Isolate::Current()); CalcFibAndCheck(); } @@ -267,7 +267,7 @@ class IsolateNestedLockingThread : public JoinableThread { v8::Locker lock(isolate_); v8::Isolate::Scope isolate_scope(isolate_); v8::HandleScope handle_scope(isolate_); - LocalContext local_context; + LocalContext local_context(isolate_); { v8::Locker another_lock(isolate_); CalcFibAndCheck(); @@ -311,7 +311,7 @@ class SeparateIsolatesLocksNonexclusiveThread : public JoinableThread { v8::Locker lock(isolate1_); v8::Isolate::Scope isolate_scope(isolate1_); v8::HandleScope handle_scope(isolate1_); - LocalContext local_context; + LocalContext local_context(isolate1_); IsolateLockingThreadWithLocalContext threadB(isolate2_); threadB.Start(); @@ -545,7 +545,7 @@ class LockUnlockLockThread : public JoinableThread { virtual void Run() { v8::Locker lock1(isolate_); CHECK(v8::Locker::IsLocked(isolate_)); - CHECK(!v8::Locker::IsLocked(CcTest::default_isolate())); + CHECK(!v8::Locker::IsLocked(CcTest::isolate())); { v8::Isolate::Scope isolate_scope(isolate_); v8::HandleScope handle_scope(isolate_); @@ -557,13 +557,13 @@ class LockUnlockLockThread : public JoinableThread { { v8::Unlocker unlock1(isolate_); CHECK(!v8::Locker::IsLocked(isolate_)); - CHECK(!v8::Locker::IsLocked(CcTest::default_isolate())); + CHECK(!v8::Locker::IsLocked(CcTest::isolate())); { v8::Locker lock2(isolate_); v8::Isolate::Scope isolate_scope(isolate_); v8::HandleScope handle_scope(isolate_); CHECK(v8::Locker::IsLocked(isolate_)); - CHECK(!v8::Locker::IsLocked(CcTest::default_isolate())); + CHECK(!v8::Locker::IsLocked(CcTest::isolate())); v8::Local<v8::Context> context = v8::Local<v8::Context>::New(isolate_, context_); v8::Context::Scope context_scope(context); @@ -605,24 +605,26 @@ class LockUnlockLockDefaultIsolateThread : public JoinableThread { public: explicit LockUnlockLockDefaultIsolateThread(v8::Handle<v8::Context> context) : JoinableThread("LockUnlockLockDefaultIsolateThread"), - context_(CcTest::default_isolate(), context) {} + context_(CcTest::isolate(), context) {} virtual void Run() { - v8::Locker lock1(CcTest::default_isolate()); + v8::Locker lock1(CcTest::isolate()); { - v8::HandleScope handle_scope(CcTest::default_isolate()); + v8::Isolate::Scope isolate_scope(CcTest::isolate()); + v8::HandleScope handle_scope(CcTest::isolate()); v8::Local<v8::Context> context = - v8::Local<v8::Context>::New(CcTest::default_isolate(), context_); + v8::Local<v8::Context>::New(CcTest::isolate(), context_); v8::Context::Scope context_scope(context); CalcFibAndCheck(); } { - v8::Unlocker unlock1(CcTest::default_isolate()); + v8::Unlocker unlock1(CcTest::isolate()); { - v8::Locker lock2(CcTest::default_isolate()); - v8::HandleScope handle_scope(CcTest::default_isolate()); + v8::Locker lock2(CcTest::isolate()); + v8::Isolate::Scope isolate_scope(CcTest::isolate()); + v8::HandleScope handle_scope(CcTest::isolate()); v8::Local<v8::Context> context = - v8::Local<v8::Context>::New(CcTest::default_isolate(), context_); + v8::Local<v8::Context>::New(CcTest::isolate(), context_); v8::Context::Scope context_scope(context); CalcFibAndCheck(); } @@ -644,9 +646,10 @@ TEST(LockUnlockLockDefaultIsolateMultithreaded) { Local<v8::Context> context; i::List<JoinableThread*> threads(kNThreads); { - v8::Locker locker_(CcTest::default_isolate()); - v8::HandleScope handle_scope(CcTest::default_isolate()); - context = v8::Context::New(CcTest::default_isolate()); + v8::Locker locker_(CcTest::isolate()); + v8::Isolate::Scope isolate_scope(CcTest::isolate()); + v8::HandleScope handle_scope(CcTest::isolate()); + context = v8::Context::New(CcTest::isolate()); for (int i = 0; i < kNThreads; i++) { threads.Add(new LockUnlockLockDefaultIsolateThread(context)); } |