Home | History | Annotate | Download | only in src

Lines Matching refs:isolate

111 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate)    \
112 if (isolate->has_scheduled_exception()) \
113 return isolate->PromoteScheduledException()
115 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \
117 ASSERT(isolate->has_pending_exception()); \
121 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \
122 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception())
182 friend class Isolate;
189 // isolate being present.
380 class Isolate {
386 ~Isolate();
388 // A thread has a PerIsolateThreadData instance for each isolate that it has
389 // entered. That instance is allocated when the isolate is initially entered
393 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id)
394 : isolate_(isolate),
404 Isolate* isolate() const { return isolate_; }
419 bool Matches(Isolate* isolate, ThreadId thread_id) const {
420 return isolate_ == isolate && thread_id_.Equals(thread_id);
424 Isolate* isolate_;
437 friend class Isolate;
460 // Returns the isolate inside which the current thread is running.
461 INLINE(static Isolate* Current()) {
462 Isolate* isolate = reinterpret_cast<Isolate*>(
464 ASSERT(isolate != NULL);
465 return isolate;
468 INLINE(static Isolate* UncheckedCurrent()) {
469 return reinterpret_cast<Isolate*>(Thread::GetThreadLocal(isolate_key_));
474 // isolate.
483 // True if at least one thread Enter'ed this isolate.
487 // Sets default isolate into "has_been_disposed" state rather then destroying,
493 // Ensures that process-wide resources and the default isolate have been
499 // Get the debugger from the default isolate. Preinitializes the
500 // default isolate if needed.
503 // Get the stack guard from the default isolate. Preinitializes the
504 // default isolate if needed.
507 // Returns the key used to store the pointer to the current isolate.
509 // are part of the domain of an isolate (like the context switcher).
519 // If a client attempts to create a Locker without specifying an isolate,
521 // thread to be inside the implicit isolate (or fail a check if we have
664 explicit ExceptionScope(Isolate* isolate) :
667 isolate_(isolate),
678 Isolate* isolate_;
779 ASSERT(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
783 ASSERT(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
791 ASSERT(OFFSET_OF(Isolate, name##_) == name##_debug_offset_); \
807 // the isolate is fully initialized.
816 // the isolate is fully initialized.
1030 Isolate();
1039 PerIsolateThreadData* Lookup(Isolate* isolate, ThreadId thread_id);
1041 void Remove(Isolate* isolate, ThreadId thread_id);
1049 // the Isolate. The top of the stack points to a thread which is currently
1050 // running the Isolate. When the stack is empty, the Isolate is considered
1052 // If the same thread enters the Isolate more then once, the entry_count_
1057 Isolate* previous_isolate,
1066 Isolate* previous_isolate;
1079 static Isolate* default_isolate_;
1084 static void SetIsolateThreadLocals(Isolate* isolate,
1099 // Find the PerThread for this particular (isolate, thread) combination.
1103 // PreInits and returns a default isolate. Needed when a new thread tries
1104 // to create a Locker for the first time (the lock itself is in the isolate).
1105 static Isolate* GetDefaultIsolateForLocking();
1107 // Initializes the current thread to run this Isolate.
1108 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate
1112 // Exits the current thread. The previosuly entered Isolate is restored
1114 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate
1243 friend class v8::Isolate;
1246 DISALLOW_COPY_AND_ASSIGN(Isolate);
1255 explicit SaveContext(Isolate* isolate) : prev_(isolate->save_context()) {
1256 if (isolate->context() != NULL) {
1257 context_ = Handle<Context>(isolate->context());
1259 dummy_ = Handle<Context>(isolate->context());
1262 isolate->set_save_context(this);
1265 JavaScriptFrameIterator it(isolate);
1271 Isolate* isolate = Isolate::Current();
1272 isolate->set_context(NULL);
1273 isolate->set_save_context(prev_);
1275 Isolate* isolate = context_->GetIsolate();
1276 isolate->set_context(*context_);
1277 isolate->set_save_context(prev_);
1303 scope_(Isolate::Current()),
1304 context_(Isolate::Current()->context(), Isolate::Current()) {
1308 ASSERT(Isolate::Current()->context() == *context_);
1323 explicit ExecutionAccess(Isolate* isolate) : isolate_(isolate) {
1324 Lock(isolate);
1328 static void Lock(Isolate* isolate) { isolate->break_access_->Lock(); }
1329 static void Unlock(Isolate* isolate) { isolate->break_access_->Unlock(); }
1331 static bool TryLock(Isolate* isolate) {
1332 return isolate->break_access_->TryLock();
1336 Isolate* isolate_;
1343 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { }
1355 Isolate* isolate_;
1365 explicit PostponeInterruptsScope(Isolate* isolate)
1366 : stack_guard_(isolate->stack_guard()) {
1381 // Temporary macros for accessing current isolate and its subobjects.
1383 #define HEAP (v8::internal::Isolate::Current()->heap())
1384 #define FACTORY (v8::internal::Isolate::Current()->factory())
1385 #define ISOLATE (v8::internal::Isolate::Current())
1386 #define ZONE (v8::internal::Isolate::Current()->zone())
1387 #define LOGGER (v8::internal::Isolate::Current()->logger())
1403 // and not per-isolate. (It would be great to be able to grep for [static]!)
1412 // to be isolate-friendly. Their mix of static/nonstatic methods/fields is