Lines Matching defs:isolate

18 #include "include/v8-isolate.h"
28 #include "src/execution/isolate-data.h"
36 #include "src/init/isolate-allocator.h"
169 #define RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate) \
171 Isolate* __isolate__ = (isolate); \
180 #define RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, value) \
182 Isolate* __isolate__ = (isolate); \
190 #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \
191 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, MaybeHandle<T>())
193 #define ASSIGN_RETURN_ON_SCHEDULED_EXCEPTION_VALUE(isolate, dst, call, value) \
195 Isolate* __isolate__ = (isolate); \
203 #define RETURN_ON_SCHEDULED_EXCEPTION_VALUE(isolate, call, value) \
205 Isolate* __isolate__ = (isolate); \
222 * isolate,
231 #define RETURN_RESULT_OR_FAILURE(isolate, call) \
234 Isolate* __isolate__ = (isolate); \
243 #define ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value) \
246 DCHECK((isolate)->has_pending_exception()); \
251 #define ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, dst, call) \
253 auto* __isolate__ = (isolate); \
258 #define ASSIGN_RETURN_ON_EXCEPTION(isolate, dst, call, T) \
259 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, MaybeHandle<T>())
261 #define THROW_NEW_ERROR(isolate, call, T) \
263 auto* __isolate__ = (isolate); \
267 #define THROW_NEW_ERROR_RETURN_FAILURE(isolate, call) \
269 auto* __isolate__ = (isolate); \
273 #define THROW_NEW_ERROR_RETURN_VALUE(isolate, call, value) \
275 auto* __isolate__ = (isolate); \
288 * isolate,
298 * isolate,
310 #define RETURN_ON_EXCEPTION_VALUE(isolate, call, value) \
313 DCHECK((isolate)->has_pending_exception()); \
327 * isolate,
338 #define RETURN_FAILURE_ON_EXCEPTION(isolate, call) \
340 Isolate* __isolate__ = (isolate); \
353 * isolate,
365 #define RETURN_ON_EXCEPTION(isolate, call, T) \
366 RETURN_ON_EXCEPTION_VALUE(isolate, call, MaybeHandle<T>())
368 #define RETURN_FAILURE(isolate, should_throw, call) \
373 isolate->Throw(*isolate->factory()->call); \
385 #define MAYBE_ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value) \
388 DCHECK((isolate)->has_pending_exception()); \
393 #define MAYBE_ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, dst, call) \
395 Isolate* __isolate__ = (isolate); \
402 #define FOR_WITH_HANDLE_SCOPE(isolate, loop_var_type, init, loop_var, \
407 Isolate* for_with_handle_isolate = isolate; \
417 #define WHILE_WITH_HANDLE_SCOPE(isolate, limit_check, body) \
419 Isolate* for_with_handle_isolate = isolate; \
496 /* Number of CPU profilers running on the isolate. */ \
545 // A thread has a PerIsolateThreadData instance for each isolate that it has
546 // entered. That instance is allocated when the isolate is initially entered
550 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id)
551 : isolate_(isolate),
564 Isolate* isolate() const { return isolate_; }
574 bool Matches(Isolate* isolate, ThreadId thread_id) const {
575 return isolate_ == isolate && thread_id_ == thread_id;
605 // Sets default isolate into "has_been_disposed" state rather then destroying,
607 static void Delete(Isolate* isolate);
623 // Returns the isolate inside which the current thread is running or nullptr.
630 // Returns the isolate inside which the current thread is running.
632 Isolate* isolate = TryGetCurrent();
633 DCHECK_NOT_NULL(isolate);
634 return isolate;
641 // isolate.
653 // True if at least one thread Enter'ed this isolate.
663 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate
669 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate
673 // Find the PerThread for this particular (isolate, thread) combination.
677 // Find the PerThread for this particular (isolate, thread) combination
681 // Find the PerThread for given (isolate, thread) combination
685 // Discard the PerThread for this particular (isolate, thread) combination
730 // The isolate's string table.
884 inline explicit ExceptionScope(Isolate* isolate);
1116 // the isolate is fully initialized.
1163 // Generated code can embed this address to get access to the isolate-specific
1592 static std::string GetTurboCfgFileName(Isolate* isolate);
1845 // Register a finalizer to be called at isolate teardown.
2018 static void SetIsolateThreadLocals(Isolate* isolate,
2063 // These methods add/remove the isolate to/from the list of clients in the
2064 // shared isolate. Isolates in the client list need to participate in a global
2074 // Set to true if this isolate is used as shared heap. This field must be set
2187 // Whether the isolate has been created for snapshotting.
2190 // True if fatal error has been signaled for this isolate.
2193 // True if this isolate was initialized from a snapshot.
2199 // True if the isolate is in background. This flag is used
2203 // True if the isolate is in memory savings mode. This flag is used to
2366 // thread_data_table_ is always accessed under the isolate lock. I do not
2371 // Stores the shared isolate for this client isolate. nullptr for shared
2372 // isolates or when no shared isolate is used.
2376 // Set to true once during isolate initialization right when attaching to the
2377 // shared isolate. If there was no shared isolate given it will still be set
2383 // isolate.
2426 explicit SaveContext(Isolate* isolate);
2445 SaveAndSwitchContext(Isolate* isolate, Context new_context);
2448 // A scope which sets the given isolate's context to null for its lifetime to
2452 explicit NullContextScope(Isolate* isolate)
2453 : SaveAndSwitchContext(isolate, Context()) {}
2459 explicit AssertNoContextChange(Isolate* isolate);
2467 explicit AssertNoContextChange(Isolate* isolate) {}
2473 explicit ExecutionAccess(Isolate* isolate) : isolate_(isolate) {
2474 Lock(isolate);
2478 static void Lock(Isolate* isolate) { isolate->break_access()->Lock(); }
2479 static void Unlock(Isolate* isolate) { isolate->break_access()->Unlock(); }
2481 static bool TryLock(Isolate* isolate) {
2482 return isolate->break_access()->TryLock();
2492 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) {}
2516 #define STACK_CHECK(isolate, result_value) \
2518 StackLimitCheck stack_check(isolate); \
2521 isolate->StackOverflow(); \
2524 if (isolate->stack_guard()->HasTerminationRequest()) { \
2525 isolate->TerminateExecution(); \
2535 explicit StackTraceFailureMessage(Isolate* isolate, StackTraceMode mode,
2562 SharedMutexGuardIfOffThread(base::SharedMutex* mutex, Isolate* isolate) {
2564 DCHECK_NOT_NULL(isolate);
2565 DCHECK_EQ(ThreadId::Current(), isolate->thread_id());