• Home
  • Raw
  • Download

Lines Matching refs:v8

43 using ::v8::Context;
44 using ::v8::Extension;
45 using ::v8::Function;
46 using ::v8::HandleScope;
47 using ::v8::Local;
48 using ::v8::Object;
49 using ::v8::ObjectTemplate;
50 using ::v8::Persistent;
51 using ::v8::Script;
52 using ::v8::String;
53 using ::v8::Value;
54 using ::v8::V8;
58 class KangarooThread : public v8::base::Thread {
60 KangarooThread(v8::Isolate* isolate, v8::Local<v8::Context> context) in KangarooThread()
67 v8::Locker locker(isolate_); in Run()
68 v8::Isolate::Scope isolate_scope(isolate_); in Run()
69 CHECK_EQ(isolate_, v8::Isolate::GetCurrent()); in Run()
70 v8::HandleScope scope(isolate_); in Run()
71 v8::Local<v8::Context> context = in Run()
72 v8::Local<v8::Context>::New(isolate_, context_); in Run()
73 v8::Context::Scope context_scope(context); in Run()
79 v8::Locker locker(isolate_); in Run()
80 v8::Isolate::Scope isolate_scope(isolate_); in Run()
81 v8::HandleScope scope(isolate_); in Run()
82 v8::Local<v8::Context> context = in Run()
83 v8::Local<v8::Context>::New(isolate_, context_); in Run()
84 v8::Context::Scope context_scope(context); in Run()
93 v8::Isolate* isolate_;
94 Persistent<v8::Context> context_;
100 v8::Isolate::CreateParams create_params; in TEST()
102 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
103 v8::base::SmartPointer<KangarooThread> thread1; in TEST()
105 v8::Locker locker(isolate); in TEST()
106 v8::Isolate::Scope isolate_scope(isolate); in TEST()
107 v8::HandleScope handle_scope(isolate); in TEST()
108 v8::Local<v8::Context> context = v8::Context::New(isolate); in TEST()
109 v8::Context::Scope context_scope(context); in TEST()
110 CHECK_EQ(isolate, v8::Isolate::GetCurrent()); in TEST()
119 static void CalcFibAndCheck(v8::Local<v8::Context> context) { in CalcFibAndCheck()
151 class ThreadWithSemaphore : public v8::base::Thread {
167 v8::base::Semaphore semaphore_;
178 explicit IsolateLockingThreadWithLocalContext(v8::Isolate* isolate) in IsolateLockingThreadWithLocalContext()
184 v8::Locker locker(isolate_); in Run()
185 v8::Isolate::Scope isolate_scope(isolate_); in Run()
186 v8::HandleScope handle_scope(isolate_); in Run()
188 CHECK_EQ(isolate_, v8::Isolate::GetCurrent()); in Run()
192 v8::Isolate* isolate_;
218 v8::Isolate::CreateParams create_params; in TEST()
220 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
231 explicit IsolateNestedLockingThread(v8::Isolate* isolate) in IsolateNestedLockingThread()
235 v8::Locker lock(isolate_); in Run()
236 v8::Isolate::Scope isolate_scope(isolate_); in Run()
237 v8::HandleScope handle_scope(isolate_); in Run()
240 v8::Locker another_lock(isolate_); in Run()
244 v8::Locker another_lock(isolate_); in Run()
249 v8::Isolate* isolate_;
261 v8::Isolate::CreateParams create_params; in TEST()
263 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
275 SeparateIsolatesLocksNonexclusiveThread(v8::Isolate* isolate1, in SeparateIsolatesLocksNonexclusiveThread()
276 v8::Isolate* isolate2) in SeparateIsolatesLocksNonexclusiveThread()
282 v8::Locker lock(isolate1_); in Run()
283 v8::Isolate::Scope isolate_scope(isolate1_); in Run()
284 v8::HandleScope handle_scope(isolate1_); in Run()
293 v8::Isolate* isolate1_;
294 v8::Isolate* isolate2_;
306 v8::Isolate::CreateParams create_params; in TEST()
308 v8::Isolate* isolate1 = v8::Isolate::New(create_params); in TEST()
309 v8::Isolate* isolate2 = v8::Isolate::New(create_params); in TEST()
323 v8::Isolate* isolate, v8::Local<v8::Context> context) in LockIsolateAndCalculateFibSharedContextThread()
329 v8::Locker lock(isolate_); in Run()
330 v8::Isolate::Scope isolate_scope(isolate_); in Run()
332 v8::Local<v8::Context> context = in Run()
333 v8::Local<v8::Context>::New(isolate_, context_); in Run()
334 v8::Context::Scope context_scope(context); in Run()
338 v8::Isolate* isolate_;
339 Persistent<v8::Context> context_;
344 explicit LockerUnlockerThread(v8::Isolate* isolate) in LockerUnlockerThread()
352 v8::Locker lock(isolate_); in Run()
353 v8::Isolate::Scope isolate_scope(isolate_); in Run()
354 v8::HandleScope handle_scope(isolate_); in Run()
355 v8::Local<v8::Context> context = v8::Context::New(isolate_); in Run()
357 v8::Context::Scope context_scope(context); in Run()
363 v8::Unlocker unlocker(isolate_); in Run()
369 v8::Context::Scope context_scope(context); in Run()
378 v8::Isolate* isolate_;
391 v8::Isolate::CreateParams create_params; in TEST()
393 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
403 explicit LockTwiceAndUnlockThread(v8::Isolate* isolate) in LockTwiceAndUnlockThread()
409 v8::Locker lock(isolate_); in Run()
410 v8::Isolate::Scope isolate_scope(isolate_); in Run()
411 v8::HandleScope handle_scope(isolate_); in Run()
412 v8::Local<v8::Context> context = v8::Context::New(isolate_); in Run()
414 v8::Context::Scope context_scope(context); in Run()
418 v8::Locker second_lock(isolate_); in Run()
422 v8::Unlocker unlocker(isolate_); in Run()
429 v8::Context::Scope context_scope(context); in Run()
435 v8::Isolate* isolate_;
448 v8::Isolate::CreateParams create_params; in TEST()
450 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
460 LockAndUnlockDifferentIsolatesThread(v8::Isolate* isolate1, in LockAndUnlockDifferentIsolatesThread()
461 v8::Isolate* isolate2) in LockAndUnlockDifferentIsolatesThread()
468 v8::base::SmartPointer<LockIsolateAndCalculateFibSharedContextThread> in Run()
470 v8::Locker lock1(isolate1_); in Run()
471 CHECK(v8::Locker::IsLocked(isolate1_)); in Run()
472 CHECK(!v8::Locker::IsLocked(isolate2_)); in Run()
474 v8::Isolate::Scope isolate_scope(isolate1_); in Run()
475 v8::HandleScope handle_scope(isolate1_); in Run()
476 v8::Local<v8::Context> context1 = v8::Context::New(isolate1_); in Run()
478 v8::Context::Scope context_scope(context1); in Run()
484 v8::Locker lock2(isolate2_); in Run()
485 CHECK(v8::Locker::IsLocked(isolate1_)); in Run()
486 CHECK(v8::Locker::IsLocked(isolate2_)); in Run()
488 v8::Isolate::Scope isolate_scope(isolate2_); in Run()
489 v8::HandleScope handle_scope(isolate2_); in Run()
490 v8::Local<v8::Context> context2 = v8::Context::New(isolate2_); in Run()
492 v8::Context::Scope context_scope(context2); in Run()
495 v8::Unlocker unlock1(isolate1_); in Run()
496 CHECK(!v8::Locker::IsLocked(isolate1_)); in Run()
497 CHECK(v8::Locker::IsLocked(isolate2_)); in Run()
498 v8::Context::Scope context_scope(context2); in Run()
506 v8::Isolate* isolate1_;
507 v8::Isolate* isolate2_;
513 v8::Isolate::CreateParams create_params; in TEST()
515 v8::Isolate* isolate1 = v8::Isolate::New(create_params); in TEST()
516 v8::Isolate* isolate2 = v8::Isolate::New(create_params); in TEST()
526 LockUnlockLockThread(v8::Isolate* isolate, v8::Local<v8::Context> context) in LockUnlockLockThread()
532 v8::Locker lock1(isolate_); in Run()
533 CHECK(v8::Locker::IsLocked(isolate_)); in Run()
534 CHECK(!v8::Locker::IsLocked(CcTest::isolate())); in Run()
536 v8::Isolate::Scope isolate_scope(isolate_); in Run()
537 v8::HandleScope handle_scope(isolate_); in Run()
538 v8::Local<v8::Context> context = in Run()
539 v8::Local<v8::Context>::New(isolate_, context_); in Run()
540 v8::Context::Scope context_scope(context); in Run()
544 v8::Unlocker unlock1(isolate_); in Run()
545 CHECK(!v8::Locker::IsLocked(isolate_)); in Run()
546 CHECK(!v8::Locker::IsLocked(CcTest::isolate())); in Run()
548 v8::Locker lock2(isolate_); in Run()
549 v8::Isolate::Scope isolate_scope(isolate_); in Run()
550 v8::HandleScope handle_scope(isolate_); in Run()
551 CHECK(v8::Locker::IsLocked(isolate_)); in Run()
552 CHECK(!v8::Locker::IsLocked(CcTest::isolate())); in Run()
553 v8::Local<v8::Context> context = in Run()
554 v8::Local<v8::Context>::New(isolate_, context_); in Run()
555 v8::Context::Scope context_scope(context); in Run()
562 v8::Isolate* isolate_;
563 v8::Persistent<v8::Context> context_;
574 v8::Isolate::CreateParams create_params; in TEST()
576 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
579 v8::Locker locker_(isolate); in TEST()
580 v8::Isolate::Scope isolate_scope(isolate); in TEST()
581 v8::HandleScope handle_scope(isolate); in TEST()
582 v8::Local<v8::Context> context = v8::Context::New(isolate); in TEST()
594 explicit LockUnlockLockDefaultIsolateThread(v8::Local<v8::Context> context) in LockUnlockLockDefaultIsolateThread()
599 v8::Locker lock1(CcTest::isolate()); in Run()
601 v8::Isolate::Scope isolate_scope(CcTest::isolate()); in Run()
602 v8::HandleScope handle_scope(CcTest::isolate()); in Run()
603 v8::Local<v8::Context> context = in Run()
604 v8::Local<v8::Context>::New(CcTest::isolate(), context_); in Run()
605 v8::Context::Scope context_scope(context); in Run()
609 v8::Unlocker unlock1(CcTest::isolate()); in Run()
611 v8::Locker lock2(CcTest::isolate()); in Run()
612 v8::Isolate::Scope isolate_scope(CcTest::isolate()); in Run()
613 v8::HandleScope handle_scope(CcTest::isolate()); in Run()
614 v8::Local<v8::Context> context = in Run()
615 v8::Local<v8::Context>::New(CcTest::isolate(), context_); in Run()
616 v8::Context::Scope context_scope(context); in Run()
623 v8::Persistent<v8::Context> context_;
634 Local<v8::Context> context; in TEST()
637 v8::Locker locker_(CcTest::isolate()); in TEST()
638 v8::Isolate::Scope isolate_scope(CcTest::isolate()); in TEST()
639 v8::HandleScope handle_scope(CcTest::isolate()); in TEST()
640 context = v8::Context::New(CcTest::isolate()); in TEST()
651 v8::Isolate::CreateParams create_params; in TEST()
653 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
655 v8::Locker lock(isolate); in TEST()
656 v8::Isolate::Scope isolate_scope(isolate); in TEST()
657 v8::HandleScope handle_scope(isolate); in TEST()
658 v8::Local<Context> context = v8::Context::New(isolate); in TEST()
659 v8::Context::Scope context_scope(context); in TEST()
660 v8::Local<String> source = v8_str("1+1"); in TEST()
661 v8::Local<Script> script = in TEST()
662 v8::Script::Compile(context, source).ToLocalChecked(); in TEST()
663 v8::Local<Value> result = script->Run(context).ToLocalChecked(); in TEST()
664 v8::String::Utf8Value utf8(result); in TEST()
685 v8::Isolate::CreateParams create_params; in Run()
687 v8::Isolate* isolate = v8::Isolate::New(create_params); in Run()
689 v8::Isolate::Scope isolate_scope(isolate); in Run()
692 v8::ExtensionConfiguration extensions(count_, extension_names_); in Run()
693 v8::HandleScope handle_scope(isolate); in Run()
694 v8::Context::New(isolate, &extensions); in Run()
718 v8::RegisterExtension(new v8::Extension("test0", in TEST()
720 v8::RegisterExtension(new v8::Extension("test1", in TEST()
722 v8::RegisterExtension(new v8::Extension("test2", in TEST()
724 v8::RegisterExtension(new v8::Extension("test3", in TEST()
726 v8::RegisterExtension(new v8::Extension("test4", in TEST()
728 v8::RegisterExtension(new v8::Extension("test5", in TEST()
730 v8::RegisterExtension(new v8::Extension("test6", in TEST()
732 v8::RegisterExtension(new v8::Extension("test7", in TEST()