Lines Matching refs:v8
1 // Copyright 2008 the V8 project authors. All rights reserved.
28 #include "v8.h"
37 namespace v8 {
40 // Track whether this V8 instance has ever called v8::Locker. This allows the
41 // API code to verify that the lock is always held when V8 is being entered.
47 Locker::Locker(v8::Isolate* isolate)
61 // Make sure that V8 is initialized. Archiving of threads interferes
66 V8::Initialize();
88 bool Locker::IsLocked(v8::Isolate* isolate) {
118 Unlocker::Unlocker(v8::Isolate* isolate)
143 v8::internal::ContextSwitcher::StartPreemption(every_n_ms);
148 v8::internal::ContextSwitcher::StopPreemption();
411 : Thread("v8:CtxtSwitcher"),
418 // Set the scheduling interval of V8 threads. This function starts the
422 ASSERT(Locker::IsLocked(reinterpret_cast<v8::Isolate*>(isolate)));
435 // Disable preemption of V8 threads. If multiple threads want to use V8 they
439 ASSERT(Locker::IsLocked(reinterpret_cast<v8::Isolate*>(isolate)));
453 // Main loop of the ContextSwitcher thread: Preempt the currently running V8
472 } // namespace v8