Lines Matching refs:Isolate
33 #include "isolate.h"
58 // Migrating an isolate
61 KangarooThread(v8::Isolate* isolate,
64 isolate_(isolate), context_(context), value_(value) {
70 v8::Isolate::Scope isolate_scope(isolate_);
71 CHECK_EQ(isolate_, v8::internal::Isolate::Current());
80 v8::Isolate::Scope isolate_scope(isolate_);
91 v8::Isolate* isolate_;
96 // Migrates an isolate from one thread to another
98 v8::Isolate* isolate = v8::Isolate::New();
101 v8::Locker locker(isolate);
102 v8::Isolate::Scope isolate_scope(isolate);
106 CHECK_EQ(isolate, v8::internal::Isolate::Current());
109 KangarooThread thread1(isolate, context, 1);
175 explicit IsolateLockingThreadWithLocalContext(v8::Isolate* isolate)
177 isolate_(isolate) {
182 v8::Isolate::Scope isolate_scope(isolate_);
185 CHECK_EQ(isolate_, v8::internal::Isolate::Current());
189 v8::Isolate* isolate_;
205 // Run many threads all locking on the same isolate
213 v8::Isolate* isolate = v8::Isolate::New();
215 threads.Add(new IsolateLockingThreadWithLocalContext(isolate));
218 isolate->Dispose();
228 v8::Isolate* isolate = v8::Isolate::New();
230 v8::Isolate::Scope isolate_scope(isolate);
234 CHECK_EQ(isolate, v8::internal::Isolate::Current());
237 isolate->Dispose();
242 // Run many threads each accessing its own isolate without locking
259 explicit IsolateNestedLockingThread(v8::Isolate* isolate)
260 : JoinableThread("IsolateNestedLocking"), isolate_(isolate) {
264 v8::Isolate::Scope isolate_scope(isolate_);
277 v8::Isolate* isolate_;
287 v8::Isolate* isolate = v8::Isolate::New();
290 threads.Add(new IsolateNestedLockingThread(isolate));
298 SeparateIsolatesLocksNonexclusiveThread(v8::Isolate* isolate1,
299 v8::Isolate* isolate2)
306 v8::Isolate::Scope isolate_scope(isolate1_);
316 v8::Isolate* isolate1_;
317 v8::Isolate* isolate2_;
327 v8::Isolate* isolate1 = v8::Isolate::New();
328 v8::Isolate* isolate2 = v8::Isolate::New();
342 v8::Isolate* isolate, v8::Handle<v8::Context> context)
344 isolate_(isolate),
350 v8::Isolate::Scope isolate_scope(isolate_);
356 v8::Isolate* isolate_;
362 explicit LockerUnlockerThread(v8::Isolate* isolate)
364 isolate_(isolate) {
369 v8::Isolate::Scope isolate_scope(isolate_);
391 v8::Isolate* isolate_;
402 v8::Isolate* isolate = v8::Isolate::New();
404 threads.Add(new LockerUnlockerThread(isolate));
407 isolate->Dispose();
412 explicit LockTwiceAndUnlockThread(v8::Isolate* isolate)
414 isolate_(isolate) {
419 v8::Isolate::Scope isolate_scope(isolate_);
444 v8::Isolate* isolate_;
455 v8::Isolate* isolate = v8::Isolate::New();
457 threads.Add(new LockTwiceAndUnlockThread(isolate));
460 isolate->Dispose();
465 LockAndUnlockDifferentIsolatesThread(v8::Isolate* isolate1,
466 v8::Isolate* isolate2)
479 v8::Isolate::Scope isolate_scope(isolate1_);
491 v8::Isolate::Scope isolate_scope(isolate2_);
503 v8::Isolate::Scope isolate_scope(isolate2_);
514 v8::Isolate* isolate1_;
515 v8::Isolate* isolate2_;
520 v8::Isolate* isolate1 = v8::Isolate::New();
521 v8::Isolate* isolate2 = v8::Isolate::New();
531 LockUnlockLockThread(v8::Isolate* isolate, v8::Handle<v8::Context> context)
533 isolate_(isolate),
542 v8::Isolate::Scope isolate_scope(isolate_);
553 v8::Isolate::Scope isolate_scope(isolate_);
564 v8::Isolate* isolate_;
575 v8::Isolate* isolate = v8::Isolate::New();
578 v8::Locker locker_(isolate);
579 v8::Isolate::Scope isolate_scope(isolate);
585 threads.Add(new LockUnlockLockThread(isolate, context));
619 // Locker inside an Unlocker inside a Locker for default isolate.
642 v8::Isolate* isolate = v8::Isolate::New();
644 v8::Locker lock(isolate);
645 v8::Isolate::Scope isolate_scope(isolate);
655 isolate->Dispose();
674 v8::Isolate* isolate = v8::Isolate::New();
676 v8::Isolate::Scope isolate_scope(isolate);
677 CHECK(!i::Isolate::Current()->has_installed_extensions());
680 CHECK(i::Isolate::Current()->has_installed_extensions());
683 isolate->Dispose();