V8 Project
v8::internal::Isolate Class Reference

#include <isolate.h>

+ Collaboration diagram for v8::internal::Isolate:

Classes

class  EntryStackItem
 
class  ExceptionScope
 
class  PerIsolateThreadData
 
class  ThreadDataTable
 

Public Types

enum  AddressId { kIsolateAddressCount }
 

Public Member Functions

 ~Isolate ()
 
 INLINE (static Isolate *Current())
 
 INLINE (static Isolate *UncheckedCurrent())
 
 INLINE (static Isolate *UnsafeCurrent())
 
void InitializeLoggingAndCounters ()
 
bool Init (Deserializer *des)
 
bool IsInitialized ()
 
bool IsInUse ()
 
void TearDown ()
 
PerIsolateThreadDataFindPerThreadDataForThisThread ()
 
PerIsolateThreadDataFindPerThreadDataForThread (ThreadId thread_id)
 
base::RecursiveMutex * break_access ()
 
Address get_address_from_id (AddressId id)
 
Contextcontext ()
 
void set_context (Context *context)
 
Context ** context_address ()
 
Objectpending_exception ()
 
void set_pending_exception (Object *exception_obj)
 
void clear_pending_exception ()
 
Object ** pending_exception_address ()
 
bool has_pending_exception ()
 
void clear_pending_message ()
 
v8::TryCatchtry_catch_handler ()
 
Address try_catch_handler_address ()
 
boolexternal_caught_exception_address ()
 
Object ** scheduled_exception_address ()
 
Address pending_message_obj_address ()
 
Address has_pending_message_address ()
 
Address pending_message_script_address ()
 
Objectscheduled_exception ()
 
bool has_scheduled_exception ()
 
void clear_scheduled_exception ()
 
bool HasExternalTryCatch ()
 
bool IsFinallyOnTop ()
 
bool is_catchable_by_javascript (Object *exception)
 
void PushToPartialSnapshotCache (Object *obj)
 
Addressc_entry_fp_address ()
 
Addresshandler_address ()
 
Address js_entry_sp ()
 
Addressjs_entry_sp_address ()
 
void * formal_count_address ()
 
Handle< GlobalObjectglobal_object ()
 
JSObjectglobal_proxy ()
 
Handle< JSBuiltinsObjectjs_builtins_object ()
 
void FreeThreadResources ()
 
bool OptionalRescheduleException (bool is_bottom_call)
 
void PushPromise (Handle< JSObject > promise)
 
void PopPromise ()
 
Handle< ObjectGetPromiseOnStackOnThrow ()
 
void SetCaptureStackTraceForUncaughtExceptions (bool capture, int frame_limit, StackTrace::StackTraceOptions options)
 
void PrintCurrentStackTrace (FILE *out)
 
void PrintStack (StringStream *accumulator)
 
void PrintStack (FILE *out)
 
Handle< StringStackTraceString ()
 
 NO_INLINE (void PushStackTraceAndDie(unsigned int magic, Object *object, Map *map, unsigned int magic2))
 
Handle< JSArrayCaptureCurrentStackTrace (int frame_limit, StackTrace::StackTraceOptions options)
 
Handle< ObjectCaptureSimpleStackTrace (Handle< JSObject > error_object, Handle< Object > caller)
 
void CaptureAndSetDetailedStackTrace (Handle< JSObject > error_object)
 
void CaptureAndSetSimpleStackTrace (Handle< JSObject > error_object, Handle< Object > caller)
 
bool MayNamedAccess (Handle< JSObject > receiver, Handle< Object > key, v8::AccessType type)
 
bool MayIndexedAccess (Handle< JSObject > receiver, uint32_t index, v8::AccessType type)
 
void SetFailedAccessCheckCallback (v8::FailedAccessCheckCallback callback)
 
void ReportFailedAccessCheck (Handle< JSObject > receiver, v8::AccessType type)
 
ObjectThrow (Object *exception, MessageLocation *location=NULL)
 
template<typename T >
MUST_USE_RESULT MaybeHandle< TThrow (Handle< Object > exception, MessageLocation *location=NULL)
 
ObjectReThrow (Object *exception)
 
void ScheduleThrow (Object *exception)
 
void RestorePendingMessageFromTryCatch (v8::TryCatch *handler)
 
void CancelScheduledExceptionFromTryCatch (v8::TryCatch *handler)
 
void ReportPendingMessages ()
 
MessageLocation GetMessageLocation ()
 
ObjectThrowIllegalOperation ()
 
ObjectPromoteScheduledException ()
 
void DoThrow (Object *exception, MessageLocation *location)
 
bool ShouldReportException (bool *can_be_caught_externally, bool catchable_by_javascript)
 
void ComputeLocation (MessageLocation *target)
 
ObjectStackOverflow ()
 
ObjectTerminateExecution ()
 
void CancelTerminateExecution ()
 
void InvokeApiInterruptCallback ()
 
void Iterate (ObjectVisitor *v)
 
void Iterate (ObjectVisitor *v, ThreadLocalTop *t)
 
char * Iterate (ObjectVisitor *v, char *t)
 
void IterateThread (ThreadVisitor *v, char *t)
 
Handle< Contextnative_context ()
 
Handle< Contextglobal_context ()
 
Handle< ContextGetCallingNativeContext ()
 
void RegisterTryCatchHandler (v8::TryCatch *that)
 
void UnregisterTryCatchHandler (v8::TryCatch *that)
 
char * ArchiveThread (char *to)
 
char * RestoreThread (char *from)
 
Bootstrapper * bootstrapper ()
 
Counterscounters ()
 
CodeRangecode_range ()
 
RuntimeProfilerruntime_profiler ()
 
CompilationCachecompilation_cache ()
 
Loggerlogger ()
 
StackGuardstack_guard ()
 
Heapheap ()
 
StatsTablestats_table ()
 
StubCachestub_cache ()
 
CodeAgingHelpercode_aging_helper ()
 
DeoptimizerDatadeoptimizer_data ()
 
ThreadLocalTop * thread_local_top ()
 
MaterializedObjectStorematerialized_object_store ()
 
MemoryAllocatormemory_allocator ()
 
KeyedLookupCachekeyed_lookup_cache ()
 
ContextSlotCachecontext_slot_cache ()
 
DescriptorLookupCachedescriptor_lookup_cache ()
 
HandleScopeDatahandle_scope_data ()
 
HandleScopeImplementerhandle_scope_implementer ()
 
Zoneruntime_zone ()
 
UnicodeCacheunicode_cache ()
 
InnerPointerToCodeCacheinner_pointer_to_code_cache ()
 
ConsStringIteratorOpwrite_iterator ()
 
GlobalHandlesglobal_handles ()
 
EternalHandleseternal_handles ()
 
ThreadManagerthread_manager ()
 
StringTrackerstring_tracker ()
 
unibrow::Mapping< unibrow::Ecma262UnCanonicalize > * jsregexp_uncanonicalize ()
 
unibrow::Mapping< unibrow::CanonicalizationRange > * jsregexp_canonrange ()
 
ConsStringIteratorOpobjects_string_compare_iterator_a ()
 
ConsStringIteratorOpobjects_string_compare_iterator_b ()
 
StaticResource< ConsStringIteratorOp > * objects_string_iterator ()
 
RuntimeStateruntime_state ()
 
Builtinsbuiltins ()
 
void NotifyExtensionInstalled ()
 
bool has_installed_extensions ()
 
unibrow::Mapping< unibrow::Ecma262Canonicalize > * regexp_macro_assembler_canonicalize ()
 
RegExpStackregexp_stack ()
 
unibrow::Mapping< unibrow::Ecma262Canonicalize > * interp_canonicalize_mapping ()
 
Debugdebug ()
 
bool DebuggerHasBreakPoints ()
 
CpuProfilercpu_profiler () const
 
HeapProfilerheap_profiler () const
 
Factory * factory ()
 
void SetData (uint32_t slot, void *data)
 
void * GetData (uint32_t slot)
 
void enable_serializer ()
 
bool serializer_enabled () const
 
bool IsDead ()
 
void SignalFatalError ()
 
bool use_crankshaft () const
 
bool initialized_from_snapshot ()
 
double time_millis_since_init ()
 
DateCachedate_cache ()
 
void set_date_cache (DateCache *date_cache)
 
Mapget_initial_js_array_map (ElementsKind kind)
 
bool IsFastArrayConstructorPrototypeChainIntact ()
 
CallInterfaceDescriptorDatacall_descriptor_data (int index)
 
void IterateDeferredHandles (ObjectVisitor *visitor)
 
void LinkDeferredHandles (DeferredHandles *deferred_handles)
 
void UnlinkDeferredHandles (DeferredHandles *deferred_handles)
 
bool concurrent_recompilation_enabled ()
 
bool concurrent_osr_enabled () const
 
OptimizingCompilerThreadoptimizing_compiler_thread ()
 
int num_sweeper_threads () const
 
SweeperThread ** sweeper_threads ()
 
int id () const
 
HStatistics * GetHStatistics ()
 
HStatistics * GetTStatistics ()
 
HTracer * GetHTracer ()
 
CodeTracer * GetCodeTracer ()
 
FunctionEntryHook function_entry_hook ()
 
void set_function_entry_hook (FunctionEntryHook function_entry_hook)
 
void * stress_deopt_count_address ()
 
base::RandomNumberGenerator * random_number_generator ()
 
ObjectFindCodeObject (Address a)
 
int NextOptimizationId ()
 
Handle< JSObjectGetSymbolRegistry ()
 
void AddCallCompletedCallback (CallCompletedCallback callback)
 
void RemoveCallCompletedCallback (CallCompletedCallback callback)
 
void FireCallCompletedCallback ()
 
void EnqueueMicrotask (Handle< Object > microtask)
 
void RunMicrotasks ()
 
void SetUseCounterCallback (v8::Isolate::UseCounterCallback callback)
 
void CountUsage (v8::Isolate::UseCounterFeature feature)
 
BasicBlockProfilerGetOrCreateBasicBlockProfiler ()
 
BasicBlockProfilerbasic_block_profiler ()
 

Static Public Member Functions

static void InitializeOncePerProcess ()
 
static PerIsolateThreadDataCurrentPerIsolateThreadData ()
 
static void GlobalTearDown ()
 
static base::Thread::LocalStorageKey isolate_key ()
 
static base::Thread::LocalStorageKey thread_id_key ()
 
static base::Thread::LocalStorageKey per_isolate_thread_data_key ()
 
static Address c_entry_fp (ThreadLocalTop *thread)
 
static Address handler (ThreadLocalTop *thread)
 
static int ArchiveSpacePerThread ()
 
static IsolateNewForTesting ()
 

Static Public Attributes

static const char *const kStackOverflowMessage
 
static const int kUC16AlphabetSize = 256
 
static const int kBMMaxShift = 250
 
static const int kJSRegexpStaticOffsetsVectorSize = 128
 

Private Types

enum  State { UNINITIALIZED , INITIALIZED }
 

Private Member Functions

 Isolate ()
 
void Deinit ()
 
PerIsolateThreadDataFindOrAllocatePerThreadDataForThisThread ()
 
void Enter ()
 
void Exit ()
 
void InitializeThreadLocal ()
 
void MarkCompactPrologue (bool is_compacting, ThreadLocalTop *archived_thread_data)
 
void MarkCompactEpilogue (bool is_compacting, ThreadLocalTop *archived_thread_data)
 
void FillCache ()
 
bool PropagatePendingExceptionToExternalTryCatch ()
 
bool IsErrorObject (Handle< Object > obj)
 
 DISALLOW_COPY_AND_ASSIGN (Isolate)
 

Static Private Member Functions

static void SetIsolateThreadLocals (Isolate *isolate, PerIsolateThreadData *data)
 

Private Attributes

void * embedder_data_ [Internals::kNumIsolateDataSlots]
 
Heap heap_
 
State state_
 
base::Atomic32 id_
 
EntryStackItementry_stack_
 
int stack_trace_nesting_level_
 
StringStream * incomplete_message_
 
Address isolate_addresses_ [kIsolateAddressCount+1]
 
Bootstrapper * bootstrapper_
 
RuntimeProfilerruntime_profiler_
 
CompilationCachecompilation_cache_
 
Counterscounters_
 
CodeRangecode_range_
 
base::RecursiveMutex break_access_
 
base::Atomic32 debugger_initialized_
 
Loggerlogger_
 
StackGuard stack_guard_
 
StatsTablestats_table_
 
StubCachestub_cache_
 
CodeAgingHelpercode_aging_helper_
 
DeoptimizerDatadeoptimizer_data_
 
MaterializedObjectStorematerialized_object_store_
 
ThreadLocalTop thread_local_top_
 
bool capture_stack_trace_for_uncaught_exceptions_
 
int stack_trace_for_uncaught_exceptions_frame_limit_
 
StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options_
 
MemoryAllocatormemory_allocator_
 
KeyedLookupCachekeyed_lookup_cache_
 
ContextSlotCachecontext_slot_cache_
 
DescriptorLookupCachedescriptor_lookup_cache_
 
HandleScopeData handle_scope_data_
 
HandleScopeImplementerhandle_scope_implementer_
 
UnicodeCacheunicode_cache_
 
Zone runtime_zone_
 
InnerPointerToCodeCacheinner_pointer_to_code_cache_
 
ConsStringIteratorOpwrite_iterator_
 
GlobalHandlesglobal_handles_
 
EternalHandleseternal_handles_
 
ThreadManagerthread_manager_
 
RuntimeState runtime_state_
 
Builtins builtins_
 
bool has_installed_extensions_
 
StringTrackerstring_tracker_
 
unibrow::Mapping< unibrow::Ecma262UnCanonicalizejsregexp_uncanonicalize_
 
unibrow::Mapping< unibrow::CanonicalizationRangejsregexp_canonrange_
 
ConsStringIteratorOp objects_string_compare_iterator_a_
 
ConsStringIteratorOp objects_string_compare_iterator_b_
 
StaticResource< ConsStringIteratorOpobjects_string_iterator_
 
unibrow::Mapping< unibrow::Ecma262Canonicalizeregexp_macro_assembler_canonicalize_
 
RegExpStackregexp_stack_
 
DateCachedate_cache_
 
unibrow::Mapping< unibrow::Ecma262Canonicalizeinterp_canonicalize_mapping_
 
CallInterfaceDescriptorDatacall_descriptor_data_
 
base::RandomNumberGenerator * random_number_generator_
 
bool serializer_enabled_
 
bool has_fatal_error_
 
bool initialized_from_snapshot_
 
double time_millis_at_init_
 
Debugdebug_
 
CpuProfilercpu_profiler_
 
HeapProfilerheap_profiler_
 
FunctionEntryHook function_entry_hook_
 
DeferredHandlesdeferred_handles_head_
 
OptimizingCompilerThreadoptimizing_compiler_thread_
 
SweeperThread ** sweeper_thread_
 
int num_sweeper_threads_
 
unsigned int stress_deopt_count_
 
int next_optimization_id_
 
List< CallCompletedCallbackcall_completed_callbacks_
 
v8::Isolate::UseCounterCallback use_counter_callback_
 
BasicBlockProfilerbasic_block_profiler_
 

Static Private Attributes

static base::LazyMutex thread_data_table_mutex_ = LAZY_MUTEX_INITIALIZER
 
static base::Thread::LocalStorageKey per_isolate_thread_data_key_
 
static base::Thread::LocalStorageKey isolate_key_
 
static base::Thread::LocalStorageKey thread_id_key_
 
static ThreadDataTablethread_data_table_ = NULL
 
static base::Atomic32 isolate_counter_ = 0
 

Friends

struct GlobalState
 
struct InitializeGlobalState
 
class ExecutionAccess
 
class HandleScopeImplementer
 
class IsolateInitializer
 
class OptimizingCompilerThread
 
class SweeperThread
 
class ThreadManager
 
class Simulator
 
class StackGuard
 
class ThreadId
 
class TestMemoryAllocatorScope
 
class TestCodeRangeScope
 
class v8::Isolate
 
class v8::Locker
 
class v8::Unlocker
 

Detailed Description

Definition at line 395 of file isolate.h.

Member Enumeration Documentation

◆ AddressId

Enumerator
kIsolateAddressCount 

Definition at line 463 of file isolate.h.

463  {
464 #define DECLARE_ENUM(CamelName, hacker_name) k##CamelName##Address,
466 #undef DECLARE_ENUM
468  };
#define DECLARE_ENUM(CamelName, hacker_name)
Definition: isolate.h:464
#define FOR_EACH_ISOLATE_ADDRESS_NAME(C)
Definition: isolate.h:169

◆ State

Enumerator
UNINITIALIZED 
INITIALIZED 

Definition at line 1122 of file isolate.h.

1122  {
1123  UNINITIALIZED, // Some components may not have been allocated.
1124  INITIALIZED // All components are fully initialized.
1125  };

Constructor & Destructor Documentation

◆ ~Isolate()

v8::internal::Isolate::~Isolate ( )

Definition at line 1683 of file isolate.cc.

1683  {
1684  TRACE_ISOLATE(destructor);
1685 
1686  // Has to be called while counters_ are still alive
1688 
1689  // The entry stack must be empty when we get here.
1691 
1692  delete entry_stack_;
1693  entry_stack_ = NULL;
1694 
1695  delete unicode_cache_;
1696  unicode_cache_ = NULL;
1697 
1698  delete date_cache_;
1699  date_cache_ = NULL;
1700 
1701  delete[] call_descriptor_data_;
1703 
1704  delete regexp_stack_;
1705  regexp_stack_ = NULL;
1706 
1707  delete descriptor_lookup_cache_;
1709  delete context_slot_cache_;
1711  delete keyed_lookup_cache_;
1713 
1714  delete stub_cache_;
1715  stub_cache_ = NULL;
1716  delete code_aging_helper_;
1718  delete stats_table_;
1719  stats_table_ = NULL;
1720 
1723 
1724  delete logger_;
1725  logger_ = NULL;
1726 
1727  delete counters_;
1728  counters_ = NULL;
1729 
1732 
1733  delete compilation_cache_;
1735  delete bootstrapper_;
1736  bootstrapper_ = NULL;
1739  delete write_iterator_;
1741 
1742  delete thread_manager_;
1744 
1745  delete string_tracker_;
1747 
1748  delete memory_allocator_;
1750  delete code_range_;
1751  code_range_ = NULL;
1752  delete global_handles_;
1754  delete eternal_handles_;
1756 
1757  delete string_stream_debug_object_cache_;
1758  string_stream_debug_object_cache_ = NULL;
1759 
1760  delete external_reference_table_;
1761  external_reference_table_ = NULL;
1762 
1763  delete random_number_generator_;
1765 
1766  delete debug_;
1767  debug_ = NULL;
1768 }
UnicodeCache * unicode_cache_
Definition: isolate.h:1252
ContextSlotCache * context_slot_cache_
Definition: isolate.h:1248
base::RandomNumberGenerator * random_number_generator_
Definition: isolate.h:1274
EntryStackItem * entry_stack_
Definition: isolate.h:1224
RegExpStack * regexp_stack_
Definition: isolate.h:1270
Counters * counters_
Definition: isolate.h:1231
DateCache * date_cache_
Definition: isolate.h:1271
HandleScopeImplementer * handle_scope_implementer_
Definition: isolate.h:1251
CompilationCache * compilation_cache_
Definition: isolate.h:1230
InnerPointerToCodeCache * inner_pointer_to_code_cache_
Definition: isolate.h:1254
ConsStringIteratorOp * write_iterator_
Definition: isolate.h:1255
StubCache * stub_cache_
Definition: isolate.h:1238
ThreadManager * thread_manager_
Definition: isolate.h:1258
CodeAgingHelper * code_aging_helper_
Definition: isolate.h:1239
GlobalHandles * global_handles_
Definition: isolate.h:1256
StringTracker * string_tracker_
Definition: isolate.h:1262
DescriptorLookupCache * descriptor_lookup_cache_
Definition: isolate.h:1249
KeyedLookupCache * keyed_lookup_cache_
Definition: isolate.h:1247
CodeRange * code_range_
Definition: isolate.h:1232
MemoryAllocator * memory_allocator_
Definition: isolate.h:1246
MaterializedObjectStore * materialized_object_store_
Definition: isolate.h:1241
StatsTable * stats_table_
Definition: isolate.h:1237
CallInterfaceDescriptorData * call_descriptor_data_
Definition: isolate.h:1273
Bootstrapper * bootstrapper_
Definition: isolate.h:1228
EternalHandles * eternal_handles_
Definition: isolate.h:1257
void DeleteKeptSegment()
Definition: zone.cc:158
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define TRACE_ISOLATE(tag)
Definition: isolate.cc:1457
#define DCHECK(condition)
Definition: logging.h:205

References bootstrapper_, call_descriptor_data_, code_aging_helper_, code_range_, compilation_cache_, context_slot_cache_, counters_, date_cache_, DCHECK, debug_, v8::internal::Zone::DeleteKeptSegment(), descriptor_lookup_cache_, entry_stack_, eternal_handles_, global_handles_, handle_scope_implementer_, inner_pointer_to_code_cache_, keyed_lookup_cache_, logger_, materialized_object_store_, memory_allocator_, NULL, v8::internal::Isolate::EntryStackItem::previous_item, random_number_generator_, regexp_stack_, runtime_zone_, stats_table_, string_tracker_, stub_cache_, thread_manager_, TRACE_ISOLATE, unicode_cache_, and write_iterator_.

+ Here is the call graph for this function:

◆ Isolate()

v8::internal::Isolate::Isolate ( )
private

Definition at line 1461 of file isolate.cc.

1462  : embedder_data_(),
1464  entry_stack_(NULL),
1470  counters_(NULL),
1471  code_range_(NULL),
1472  logger_(NULL),
1473  stats_table_(NULL),
1474  stub_cache_(NULL),
1487  runtime_zone_(this),
1496  date_cache_(NULL),
1498  // TODO(bmeurer) Initialized lazily because it depends on flags; can
1499  // be fixed once the default isolate cleanup is done.
1501  serializer_enabled_(false),
1502  has_fatal_error_(false),
1515  {
1516  base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
1518  }
1520  TRACE_ISOLATE(constructor);
1521 
1522  memset(isolate_addresses_, 0,
1523  sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
1524 
1525  heap_.isolate_ = this;
1526  stack_guard_.isolate_ = this;
1527 
1528  // ThreadManager is initialized early to support locking an isolate
1529  // before it is entered.
1531  thread_manager_->isolate_ = this;
1532 
1533 #ifdef DEBUG
1534  // heap_histograms_ initializes itself.
1535  memset(&js_spill_information_, 0, sizeof(js_spill_information_));
1536 #endif
1537 
1539 
1540 #define ISOLATE_INIT_EXECUTE(type, name, initial_value) \
1541  name##_ = (initial_value);
1543 #undef ISOLATE_INIT_EXECUTE
1544 
1545 #define ISOLATE_INIT_ARRAY_EXECUTE(type, name, length) \
1546  memset(name##_, 0, sizeof(type) * length);
1548 #undef ISOLATE_INIT_ARRAY_EXECUTE
1549 
1551  debug_ = new Debug(this);
1552 }
@ kOverview
Definition: v8.h:1322
Isolate * isolate_
Definition: heap.h:1424
int stack_trace_for_uncaught_exceptions_frame_limit_
Definition: isolate.h:1244
StackGuard stack_guard_
Definition: isolate.h:1236
bool initialized_from_snapshot_
Definition: isolate.h:1283
CpuProfiler * cpu_profiler_
Definition: isolate.h:1295
bool has_installed_extensions_
Definition: isolate.h:1261
friend class ThreadManager
Definition: isolate.h:1341
DeferredHandles * deferred_handles_head_
Definition: isolate.h:1320
HeapProfiler * heap_profiler_
Definition: isolate.h:1296
HandleScopeData handle_scope_data_
Definition: isolate.h:1250
FunctionEntryHook function_entry_hook_
Definition: isolate.h:1297
OptimizingCompilerThread * optimizing_compiler_thread_
Definition: isolate.h:1321
static ThreadDataTable * thread_data_table_
Definition: isolate.h:1180
BasicBlockProfiler * basic_block_profiler_
Definition: isolate.h:1334
void * embedder_data_[Internals::kNumIsolateDataSlots]
Definition: isolate.h:1130
int stack_trace_nesting_level_
Definition: isolate.h:1225
SweeperThread ** sweeper_thread_
Definition: isolate.h:1322
static base::Atomic32 isolate_counter_
Definition: isolate.h:1183
Address isolate_addresses_[kIsolateAddressCount+1]
Definition: isolate.h:1227
void InitializeLoggingAndCounters()
Definition: isolate.cc:1818
StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options_
Definition: isolate.h:1245
StringStream * incomplete_message_
Definition: isolate.h:1226
unsigned int stress_deopt_count_
Definition: isolate.h:1326
DeoptimizerData * deoptimizer_data_
Definition: isolate.h:1240
base::Atomic32 id_
Definition: isolate.h:1223
RuntimeProfiler * runtime_profiler_
Definition: isolate.h:1229
bool capture_stack_trace_for_uncaught_exceptions_
Definition: isolate.h:1243
static base::LazyMutex thread_data_table_mutex_
Definition: isolate.h:1175
v8::Isolate::UseCounterCallback use_counter_callback_
Definition: isolate.h:1333
#define ISOLATE_INIT_ARRAY_EXECUTE(type, name, length)
#define ISOLATE_INIT_EXECUTE(type, name, initial_value)
#define ISOLATE_INIT_ARRAY_LIST(V)
Definition: isolate.h:345
#define ISOLATE_INIT_LIST(V)
Definition: isolate.h:356
#define CHECK(condition)
Definition: logging.h:36
Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32 *ptr, Atomic32 increment)

References CHECK, debug_, handle_scope_data_, heap_, id_, v8::internal::HandleScopeData::Initialize(), InitializeLoggingAndCounters(), v8::internal::Heap::isolate_, v8::internal::ThreadManager::isolate_, isolate_addresses_, isolate_counter_, ISOLATE_INIT_ARRAY_EXECUTE, ISOLATE_INIT_ARRAY_LIST, ISOLATE_INIT_EXECUTE, ISOLATE_INIT_LIST, kIsolateAddressCount, v8::base::NoBarrier_AtomicIncrement(), v8::base::LazyInstanceImpl< T, AllocationTrait, CreateTrait, InitOnceTrait, DestroyTrait >::Pointer(), stack_guard_, thread_data_table_, thread_data_table_mutex_, thread_manager_, ThreadManager, and TRACE_ISOLATE.

Referenced by NewForTesting().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ AddCallCompletedCallback()

void v8::internal::Isolate::AddCallCompletedCallback ( CallCompletedCallback  callback)

Definition at line 2248 of file isolate.cc.

2248  {
2249  for (int i = 0; i < call_completed_callbacks_.length(); i++) {
2250  if (callback == call_completed_callbacks_.at(i)) return;
2251  }
2252  call_completed_callbacks_.Add(callback);
2253 }
List< CallCompletedCallback > call_completed_callbacks_
Definition: isolate.h:1331
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
Definition: list-inl.h:17
T & at(int i) const
Definition: list.h:69

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::List< T, AllocationPolicy >::at(), and call_completed_callbacks_.

Referenced by v8::Isolate::AddCallCompletedCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ArchiveSpacePerThread()

static int v8::internal::Isolate::ArchiveSpacePerThread ( )
inlinestatic

Definition at line 683 of file isolate.h.

683 { return sizeof(ThreadLocalTop); }

Referenced by v8::internal::ArchiveSpacePerThread().

+ Here is the caller graph for this function:

◆ ArchiveThread()

char * v8::internal::Isolate::ArchiveThread ( char *  to)

Definition at line 1369 of file isolate.cc.

1369  {
1370  MemCopy(to, reinterpret_cast<char*>(thread_local_top()),
1371  sizeof(ThreadLocalTop));
1376  return to + sizeof(ThreadLocalTop);
1377 }
void clear_scheduled_exception()
Definition: isolate.h:631
void clear_pending_message()
Definition: isolate.h:588
void InitializeThreadLocal()
Definition: isolate.cc:1771
ThreadLocalTop * thread_local_top()
Definition: isolate.h:878
void clear_pending_exception()
Definition: isolate.h:572
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file
void MemCopy(void *dest, const void *src, size_t size)
Definition: utils.h:350

References clear_pending_exception(), clear_pending_message(), clear_scheduled_exception(), InitializeThreadLocal(), v8::internal::MemCopy(), thread_local_top(), and to().

Referenced by v8::internal::ThreadManager::EagerlyArchiveThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_block_profiler()

BasicBlockProfiler* v8::internal::Isolate::basic_block_profiler ( )
inline

Definition at line 1112 of file isolate.h.

1112 { return basic_block_profiler_; }

References basic_block_profiler_.

◆ bootstrapper()

◆ break_access()

base::RecursiveMutex* v8::internal::Isolate::break_access ( )
inline

Definition at line 543 of file isolate.h.

543 { return &break_access_; }
base::RecursiveMutex break_access_
Definition: isolate.h:1233

References break_access_.

Referenced by v8::internal::BASE_EMBEDDED< Visitor >::Lock(), v8::internal::BASE_EMBEDDED< Visitor >::TryLock(), and v8::internal::BASE_EMBEDDED< Visitor >::Unlock().

+ Here is the caller graph for this function:

◆ builtins()

Builtins* v8::internal::Isolate::builtins ( )
inline

Definition at line 947 of file isolate.h.

947 { return &builtins_; }

References builtins_.

Referenced by v8::internal::BackEdgeTable::AddStackCheck(), v8::internal::Compiler::BuildFunctionInfo(), v8::internal::StubCache::Clear(), v8::internal::ConstantPoolArray::ClearPtrEntries(), v8::internal::Logger::CodeCreateEvent(), v8::internal::LoadIC::CompileHandler(), v8::internal::StoreIC::CompileHandler(), v8::internal::PropertyICCompiler::ComputeMonomorphic(), v8::internal::DebugBreakForIC(), v8::internal::Deoptimizer::DoComputeAccessorStubFrame(), v8::internal::Deoptimizer::DoComputeArgumentsAdaptorFrame(), v8::internal::Deoptimizer::DoComputeCompiledStubFrame(), v8::internal::Deoptimizer::DoComputeConstructStubFrame(), v8::internal::Deoptimizer::DoComputeJSFrame(), v8::internal::DropFrames(), v8::internal::RootsReferencesExtractor::FillReferences(), v8::internal::StoreIC::generic_stub(), v8::internal::KeyedLoadIC::generic_stub(), v8::internal::Code::GetCodeAgeAndParity(), v8::internal::Code::GetCodeAgeStub(), v8::internal::Compiler::GetOptimizedCode(), v8::internal::Debug::HandleStepIn(), v8::internal::InstallBuiltin(), v8::internal::InstallFunction(), v8::internal::SharedFunctionInfo::is_compiled(), v8::internal::JSFunction::is_compiled(), v8::internal::JSFunction::IsInOptimizationQueue(), v8::internal::JSFunction::IsMarkedForConcurrentOptimization(), v8::internal::JSFunction::IsMarkedForOptimization(), v8::internal::Heap::IterateStrongRoots(), v8::internal::TypeFeedbackOracle::LoadIsBuiltin(), v8::internal::CpuProfiler::LogBuiltins(), v8::internal::Logger::LogCompiledFunctions(), v8::internal::StoreIC::megamorphic_stub(), v8::internal::HOptimizedGraphBuilder::NewArgumentAdaptorCall(), v8::internal::BackEdgeTable::Patch(), v8::internal::KeyedLoadIC::pre_monomorphic_stub(), v8::internal::KeyedStoreIC::pre_monomorphic_stub(), v8::internal::Debug::PrepareForBreakPoints(), v8::internal::Debug::PrepareStep(), v8::internal::CodeFlusher::ProcessJSFunctionCandidates(), v8::internal::CodeFlusher::ProcessSharedFunctionInfoCandidates(), v8::internal::RecordFunctionCompilation(), v8::internal::BackEdgeTable::RemoveStackCheck(), v8::internal::LiveEdit::ReplaceFunctionCode(), v8::internal::BackEdgeTable::Revert(), v8::internal::CodeSerializer::SerializeObject(), v8::internal::StubCache::Set(), v8::internal::LiveEdit::SetAfterBreakTarget(), v8::internal::KeyedStoreIC::sloppy_arguments_stub(), v8::internal::LoadIC::slow_stub(), v8::internal::StoreIC::slow_stub(), v8::internal::KeyedLoadIC::string_stub(), v8::internal::TraceTopFrame(), and v8::internal::ArgumentsAdaptorFrame::unchecked_code().

+ Here is the caller graph for this function:

◆ c_entry_fp()

static Address v8::internal::Isolate::c_entry_fp ( ThreadLocalTop *  thread)
inlinestatic

Definition at line 647 of file isolate.h.

647  {
648  return thread->c_entry_fp_;
649  }

Referenced by v8::internal::IC::IC(), v8::internal::SafeStackFrameIterator::IsValidTop(), PrintStack(), v8::internal::StackFrameIterator::Reset(), and v8::internal::SafeStackFrameIterator::SafeStackFrameIterator().

+ Here is the caller graph for this function:

◆ c_entry_fp_address()

Address* v8::internal::Isolate::c_entry_fp_address ( )
inline

Definition at line 652 of file isolate.h.

652  {
653  return &thread_local_top_.c_entry_fp_;
654  }
ThreadLocalTop thread_local_top_
Definition: isolate.h:1242

References thread_local_top_.

◆ call_descriptor_data()

CallInterfaceDescriptorData * v8::internal::Isolate::call_descriptor_data ( int  index)

Definition at line 2208 of file isolate.cc.

2208  {
2209  DCHECK(0 <= index && index < CallDescriptors::NUMBER_OF_DESCRIPTORS);
2210  return &call_descriptor_data_[index];
2211 }

References call_descriptor_data_, DCHECK, and v8::internal::CallDescriptors::NUMBER_OF_DESCRIPTORS.

Referenced by v8::internal::CallInterfaceDescriptor::DebugName().

+ Here is the caller graph for this function:

◆ CancelScheduledExceptionFromTryCatch()

void v8::internal::Isolate::CancelScheduledExceptionFromTryCatch ( v8::TryCatch handler)

Definition at line 887 of file isolate.cc.

887  {
889  if (scheduled_exception() == handler->exception_) {
890  DCHECK(scheduled_exception() != heap()->termination_exception());
892  }
893 }
bool has_scheduled_exception()
Definition: isolate.h:627
Object * scheduled_exception()
Definition: isolate.h:622
static Address handler(ThreadLocalTop *thread)
Definition: isolate.h:650

References clear_scheduled_exception(), DCHECK, handler(), has_scheduled_exception(), heap(), and scheduled_exception().

+ Here is the call graph for this function:

◆ CancelTerminateExecution()

void v8::internal::Isolate::CancelTerminateExecution ( )

Definition at line 795 of file isolate.cc.

795  {
796  if (try_catch_handler()) {
798  }
799  if (has_pending_exception() &&
800  pending_exception() == heap_.termination_exception()) {
801  thread_local_top()->external_caught_exception_ = false;
803  }
804  if (has_scheduled_exception() &&
805  scheduled_exception() == heap_.termination_exception()) {
806  thread_local_top()->external_caught_exception_ = false;
808  }
809 }
bool has_terminated_
Definition: v8.h:5412
Object * pending_exception()
Definition: isolate.h:561
v8::TryCatch * try_catch_handler()
Definition: isolate.h:593
bool has_pending_exception()
Definition: isolate.h:581

References clear_pending_exception(), clear_scheduled_exception(), has_pending_exception(), has_scheduled_exception(), v8::TryCatch::has_terminated_, heap_, pending_exception(), scheduled_exception(), thread_local_top(), and try_catch_handler().

Referenced by v8::V8::CancelTerminateExecution().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CaptureAndSetDetailedStackTrace()

void v8::internal::Isolate::CaptureAndSetDetailedStackTrace ( Handle< JSObject error_object)

Definition at line 418 of file isolate.cc.

418  {
420  // Capture stack trace for a detailed exception message.
421  Handle<Name> key = factory()->detailed_stack_trace_symbol();
422  Handle<JSArray> stack_trace = CaptureCurrentStackTrace(
425  JSObject::SetProperty(error_object, key, stack_trace, STRICT).Assert();
426  }
427 }
Handle< JSArray > CaptureCurrentStackTrace(int frame_limit, StackTrace::StackTraceOptions options)
Definition: isolate.cc:439
Factory * factory()
Definition: isolate.h:982
static MUST_USE_RESULT MaybeHandle< Object > SetProperty(Handle< Object > object, Handle< Name > key, Handle< Object > value, StrictMode strict_mode, StoreFromKeyed store_mode=MAY_BE_STORE_FROM_KEYED)
Definition: objects.cc:2798

References capture_stack_trace_for_uncaught_exceptions_, CaptureCurrentStackTrace(), factory(), v8::internal::Object::SetProperty(), stack_trace_for_uncaught_exceptions_frame_limit_, stack_trace_for_uncaught_exceptions_options_, and v8::internal::STRICT.

+ Here is the call graph for this function:

◆ CaptureAndSetSimpleStackTrace()

void v8::internal::Isolate::CaptureAndSetSimpleStackTrace ( Handle< JSObject error_object,
Handle< Object caller 
)

Definition at line 430 of file isolate.cc.

431  {
432  // Capture stack trace for simple stack trace string formatting.
433  Handle<Name> key = factory()->stack_trace_symbol();
434  Handle<Object> stack_trace = CaptureSimpleStackTrace(error_object, caller);
435  JSObject::SetProperty(error_object, key, stack_trace, STRICT).Assert();
436 }
Handle< Object > CaptureSimpleStackTrace(Handle< JSObject > error_object, Handle< Object > caller)
Definition: isolate.cc:335

References CaptureSimpleStackTrace(), factory(), v8::internal::Object::SetProperty(), and v8::internal::STRICT.

Referenced by StackOverflow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CaptureCurrentStackTrace()

Handle< JSArray > v8::internal::Isolate::CaptureCurrentStackTrace ( int  frame_limit,
StackTrace::StackTraceOptions  options 
)

Definition at line 439 of file isolate.cc.

440  {
441  // Ensure no negative values.
442  int limit = Max(frame_limit, 0);
443  Handle<JSArray> stack_trace = factory()->NewJSArray(frame_limit);
444 
445  Handle<String> column_key =
446  factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("column"));
447  Handle<String> line_key =
448  factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("lineNumber"));
449  Handle<String> script_id_key =
450  factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("scriptId"));
451  Handle<String> script_name_key =
452  factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("scriptName"));
453  Handle<String> script_name_or_source_url_key =
454  factory()->InternalizeOneByteString(
455  STATIC_CHAR_VECTOR("scriptNameOrSourceURL"));
456  Handle<String> function_key =
457  factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("functionName"));
458  Handle<String> eval_key =
459  factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("isEval"));
460  Handle<String> constructor_key =
461  factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("isConstructor"));
462 
463  StackTraceFrameIterator it(this);
464  int frames_seen = 0;
465  while (!it.done() && (frames_seen < limit)) {
466  JavaScriptFrame* frame = it.frame();
467  // Set initial size to the maximum inlining level + 1 for the outermost
468  // function.
469  List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
470  frame->Summarize(&frames);
471  for (int i = frames.length() - 1; i >= 0 && frames_seen < limit; i--) {
472  Handle<JSFunction> fun = frames[i].function();
473  // Filter frames from other security contexts.
475  !this->context()->HasSameSecurityTokenAs(fun->context())) continue;
476 
477  // Create a JSObject to hold the information for the StackFrame.
478  Handle<JSObject> stack_frame = factory()->NewJSObject(object_function());
479 
480  Handle<Script> script(Script::cast(fun->shared()->script()));
481 
482  if (options & StackTrace::kLineNumber) {
483  int script_line_offset = script->line_offset()->value();
484  int position = frames[i].code()->SourcePosition(frames[i].pc());
485  int line_number = Script::GetLineNumber(script, position);
486  // line_number is already shifted by the script_line_offset.
487  int relative_line_number = line_number - script_line_offset;
488  if (options & StackTrace::kColumnOffset && relative_line_number >= 0) {
489  Handle<FixedArray> line_ends(FixedArray::cast(script->line_ends()));
490  int start = (relative_line_number == 0) ? 0 :
491  Smi::cast(line_ends->get(relative_line_number - 1))->value() + 1;
492  int column_offset = position - start;
493  if (relative_line_number == 0) {
494  // For the case where the code is on the same line as the script
495  // tag.
496  column_offset += script->column_offset()->value();
497  }
499  stack_frame, column_key,
500  handle(Smi::FromInt(column_offset + 1), this), NONE);
501  }
503  stack_frame, line_key,
504  handle(Smi::FromInt(line_number + 1), this), NONE);
505  }
506 
507  if (options & StackTrace::kScriptId) {
509  stack_frame, script_id_key, handle(script->id(), this), NONE);
510  }
511 
512  if (options & StackTrace::kScriptName) {
514  stack_frame, script_name_key, handle(script->name(), this), NONE);
515  }
516 
517  if (options & StackTrace::kScriptNameOrSourceURL) {
518  Handle<Object> result = Script::GetNameOrSourceURL(script);
520  stack_frame, script_name_or_source_url_key, result, NONE);
521  }
522 
523  if (options & StackTrace::kFunctionName) {
524  Handle<Object> fun_name(fun->shared()->DebugName(), this);
525  JSObject::AddProperty(stack_frame, function_key, fun_name, NONE);
526  }
527 
528  if (options & StackTrace::kIsEval) {
529  Handle<Object> is_eval =
530  script->compilation_type() == Script::COMPILATION_TYPE_EVAL ?
531  factory()->true_value() : factory()->false_value();
532  JSObject::AddProperty(stack_frame, eval_key, is_eval, NONE);
533  }
534 
535  if (options & StackTrace::kIsConstructor) {
536  Handle<Object> is_constructor = (frames[i].is_constructor()) ?
537  factory()->true_value() : factory()->false_value();
539  stack_frame, constructor_key, is_constructor, NONE);
540  }
541 
542  FixedArray::cast(stack_trace->elements())->set(frames_seen, *stack_frame);
543  frames_seen++;
544  }
545  it.Advance();
546  }
547 
548  stack_trace->set_length(Smi::FromInt(frames_seen));
549  return stack_trace;
550 }
@ kLineNumber
Definition: v8.h:1313
@ kScriptNameOrSourceURL
Definition: v8.h:1319
@ kIsConstructor
Definition: v8.h:1318
@ kFunctionName
Definition: v8.h:1316
@ kColumnOffset
Definition: v8.h:1314
@ kScriptName
Definition: v8.h:1315
@ kExposeFramesAcrossSecurityOrigins
Definition: v8.h:1321
@ kScriptId
Definition: v8.h:1320
Context * context()
Definition: isolate.h:548
static void AddProperty(Handle< JSObject > object, Handle< Name > key, Handle< Object > value, PropertyAttributes attributes)
Definition: objects.cc:3786
static Handle< Object > GetNameOrSourceURL(Handle< Script > script)
Definition: objects.cc:9697
static int GetLineNumber(Handle< Script > script, int code_pos)
Definition: objects.cc:9673
static Smi * FromInt(int value)
Definition: objects-inl.h:1321
Handle< T > handle(T *t, Isolate *isolate)
Definition: handles.h:146
const Register pc
static LifetimePosition Max(LifetimePosition a, LifetimePosition b)
@ NONE
#define STATIC_CHAR_VECTOR(x)
Definition: vector.h:154

References v8::internal::JSObject::AddProperty(), v8::internal::StackTraceFrameIterator::Advance(), v8::internal::Script::COMPILATION_TYPE_EVAL, context(), factory(), v8::internal::Smi::FromInt(), v8::internal::Script::GetLineNumber(), v8::internal::Script::GetNameOrSourceURL(), v8::internal::handle(), v8::StackTrace::kColumnOffset, v8::StackTrace::kExposeFramesAcrossSecurityOrigins, v8::StackTrace::kFunctionName, v8::StackTrace::kIsConstructor, v8::StackTrace::kIsEval, v8::StackTrace::kLineNumber, v8::StackTrace::kScriptId, v8::StackTrace::kScriptName, v8::StackTrace::kScriptNameOrSourceURL, v8::internal::Max(), NONE, v8::internal::pc, STATIC_CHAR_VECTOR, and v8::internal::JavaScriptFrame::Summarize().

Referenced by CaptureAndSetDetailedStackTrace(), v8::StackTrace::CurrentStackTrace(), and DoThrow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CaptureSimpleStackTrace()

Handle< Object > v8::internal::Isolate::CaptureSimpleStackTrace ( Handle< JSObject error_object,
Handle< Object caller 
)

Definition at line 335 of file isolate.cc.

336  {
337  // Get stack trace limit.
338  Handle<Object> error = Object::GetProperty(
339  this, js_builtins_object(), "$Error").ToHandleChecked();
340  if (!error->IsJSObject()) return factory()->undefined_value();
341 
342  Handle<String> stackTraceLimit =
343  factory()->InternalizeUtf8String("stackTraceLimit");
344  DCHECK(!stackTraceLimit.is_null());
345  Handle<Object> stack_trace_limit =
347  stackTraceLimit);
348  if (!stack_trace_limit->IsNumber()) return factory()->undefined_value();
349  int limit = FastD2IChecked(stack_trace_limit->Number());
350  limit = Max(limit, 0); // Ensure that limit is not negative.
351 
352  int initial_size = Min(limit, 10);
353  Handle<FixedArray> elements =
354  factory()->NewFixedArrayWithHoles(initial_size * 4 + 1);
355 
356  // If the caller parameter is a function we skip frames until we're
357  // under it before starting to collect.
358  bool seen_caller = !caller->IsJSFunction();
359  // First element is reserved to store the number of sloppy frames.
360  int cursor = 1;
361  int frames_seen = 0;
362  int sloppy_frames = 0;
363  bool encountered_strict_function = false;
364  for (JavaScriptFrameIterator iter(this);
365  !iter.done() && frames_seen < limit;
366  iter.Advance()) {
367  JavaScriptFrame* frame = iter.frame();
368  // Set initial size to the maximum inlining level + 1 for the outermost
369  // function.
370  List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
371  frame->Summarize(&frames);
372  for (int i = frames.length() - 1; i >= 0; i--) {
373  Handle<JSFunction> fun = frames[i].function();
374  Handle<Object> recv = frames[i].receiver();
375  // Filter out internal frames that we do not want to show.
376  if (!IsVisibleInStackTrace(*fun, *caller, *recv, &seen_caller)) continue;
377  // Filter out frames from other security contexts.
378  if (!this->context()->HasSameSecurityTokenAs(fun->context())) continue;
379  if (cursor + 4 > elements->length()) {
380  int new_capacity = JSObject::NewElementsCapacity(elements->length());
381  Handle<FixedArray> new_elements =
382  factory()->NewFixedArrayWithHoles(new_capacity);
383  for (int i = 0; i < cursor; i++) {
384  new_elements->set(i, elements->get(i));
385  }
386  elements = new_elements;
387  }
388  DCHECK(cursor + 4 <= elements->length());
389 
390 
391  Handle<Code> code = frames[i].code();
392  Handle<Smi> offset(Smi::FromInt(frames[i].offset()), this);
393  // The stack trace API should not expose receivers and function
394  // objects on frames deeper than the top-most one with a strict
395  // mode function. The number of sloppy frames is stored as
396  // first element in the result array.
397  if (!encountered_strict_function) {
398  if (fun->shared()->strict_mode() == STRICT) {
399  encountered_strict_function = true;
400  } else {
401  sloppy_frames++;
402  }
403  }
404  elements->set(cursor++, *recv);
405  elements->set(cursor++, *fun);
406  elements->set(cursor++, *code);
407  elements->set(cursor++, *offset);
408  frames_seen++;
409  }
410  }
411  elements->set(0, Smi::FromInt(sloppy_frames));
412  Handle<JSArray> result = factory()->NewJSArrayWithElements(elements);
413  result->set_length(Smi::FromInt(cursor));
414  return result;
415 }
static Handle< T > cast(Handle< S > that)
Definition: handles.h:116
Handle< JSBuiltinsObject > js_builtins_object()
Definition: isolate.h:679
static Handle< Object > GetDataProperty(Handle< JSObject > object, Handle< Name > key)
Definition: objects.cc:140
static int NewElementsCapacity(int old_capacity)
Definition: objects.h:1911
static MUST_USE_RESULT MaybeHandle< Object > GetProperty(LookupIterator *it)
Definition: objects.cc:109
static LifetimePosition Min(LifetimePosition a, LifetimePosition b)
static bool IsVisibleInStackTrace(JSFunction *fun, Object *caller, Object *receiver, bool *seen_caller)
Definition: isolate.cc:308
int FastD2IChecked(double x)
Definition: conversions.h:46

References context(), DCHECK, factory(), v8::internal::FastD2IChecked(), v8::internal::Smi::FromInt(), v8::internal::JSObject::GetDataProperty(), v8::internal::Object::GetProperty(), v8::internal::Handle< T >::is_null(), v8::internal::IsVisibleInStackTrace(), js_builtins_object(), v8::internal::Max(), v8::internal::Min(), v8::internal::JSObject::NewElementsCapacity(), v8::internal::STRICT, and v8::internal::JavaScriptFrame::Summarize().

Referenced by CaptureAndSetSimpleStackTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clear_pending_exception()

void v8::internal::Isolate::clear_pending_exception ( )
inline

Definition at line 572 of file isolate.h.

572  {
573  DCHECK(!thread_local_top_.pending_exception_->IsException());
574  thread_local_top_.pending_exception_ = heap_.the_hole_value();
575  }

References DCHECK, heap_, and thread_local_top_.

Referenced by ArchiveThread(), CancelTerminateExecution(), v8::internal::Debug::CompileDebuggerScript(), v8::internal::LiveEdit::GatherCompileInfo(), v8::internal::Compiler::GetDebugCode(), v8::internal::Compiler::GetOptimizedCode(), Init(), OptionalRescheduleException(), v8::internal::MessageHandler::ReportMessage(), and ScheduleThrow().

+ Here is the caller graph for this function:

◆ clear_pending_message()

void v8::internal::Isolate::clear_pending_message ( )
inline

Definition at line 588 of file isolate.h.

588  {
589  thread_local_top_.has_pending_message_ = false;
590  thread_local_top_.pending_message_obj_ = heap_.the_hole_value();
591  thread_local_top_.pending_message_script_ = heap_.the_hole_value();
592  }

References heap_, and thread_local_top_.

Referenced by ArchiveThread(), v8::internal::LiveEdit::GatherCompileInfo(), Init(), v8::internal::Invoke(), and ReportPendingMessages().

+ Here is the caller graph for this function:

◆ clear_scheduled_exception()

void v8::internal::Isolate::clear_scheduled_exception ( )
inline

Definition at line 631 of file isolate.h.

631  {
632  DCHECK(!thread_local_top_.scheduled_exception_->IsException());
633  thread_local_top_.scheduled_exception_ = heap_.the_hole_value();
634  }

References DCHECK, heap_, and thread_local_top_.

Referenced by ArchiveThread(), CancelScheduledExceptionFromTryCatch(), CancelTerminateExecution(), Init(), v8::internal::Debug::OnThrow(), PromoteScheduledException(), and v8::internal::MessageHandler::ReportMessage().

+ Here is the caller graph for this function:

◆ code_aging_helper()

CodeAgingHelper* v8::internal::Isolate::code_aging_helper ( )
inline

Definition at line 876 of file isolate.h.

876 { return code_aging_helper_; }

References code_aging_helper_.

◆ code_range()

CodeRange* v8::internal::Isolate::code_range ( )
inline

◆ compilation_cache()

◆ ComputeLocation()

void v8::internal::Isolate::ComputeLocation ( MessageLocation target)

Definition at line 932 of file isolate.cc.

932  {
933  *target = MessageLocation(Handle<Script>(heap_.empty_script()), -1, -1);
934  StackTraceFrameIterator it(this);
935  if (!it.done()) {
936  JavaScriptFrame* frame = it.frame();
937  JSFunction* fun = frame->function();
938  Object* script = fun->shared()->script();
939  if (script->IsScript() &&
940  !(Script::cast(script)->source()->IsUndefined())) {
941  int pos = frame->LookupCode()->SourcePosition(frame->pc());
942  // Compute the location from the function and the reloc info.
943  Handle<Script> casted_script(Script::cast(script));
944  *target = MessageLocation(casted_script, pos, pos + 1);
945  }
946  }
947 }
kSerializedDataOffset Object
Definition: objects-inl.h:5322

References v8::internal::JavaScriptFrame::function(), and heap_.

Referenced by v8::internal::Debug::CompileDebuggerScript(), and DoThrow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ concurrent_osr_enabled()

bool v8::internal::Isolate::concurrent_osr_enabled ( ) const
inline

Definition at line 1052 of file isolate.h.

1052  {
1053  // Thread is only available with flag enabled.
1055  FLAG_concurrent_recompilation);
1056  return optimizing_compiler_thread_ != NULL && FLAG_concurrent_osr;
1057  }

References DCHECK, NULL, and optimizing_compiler_thread_.

Referenced by v8::internal::RuntimeProfiler::Optimize().

+ Here is the caller graph for this function:

◆ concurrent_recompilation_enabled()

bool v8::internal::Isolate::concurrent_recompilation_enabled ( )
inline

Definition at line 1045 of file isolate.h.

1045  {
1046  // Thread is only available with flag enabled.
1048  FLAG_concurrent_recompilation);
1050  }

References DCHECK, NULL, and optimizing_compiler_thread_.

Referenced by Deinit(), v8::internal::RuntimeProfiler::Optimize(), and v8::internal::Debug::PrepareForBreakPoints().

+ Here is the caller graph for this function:

◆ context()

◆ context_address()

Context** v8::internal::Isolate::context_address ( )
inline

Definition at line 553 of file isolate.h.

553 { return &thread_local_top_.context_; }

References thread_local_top_.

◆ context_slot_cache()

ContextSlotCache* v8::internal::Isolate::context_slot_cache ( )
inline

Definition at line 891 of file isolate.h.

891  {
892  return context_slot_cache_;
893  }

References context_slot_cache_.

Referenced by v8::internal::Heap::CreateInitialObjects(), and v8::internal::Heap::MarkCompactPrologue().

+ Here is the caller graph for this function:

◆ counters()

Counters* v8::internal::Isolate::counters ( )
inline

Definition at line 857 of file isolate.h.

857  {
858  // Call InitializeLoggingAndCounters() if logging is needed before
859  // the isolate is fully initialized.
860  DCHECK(counters_ != NULL);
861  return counters_;
862  }

References counters_, DCHECK, and NULL.

Referenced by v8::internal::HGraphBuilder::Add(), v8::internal::Zone::adjust_segment_bytes_allocated(), v8::internal::MemoryAllocator::AllocateChunk(), v8::internal::Heap::AllocateRaw(), v8::internal::CodeStubGraphBuilderBase::BuildCheckAndInstallOptimizedCode(), v8::internal::CodeStubGraphBuilderBase::BuildGraph(), v8::internal::CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap(), v8::internal::Heap::CheckpointObjectStats(), v8::internal::Heap::CollectGarbage(), v8::internal::MemoryAllocator::CommitBlock(), v8::internal::StoreBuffer::Compact(), v8::internal::Compiler::CompileScript(), v8::internal::Compiler::CompileStreamedScript(), v8::internal::CompileToplevel(), v8::internal::PropertyICCompiler::ComputeKeyedLoadPolymorphic(), v8::internal::GlobalHandles::Node::DecreaseBlockUses(), v8::internal::Deoptimizer::Deoptimizer(), v8::internal::JSObject::EnsureWritableFastElements(), v8::internal::MemoryAllocator::FreeMemory(), v8::internal::Heap::GarbageCollectionEpilogue(), v8::internal::InnerPointerToCodeCache::GetCacheEntry(), v8::internal::StatisticsExtension::GetCounters(), v8::internal::GetEnumPropertyKeys(), v8::internal::Compiler::GetFunctionFromEval(), v8::internal::Heap::IdleNotification(), v8::internal::GlobalHandles::Node::IncreaseBlockUses(), v8::internal::Parser::Internalize(), v8::internal::CompilationCacheEval::Lookup(), v8::internal::CompilationCacheScript::Lookup(), v8::internal::CompilationCacheRegExp::Lookup(), v8::Isolate::LowMemoryNotification(), v8::internal::FullCodeGenerator::MakeCode(), v8::internal::CodeGenerator::MakeCodeEpilogue(), v8::internal::Heap::MarkCompact(), v8::internal::JSObject::MigrateFastToSlow(), v8::internal::Map::Normalize(), v8::internal::JSObject::NormalizeElements(), v8::internal::Parser::Parse(), v8::internal::Parser::ParseLazy(), v8::internal::Parser::ParseProgram(), v8::internal::Heap::PerformGarbageCollection(), v8::internal::ExternalReferenceTable::PopulateTable(), v8::internal::Runtime_NewObjectHelper(), v8::internal::Heap::SelectGarbageCollector(), v8::internal::StubCache::Set(), v8::Isolate::SetCounterFunction(), v8::Isolate::SetCreateHistogramFunction(), v8::internal::IncrementalMarking::Step(), v8::internal::StoreBuffer::StoreBufferOverflow(), v8::internal::JSObjectWalkVisitor< ContextObject >::StructureWalk(), and v8::internal::MemoryAllocator::UncommitBlock().

+ Here is the caller graph for this function:

◆ CountUsage()

void v8::internal::Isolate::CountUsage ( v8::Isolate::UseCounterFeature  feature)

Definition at line 2358 of file isolate.cc.

2358  {
2359  if (use_counter_callback_) {
2360  use_counter_callback_(reinterpret_cast<v8::Isolate*>(this), feature);
2361  }
2362 }
Isolate represents an isolated instance of the V8 engine.
Definition: v8.h:4356

References use_counter_callback_.

Referenced by v8::internal::Parser::Internalize().

+ Here is the caller graph for this function:

◆ cpu_profiler()

CpuProfiler* v8::internal::Isolate::cpu_profiler ( ) const
inline

Definition at line 971 of file isolate.h.

971 { return cpu_profiler_; }

References cpu_profiler_.

Referenced by v8::CpuProfile::Delete(), v8::internal::CompilationInfo::Initialize(), v8::internal::Heap::OnMoveEvent(), v8::internal::RecordFunctionCompilation(), v8::internal::Sampler::SampleStack(), and v8::internal::Heap::SelectScavengingVisitorsTable().

+ Here is the caller graph for this function:

◆ CurrentPerIsolateThreadData()

static PerIsolateThreadData* v8::internal::Isolate::CurrentPerIsolateThreadData ( )
inlinestatic

Definition at line 474 of file isolate.h.

474  {
475  return reinterpret_cast<PerIsolateThreadData*>(
477  }
static void * GetThreadLocal(LocalStorageKey key)
static base::Thread::LocalStorageKey per_isolate_thread_data_key_
Definition: isolate.h:1177

References v8::base::Thread::GetThreadLocal(), and per_isolate_thread_data_key_.

Referenced by Enter(), Exit(), and TearDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ date_cache()

DateCache* v8::internal::Isolate::date_cache ( )
inline

Definition at line 1020 of file isolate.h.

1020  {
1021  return date_cache_;
1022  }

References date_cache_.

Referenced by v8::Date::DateTimeConfigurationChangeNotification(), v8::internal::JSDate::DoGetField(), and set_date_cache().

+ Here is the caller graph for this function:

◆ debug()

◆ DebuggerHasBreakPoints()

bool v8::internal::Isolate::DebuggerHasBreakPoints ( )
inline

Definition at line 28 of file isolate-inl.h.

28  {
29  return debug()->has_break_points();
30 }
bool has_break_points() const
Definition: debug.h:467

Referenced by v8::internal::RuntimeProfiler::AttemptOnStackReplacement(), v8::internal::Compiler::DebuggerWantsEagerCompilation(), v8::internal::Compiler::GetConcurrentlyOptimizedCode(), v8::internal::Compiler::GetLazyCode(), and v8::internal::RuntimeProfiler::OptimizeNow().

+ Here is the caller graph for this function:

◆ Deinit()

void v8::internal::Isolate::Deinit ( )
private

Definition at line 1591 of file isolate.cc.

1591  {
1592  if (state_ == INITIALIZED) {
1593  TRACE_ISOLATE(deinit);
1594 
1595  debug()->Unload();
1596 
1598 
1603  }
1604 
1605  for (int i = 0; i < num_sweeper_threads_; i++) {
1606  sweeper_thread_[i]->Stop();
1607  delete sweeper_thread_[i];
1608  sweeper_thread_[i] = NULL;
1609  }
1610  delete[] sweeper_thread_;
1612 
1613  if (FLAG_job_based_sweeping &&
1616  }
1617 
1618  if (FLAG_turbo_stats) GetTStatistics()->Print("TurboFan");
1619  if (FLAG_hydrogen_stats) GetHStatistics()->Print("Hydrogen");
1620 
1621  if (FLAG_print_deopt_stress) {
1622  PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_);
1623  }
1624 
1625  // We must stop the logger before we tear down other components.
1626  Sampler* sampler = logger_->sampler();
1627  if (sampler && sampler->IsActive()) sampler->Stop();
1628 
1629  delete deoptimizer_data_;
1631  builtins_.TearDown();
1632  bootstrapper_->TearDown();
1633 
1634  if (runtime_profiler_ != NULL) {
1635  delete runtime_profiler_;
1637  }
1638 
1639  delete basic_block_profiler_;
1641 
1642  heap_.TearDown();
1643  logger_->TearDown();
1644 
1645  delete heap_profiler_;
1646  heap_profiler_ = NULL;
1647  delete cpu_profiler_;
1648  cpu_profiler_ = NULL;
1649 
1650  // The default isolate is re-initializable due to legacy API.
1652  }
1653 }
void TearDown()
Definition: heap.cc:5188
MarkCompactCollector * mark_compact_collector()
Definition: heap.h:1197
HStatistics * GetTStatistics()
Definition: isolate.cc:2142
void FreeThreadResources()
Definition: isolate.h:684
HStatistics * GetHStatistics()
Definition: isolate.cc:2136
bool concurrent_recompilation_enabled()
Definition: isolate.h:1045
Sampler * sampler()
Definition: log.cc:1897
FILE * TearDown()
Definition: log.cc:1902
void PrintF(const char *format,...)
Definition: utils.cc:80

References basic_block_profiler_, bootstrapper_, builtins_, concurrent_recompilation_enabled(), cpu_profiler_, debug(), deoptimizer_data_, v8::internal::MarkCompactCollector::EnsureSweepingCompleted(), FreeThreadResources(), GetHStatistics(), GetTStatistics(), heap_, heap_profiler_, INITIALIZED, v8::internal::Sampler::IsActive(), logger_, v8::internal::Heap::mark_compact_collector(), NULL, num_sweeper_threads_, optimizing_compiler_thread_, v8::internal::PrintF(), runtime_profiler_, v8::internal::Logger::sampler(), state_, v8::internal::SweeperThread::Stop(), v8::internal::OptimizingCompilerThread::Stop(), v8::internal::Sampler::Stop(), stress_deopt_count_, sweeper_thread_, v8::internal::MarkCompactCollector::sweeping_in_progress(), v8::internal::Builtins::TearDown(), v8::internal::Heap::TearDown(), v8::internal::Logger::TearDown(), TRACE_ISOLATE, UNINITIALIZED, and v8::internal::Debug::Unload().

Referenced by TearDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deoptimizer_data()

DeoptimizerData* v8::internal::Isolate::deoptimizer_data ( )
inline

◆ descriptor_lookup_cache()

DescriptorLookupCache* v8::internal::Isolate::descriptor_lookup_cache ( )
inline

Definition at line 895 of file isolate.h.

895  {
897  }

References descriptor_lookup_cache_.

Referenced by v8::internal::Heap::CreateInitialObjects(), v8::internal::Heap::MarkCompactPrologue(), and v8::internal::Heap::Scavenge().

+ Here is the caller graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::Isolate::DISALLOW_COPY_AND_ASSIGN ( Isolate  )
private

◆ DoThrow()

void v8::internal::Isolate::DoThrow ( Object exception,
MessageLocation location 
)

Definition at line 1003 of file isolate.cc.

1003  {
1005 
1006  HandleScope scope(this);
1007  Handle<Object> exception_handle(exception, this);
1008 
1009  // Determine reporting and whether the exception is caught externally.
1010  bool catchable_by_javascript = is_catchable_by_javascript(exception);
1011  bool can_be_caught_externally = false;
1012  bool should_report_exception =
1013  ShouldReportException(&can_be_caught_externally, catchable_by_javascript);
1014  bool report_exception = catchable_by_javascript && should_report_exception;
1015  bool try_catch_needs_message =
1016  can_be_caught_externally && try_catch_handler()->capture_message_;
1017  bool bootstrapping = bootstrapper()->IsActive();
1018  bool rethrowing_message = thread_local_top()->rethrowing_message_;
1019 
1020  thread_local_top()->rethrowing_message_ = false;
1021 
1022  // Notify debugger of exception.
1023  if (catchable_by_javascript) {
1024  debug()->OnThrow(exception_handle, report_exception);
1025  }
1026 
1027  // Generate the message if required.
1028  if (!rethrowing_message && (report_exception || try_catch_needs_message)) {
1029  MessageLocation potential_computed_location;
1030  if (location == NULL) {
1031  // If no location was specified we use a computed one instead.
1032  ComputeLocation(&potential_computed_location);
1033  location = &potential_computed_location;
1034  }
1035  // It's not safe to try to make message objects or collect stack traces
1036  // while the bootstrapper is active since the infrastructure may not have
1037  // been properly initialized.
1038  if (!bootstrapping) {
1039  Handle<JSArray> stack_trace_object;
1041  if (IsErrorObject(exception_handle)) {
1042  // We fetch the stack trace that corresponds to this error object.
1043  Handle<Name> key = factory()->detailed_stack_trace_symbol();
1044  // Look up as own property. If the lookup fails, the exception is
1045  // probably not a valid Error object. In that case, we fall through
1046  // and capture the stack trace at this throw site.
1047  LookupIterator lookup(exception_handle, key,
1048  LookupIterator::OWN_SKIP_INTERCEPTOR);
1049  Handle<Object> stack_trace_property;
1050  if (Object::GetProperty(&lookup).ToHandle(&stack_trace_property) &&
1051  stack_trace_property->IsJSArray()) {
1052  stack_trace_object = Handle<JSArray>::cast(stack_trace_property);
1053  }
1054  }
1055  if (stack_trace_object.is_null()) {
1056  // Not an error object, we capture at throw site.
1057  stack_trace_object = CaptureCurrentStackTrace(
1060  }
1061  }
1062 
1063  Handle<Object> exception_arg = exception_handle;
1064  // If the exception argument is a custom object, turn it into a string
1065  // before throwing as uncaught exception. Note that the pending
1066  // exception object to be set later must not be turned into a string.
1067  if (exception_arg->IsJSObject() && !IsErrorObject(exception_arg)) {
1068  MaybeHandle<Object> maybe_exception =
1069  Execution::ToDetailString(this, exception_arg);
1070  if (!maybe_exception.ToHandle(&exception_arg)) {
1071  exception_arg = factory()->InternalizeOneByteString(
1072  STATIC_CHAR_VECTOR("exception"));
1073  }
1074  }
1075  Handle<Object> message_obj = MessageHandler::MakeMessageObject(
1076  this,
1077  "uncaught_exception",
1078  location,
1079  HandleVector<Object>(&exception_arg, 1),
1080  stack_trace_object);
1081  thread_local_top()->pending_message_obj_ = *message_obj;
1082  if (location != NULL) {
1083  thread_local_top()->pending_message_script_ = *location->script();
1084  thread_local_top()->pending_message_start_pos_ = location->start_pos();
1085  thread_local_top()->pending_message_end_pos_ = location->end_pos();
1086  }
1087 
1088  // If the abort-on-uncaught-exception flag is specified, abort on any
1089  // exception not caught by JavaScript, even when an external handler is
1090  // present. This flag is intended for use by JavaScript developers, so
1091  // print a user-friendly stack trace (not an internal one).
1092  if (fatal_exception_depth == 0 &&
1093  FLAG_abort_on_uncaught_exception &&
1094  (report_exception || can_be_caught_externally)) {
1096  PrintF(stderr,
1097  "%s\n\nFROM\n",
1098  MessageHandler::GetLocalizedMessage(this, message_obj).get());
1099  PrintCurrentStackTrace(stderr);
1100  base::OS::Abort();
1101  }
1102  } else if (location != NULL && !location->script().is_null()) {
1103  // We are bootstrapping and caught an error where the location is set
1104  // and we have a script for the location.
1105  // In this case we could have an extension (or an internal error
1106  // somewhere) and we print out the line number at which the error occured
1107  // to the console for easier debugging.
1108  int line_number =
1109  location->script()->GetLineNumber(location->start_pos()) + 1;
1110  if (exception->IsString() && location->script()->name()->IsString()) {
1112  "Extension or internal compilation error: %s in %s at line %d.\n",
1113  String::cast(exception)->ToCString().get(),
1114  String::cast(location->script()->name())->ToCString().get(),
1115  line_number);
1116  } else if (location->script()->name()->IsString()) {
1118  "Extension or internal compilation error in %s at line %d.\n",
1119  String::cast(location->script()->name())->ToCString().get(),
1120  line_number);
1121  } else {
1122  base::OS::PrintError("Extension or internal compilation error.\n");
1123  }
1124 #ifdef OBJECT_PRINT
1125  // Since comments and empty lines have been stripped from the source of
1126  // builtins, print the actual source here so that line numbers match.
1127  if (location->script()->source()->IsString()) {
1128  Handle<String> src(String::cast(location->script()->source()));
1129  PrintF("Failing script:\n");
1130  int len = src->length();
1131  int line_number = 1;
1132  PrintF("%5d: ", line_number);
1133  for (int i = 0; i < len; i++) {
1134  uint16_t character = src->Get(i);
1135  PrintF("%c", character);
1136  if (character == '\n' && i < len - 2) {
1137  PrintF("%5d: ", ++line_number);
1138  }
1139  }
1140  }
1141 #endif
1142  }
1143  }
1144 
1145  // Save the message for reporting if the the exception remains uncaught.
1146  thread_local_top()->has_pending_message_ = report_exception;
1147 
1148  // Do not forget to clean catcher_ if currently thrown exception cannot
1149  // be caught. If necessary, ReThrow will update the catcher.
1150  thread_local_top()->catcher_ = can_be_caught_externally ?
1151  try_catch_handler() : NULL;
1152 
1153  set_pending_exception(*exception_handle);
1154 }
bool capture_message_
Definition: v8.h:5410
static void Abort()
static void PrintError(const char *format,...)
void OnThrow(Handle< Object > exception, bool uncaught)
Definition: debug.cc:2504
bool ShouldReportException(bool *can_be_caught_externally, bool catchable_by_javascript)
Definition: isolate.cc:950
void PrintCurrentStackTrace(FILE *out)
Definition: isolate.cc:904
bool is_catchable_by_javascript(Object *exception)
Definition: isolate.h:639
void set_pending_exception(Object *exception_obj)
Definition: isolate.h:567
void ComputeLocation(MessageLocation *target)
Definition: isolate.cc:932
bool IsErrorObject(Handle< Object > obj)
Definition: isolate.cc:981
Bootstrapper * bootstrapper()
Definition: isolate.h:856
static SmartArrayPointer< char > GetLocalizedMessage(Isolate *isolate, Handle< Object > data)
Definition: messages.cc:157
static Handle< JSMessageObject > MakeMessageObject(Isolate *isolate, const char *type, MessageLocation *loc, Vector< Handle< Object > > args, Handle< JSArray > stack_frames)
Definition: messages.cc:36
unsigned short uint16_t
Definition: unicode.cc:23
static int fatal_exception_depth
Definition: isolate.cc:1001

References v8::base::OS::Abort(), bootstrapper(), v8::TryCatch::capture_message_, capture_stack_trace_for_uncaught_exceptions_, CaptureCurrentStackTrace(), v8::internal::Handle< T >::cast(), ComputeLocation(), DCHECK, debug(), v8::internal::MessageLocation::end_pos(), factory(), v8::internal::fatal_exception_depth, v8::internal::MessageHandler::GetLocalizedMessage(), v8::internal::Object::GetProperty(), has_pending_exception(), is_catchable_by_javascript(), v8::internal::Handle< T >::is_null(), IsErrorObject(), v8::internal::MessageHandler::MakeMessageObject(), NULL, v8::internal::Debug::OnThrow(), PrintCurrentStackTrace(), v8::base::OS::PrintError(), v8::internal::PrintF(), v8::internal::MessageLocation::script(), set_pending_exception(), ShouldReportException(), stack_trace_for_uncaught_exceptions_frame_limit_, stack_trace_for_uncaught_exceptions_options_, v8::internal::MessageLocation::start_pos(), STATIC_CHAR_VECTOR, thread_local_top(), and try_catch_handler().

Referenced by StackOverflow(), TerminateExecution(), and Throw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enable_serializer()

void v8::internal::Isolate::enable_serializer ( )
inline

Definition at line 1001 of file isolate.h.

1001  {
1002  // The serializer can only be enabled before the isolate init.
1004  serializer_enabled_ = true;
1005  }

References DCHECK, INITIALIZED, serializer_enabled_, and state_.

Referenced by v8::Isolate::New().

+ Here is the caller graph for this function:

◆ EnqueueMicrotask()

void v8::internal::Isolate::EnqueueMicrotask ( Handle< Object microtask)

Definition at line 2281 of file isolate.cc.

2281  {
2282  DCHECK(microtask->IsJSFunction() || microtask->IsCallHandlerInfo());
2283  Handle<FixedArray> queue(heap()->microtask_queue(), this);
2284  int num_tasks = pending_microtask_count();
2285  DCHECK(num_tasks <= queue->length());
2286  if (num_tasks == 0) {
2287  queue = factory()->NewFixedArray(8);
2288  heap()->set_microtask_queue(*queue);
2289  } else if (num_tasks == queue->length()) {
2290  queue = FixedArray::CopySize(queue, num_tasks * 2);
2291  heap()->set_microtask_queue(*queue);
2292  }
2293  DCHECK(queue->get(num_tasks)->IsUndefined());
2294  queue->set(num_tasks, *microtask);
2295  set_pending_microtask_count(num_tasks + 1);
2296 }
static Handle< FixedArray > CopySize(Handle< FixedArray > array, int new_length, PretenureFlag pretenure=NOT_TENURED)
Definition: objects.cc:7749

References v8::internal::FixedArray::CopySize(), DCHECK, factory(), and heap().

Referenced by v8::Isolate::EnqueueMicrotask().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Enter()

void v8::internal::Isolate::Enter ( )
private

Definition at line 2047 of file isolate.cc.

2047  {
2048  Isolate* current_isolate = NULL;
2049  PerIsolateThreadData* current_data = CurrentPerIsolateThreadData();
2050  if (current_data != NULL) {
2051  current_isolate = current_data->isolate_;
2052  DCHECK(current_isolate != NULL);
2053  if (current_isolate == this) {
2054  DCHECK(Current() == this);
2055  DCHECK(entry_stack_ != NULL);
2058  ThreadId::Current()));
2059  // Same thread re-enters the isolate, no need to re-init anything.
2061  return;
2062  }
2063  }
2064 
2065  PerIsolateThreadData* data = FindOrAllocatePerThreadDataForThisThread();
2066  DCHECK(data != NULL);
2067  DCHECK(data->isolate_ == this);
2068 
2069  EntryStackItem* item = new EntryStackItem(current_data,
2070  current_isolate,
2071  entry_stack_);
2072  entry_stack_ = item;
2073 
2074  SetIsolateThreadLocals(this, data);
2075 
2076  // In case it's the first time some thread enters the isolate.
2077  set_thread_id(data->thread_id());
2078 }
PerIsolateThreadData * previous_thread_data
Definition: isolate.h:1167
static PerIsolateThreadData * CurrentPerIsolateThreadData()
Definition: isolate.h:474
PerIsolateThreadData * FindOrAllocatePerThreadDataForThisThread()
Definition: isolate.cc:119
static void SetIsolateThreadLocals(Isolate *isolate, PerIsolateThreadData *data)
Definition: isolate.cc:1676
static ThreadId Current()
Definition: isolate.h:185

References v8::internal::ThreadId::Current(), CurrentPerIsolateThreadData(), DCHECK, v8::internal::Isolate::EntryStackItem::entry_count, entry_stack_, FindOrAllocatePerThreadDataForThisThread(), v8::internal::Isolate::PerIsolateThreadData::isolate_, NULL, v8::internal::Isolate::EntryStackItem::previous_thread_data, SetIsolateThreadLocals(), and v8::internal::Isolate::PerIsolateThreadData::thread_id().

Referenced by v8::Isolate::Enter(), and v8::Locker::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eternal_handles()

EternalHandles* v8::internal::Isolate::eternal_handles ( )
inline

Definition at line 919 of file isolate.h.

919 { return eternal_handles_; }

References eternal_handles_.

Referenced by v8::Date::DateTimeConfigurationChangeNotification(), v8::V8::Eternalize(), v8::internal::anonymous_namespace{i18n.cc}::GetEternal(), v8::V8::GetEternal(), v8::internal::Heap::IterateStrongRoots(), v8::internal::Heap::PerformGarbageCollection(), and v8::internal::StartupSerializer::SerializeStrongReferences().

+ Here is the caller graph for this function:

◆ Exit()

void v8::internal::Isolate::Exit ( )
private

Definition at line 2081 of file isolate.cc.

2081  {
2082  DCHECK(entry_stack_ != NULL);
2085  ThreadId::Current()));
2086 
2087  if (--entry_stack_->entry_count > 0) return;
2088 
2090  DCHECK(CurrentPerIsolateThreadData()->isolate_ == this);
2091 
2092  // Pop the stack.
2093  EntryStackItem* item = entry_stack_;
2094  entry_stack_ = item->previous_item;
2095 
2096  PerIsolateThreadData* previous_thread_data = item->previous_thread_data;
2097  Isolate* previous_isolate = item->previous_isolate;
2098 
2099  delete item;
2100 
2101  // Reinit the current thread for the isolate it was running before this one.
2102  SetIsolateThreadLocals(previous_isolate, previous_thread_data);
2103 }

References v8::internal::ThreadId::Current(), CurrentPerIsolateThreadData(), DCHECK, v8::internal::Isolate::EntryStackItem::entry_count, entry_stack_, NULL, v8::internal::Isolate::EntryStackItem::previous_isolate, v8::internal::Isolate::EntryStackItem::previous_item, v8::internal::Isolate::EntryStackItem::previous_thread_data, SetIsolateThreadLocals(), and v8::internal::Isolate::PerIsolateThreadData::thread_id().

Referenced by v8::Isolate::Exit(), and v8::Locker::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ external_caught_exception_address()

bool* v8::internal::Isolate::external_caught_exception_address ( )
inline

Definition at line 599 of file isolate.h.

599  {
600  return &thread_local_top_.external_caught_exception_;
601  }

References thread_local_top_.

◆ factory()

Factory* v8::internal::Isolate::factory ( )
inline

Definition at line 982 of file isolate.h.

982 { return reinterpret_cast<Factory*>(this); }

Referenced by v8::internal::BASE_EMBEDDED< Visitor >::Add(), v8::internal::ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::AddElementsToFixedArray(), v8::V8::AddMessageListener(), v8::internal::SharedFunctionInfo::AddToOptimizedCodeMap(), v8::internal::CompareICStub::AddToSpecialCache(), v8::internal::OrderedHashTable< Derived, Iterator, entrysize >::Allocate(), v8::internal::ModuleInfo::Allocate(), v8::internal::DescriptorArray::Allocate(), v8::internal::TransitionArray::Allocate(), v8::internal::Scope::AllocateNonParameterLocal(), v8::internal::TransitionArray::AllocateSimple(), v8::internal::AppendUniqueCallbacks(), v8::internal::ArgumentsForInlinedFunction(), v8::internal::ArrayConstructorCommon(), v8::internal::OneByteStringKey::AsHandle(), v8::internal::SeqOneByteSubStringKey::AsHandle(), v8::internal::TwoByteStringKey::AsHandle(), v8::internal::CodeCacheHashTableKey::AsHandle(), v8::internal::PolymorphicCodeCacheHashTableKey::AsHandle(), v8::internal::NumberDictionaryShape::AsHandle(), v8::internal::RegExpImpl::AtomExec(), v8::internal::BeginPerformSplice(), v8::internal::HOptimizedGraphBuilder::BuildArrayIndexOf(), v8::internal::Compiler::BuildFunctionInfo(), v8::internal::String::CalculateLineEnds(), v8::internal::Debug::Call(), v8::Debug::Call(), v8::internal::JSProxy::CallTrap(), CaptureAndSetDetailedStackTrace(), CaptureAndSetSimpleStackTrace(), CaptureCurrentStackTrace(), CaptureSimpleStackTrace(), v8::internal::LiveEdit::ChangeScriptSource(), v8::internal::LiveEdit::CheckAndDropActivations(), v8::internal::Debug::CheckBreakPoint(), v8::internal::Debug::CheckBreakPoints(), v8::internal::BreakPointInfo::ClearBreakPoint(), v8::internal::Debug::ClearMirrorCache(), v8::Object::Clone(), v8::internal::Accessors::CloneAccessor(), v8::internal::JSFunction::CloneClosure(), v8::Array::CloneElementAt(), v8::internal::CollectElementIndices(), v8::internal::LiteralFixer::CollectJSFunctions(), v8::internal::RegExpImpl::Compile(), v8::internal::CompiledReplacement::Compile(), v8::ScriptCompiler::Compile(), v8::internal::Debug::CompileDebuggerScript(), v8::internal::CompileGlobalEval(), v8::internal::RegExpImpl::CompileIrregexp(), v8::internal::Compiler::CompileScript(), v8::internal::CompileToplevel(), v8::internal::PropertyICCompiler::ComputeCompareNil(), v8::internal::PropertyICCompiler::ComputeKeyedLoadMonomorphic(), v8::internal::PropertyICCompiler::ComputeKeyedLoadPolymorphic(), v8::internal::PropertyICCompiler::ComputeKeyedStoreMonomorphic(), v8::internal::PropertyICCompiler::ComputeKeyedStorePolymorphic(), v8::internal::PropertyICCompiler::ComputeLoad(), v8::internal::NamedLoadHandlerCompiler::ComputeLoadNonexistent(), v8::internal::PropertyICCompiler::ComputeMonomorphic(), v8::internal::ComputeObjectLiteralMap(), v8::internal::PropertyICCompiler::ComputeStore(), v8::String::Concat(), v8::internal::ConvertCase(), v8::internal::TypeFeedbackVector::Copy(), v8::internal::CopyFastElementsToDictionary(), v8::internal::Map::CopyForFreeze(), v8::internal::Map::CopyForObserved(), v8::internal::FixedArray::CopySize(), v8::internal::JSArrayBasedStruct< S >::Create(), v8::internal::DeclaredAccessorDescriptor::Create(), v8::internal::ScopeInfo::Create(), v8::internal::Heap::CreateApiObjects(), v8::internal::Runtime::CreateArrayLiteralBoilerplate(), v8::internal::Heap::CreateInitialObjects(), v8::internal::CreateObjectLiteralBoilerplate(), v8::internal::CreateRegExpErrorObjectAndThrow(), v8::internal::CreateScriptCopy(), v8::internal::DebugEvaluate(), v8::internal::JSObject::DefineAccessor(), v8::internal::JSObject::DefineElementAccessor(), v8::internal::SloppyArgumentsElementsAccessor::Delete(), v8::internal::FastElementsAccessor< FastElementsAccessorSubclass, KindTraits >::DeleteCommon(), v8::internal::DictionaryElementsAccessor::DeleteCommon(), v8::internal::JSObject::DeleteElement(), v8::internal::JSProxy::DeleteElementWithHandler(), v8::internal::JSObject::DeleteElementWithInterceptor(), v8::internal::JSObject::DeleteHiddenProperty(), v8::Object::DeleteHiddenValue(), v8::internal::JSObject::DeleteNormalizedProperty(), v8::internal::Runtime::DeleteObjectProperty(), v8::internal::CallIC::DoCustomHandler(), DoThrow(), v8::internal::BoyerMooreLookahead::EmitSkipInstructions(), v8::internal::EmitUseLookupTable(), v8::internal::EndPerformSplice(), EnqueueMicrotask(), v8::Isolate::EnqueueMicrotask(), v8::internal::EnqueueSpliceRecord(), v8::internal::Debug::EnsureDebugInfo(), v8::internal::JSFunction::EnsureHasInitialMap(), v8::internal::JSGlobalObject::EnsurePropertyCell(), v8::internal::MaterializedObjectStore::EnsureStackEntries(), v8::internal::JSObject::EnsureWritableFastElements(), v8::internal::RegExpResultsCache::Enter(), v8::internal::AllocationSiteCreationContext::EnterNewScope(), v8::internal::Context::ErrorMessageForCodeGenerationFromStrings(), v8::internal::URIEscape::Escape(), v8::internal::MarkCompactCollector::EvacuateNewSpaceAndCandidates(), v8::internal::ExternalArrayIntSetter(), v8::internal::anonymous_namespace{i18n.cc}::ExtractBooleanSetting(), v8::internal::anonymous_namespace{i18n.cc}::ExtractIntegerSetting(), v8::internal::V8HeapExplorer::ExtractSharedFunctionInfoReferences(), v8::internal::anonymous_namespace{i18n.cc}::ExtractStringSetting(), v8::internal::compiler::JSGraph::factory(), v8::internal::TestWithIsolate::factory(), v8::internal::FillCache(), v8::internal::JSProxy::Fix(), v8::Symbol::For(), v8::Symbol::ForApi(), v8::Private::ForApi(), v8::internal::JSObject::Freeze(), v8::FromCData(), v8::internal::FunctionInfoListener::FunctionInfoListener(), v8::FunctionTemplateNew(), v8::internal::LiveEdit::GatherCompileInfo(), v8::internal::TypeFeedbackVector::GenericSentinel(), v8::internal::JSObject::GetAccessor(), v8::internal::MaterializedLiteral::GetBoilerplateValue(), v8::internal::GetDeclaredAccessorProperty(), v8::Function::GetDisplayName(), v8::internal::JSProxy::GetElementAttributeWithHandler(), v8::internal::JSObject::GetElementWithCallback(), v8::internal::JSObject::GetElementWithInterceptor(), v8::internal::Object::GetElementWithReceiver(), v8::internal::GetEnumPropertyKeys(), v8::internal::FunctionInfoWrapper::GetFeedbackVector(), v8::internal::GetFunctionArguments(), v8::internal::Compiler::GetFunctionFromEval(), v8::CpuProfileNode::GetFunctionName(), v8::internal::GetFunctionPrototype(), v8::internal::JSObject::GetHiddenPropertiesHashTable(), v8::Object::GetHiddenValue(), v8::internal::JSObject::GetIdentityHash(), v8::internal::DictionaryElementsAccessor::GetImpl(), v8::internal::JSReceiver::GetKeys(), v8::internal::MessageHandler::GetMessage(), v8::Debug::GetMirror(), v8::HeapGraphEdge::GetName(), v8::HeapGraphNode::GetName(), v8::internal::Script::GetNameOrSourceURL(), v8::internal::GetOldValue(), v8::internal::JSObject::GetOrCreateHiddenPropertiesHashtable(), v8::internal::JSObject::GetOrCreateIdentityHash(), v8::internal::GetOwnProperty(), v8::Object::GetOwnPropertyDescriptor(), v8::Object::GetOwnPropertyNames(), v8::internal::SloppyArgumentsElementsAccessor::GetParameterMapArg(), v8::internal::GetPrimitiveValue(), GetPromiseOnStackOnThrow(), v8::internal::Object::GetProperty(), v8::Object::GetPropertyNames(), v8::internal::Object::GetPropertyWithAccessor(), v8::internal::JSProxy::GetPropertyWithHandler(), v8::internal::JSObject::GetPropertyWithInterceptor(), v8::CpuProfileNode::GetScriptResourceName(), v8::internal::ScriptCache::GetScripts(), v8::internal::Debug::GetSourceBreakLocations(), v8::internal::SharedFunctionInfo::GetSourceCode(), GetSymbolRegistry(), v8::CpuProfile::GetTitle(), v8::HeapSnapshot::GetTitle(), v8::internal::CompileTimeValue::GetValue(), v8::GetWellKnownSymbol(), v8::internal::StoreGlobalStub::global_placeholder(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::handle(), v8::internal::HandleApiCallHelper(), v8::internal::HOptimizedGraphBuilder::HandleKeyedElementAccess(), v8::internal::CallIC::HandleMiss(), v8::internal::HOptimizedGraphBuilder::HandlePolymorphicCallNamed(), v8::internal::HOptimizedGraphBuilder::HandlePolymorphicNamedFieldAccess(), v8::internal::Scope::HasArgumentsParameter(), v8::internal::JSProxy::HasElementWithHandler(), v8::internal::Runtime::HasObjectProperty(), v8::internal::Oddball::Initialize(), v8::internal::Runtime::InitializeIntrinsicFunctionNames(), v8::internal::Script::InitLineEnds(), v8::internal::InstallBuiltin(), v8::internal::InstallFunction(), v8::internal::InstantiateAccessorComponent(), v8::internal::AstValue::Internalize(), v8::internal::LiteralBuffer::Internalize(), v8::internal::AstRawString::Internalize(), v8::internal::AstConsString::Internalize(), v8::internal::Invoke(), v8::internal::RegExpImpl::IrregexpExec(), v8::internal::Variable::is_possibly_eval(), IsErrorObject(), v8::internal::Accessors::IsJSObjectFieldAccessor(), v8::Value::IsPromise(), v8::internal::JSArray::IsReadOnlyLengthDescriptor(), v8::internal::IterateElements(), v8::internal::IterateExternalArrayElements(), v8::internal::Debug::Load(), v8::internal::LoadLookupSlotHelper(), v8::internal::CompilationCacheEval::Lookup(), v8::internal::CompilationCacheRegExp::Lookup(), v8::internal::CompilationCacheTable::Lookup(), v8::internal::PolymorphicCodeCache::Lookup(), v8::internal::CompilationCacheTable::LookupEval(), v8::internal::StringTable::LookupKey(), v8::internal::CompilationCacheTable::LookupRegExp(), v8::internal::StringTable::LookupStringIfExists(), v8::internal::StringTable::LookupTwoCharsStringIfExists(), v8::internal::Accessors::MakeAccessor(), v8::MakeAccessorInfo(), v8::internal::Debug::MakeBreakEvent(), v8::internal::CodeGenerator::MakeCodeEpilogue(), v8::internal::Debug::MakeCompileEvent(), v8::internal::Debug::MakeExceptionEvent(), v8::internal::Debug::MakeExecutionState(), v8::internal::MessageHandler::MakeMessageObject(), v8::internal::Accessors::MakeModuleExport(), v8::internal::MakeOrFindTwoCharacterString(), v8::internal::MaterializeArgumentsObject(), v8::internal::JSTypedArray::MaterializeArrayBuffer(), v8::internal::MaterializeBlockScope(), v8::internal::MaterializeCatchScope(), v8::internal::MaterializeClosure(), v8::internal::Deoptimizer::MaterializeHeapNumbersForDebuggerInspectableFrame(), v8::internal::Deoptimizer::MaterializeHeapObjects(), v8::internal::MaterializeLocalScope(), v8::internal::MaterializeModuleScope(), v8::internal::Deoptimizer::MaterializeNextHeapObject(), v8::internal::MaterializeScopeDetails(), MayNamedAccess(), v8::internal::TypeFeedbackVector::MegamorphicSentinel(), v8::internal::JSObject::MigrateFastToSlow(), v8::internal::JSObject::MigrateSlowToFast(), v8::internal::ModuleGetExport(), v8::internal::ModuleSetExport(), v8::NeanderObject::NeanderObject(), v8::DataView::New(), v8::TypeSwitch::New(), v8::ObjectTemplate::New(), v8::Object::New(), v8::Promise::Resolver::New(), v8::internal::NormalizedMapCache::New(), v8::Number::New(), v8::NumberObject::New(), v8::Signature::New(), v8::internal::HashTable< Derived, Shape, Key >::New(), v8::internal::DeoptimizationInputData::New(), v8::Array::New(), v8::internal::DeoptimizationOutputData::New(), v8::Integer::New(), v8::Symbol::New(), v8::Private::New(), v8::ArrayBuffer::New(), v8::External::New(), v8::NewExternalOneByteStringHandle(), v8::NewExternalStringHandle(), v8::Integer::NewFromUnsigned(), v8::internal::NewJSObjectWithNullProto(), v8::internal::NewSloppyArguments(), v8::internal::Object::NewStorageFor(), v8::internal::NewStrictArguments(), v8::anonymous_namespace{api.cc}::NewString(), v8::NewTypedArray(), v8::internal::Debug::NotifyMessageHandler(), v8::internal::Dictionary< UnseededNumberDictionary, UnseededNumberDictionaryShape, uint32_t >::NumberOfEnumElements(), v8::internal::CompilationInfo::object_wrapper(), v8::Object::ObjectProtoToString(), v8::internal::Debug::OnAfterCompile(), v8::internal::LiteralFixer::PatchLiterals(), v8::internal::CallIC::PatchMegamorphic(), v8::internal::PatchPositionsInCode(), v8::internal::PerformCompare(), v8::internal::TypeFeedbackVector::PremonomorphicSentinel(), v8::internal::JSObject::PrepareElementsForSort(), v8::anonymous_namespace{api.cc}::PrepareExternalArrayElements(), v8::internal::CompilationInfo::PrepareForCompilation(), v8::internal::JSObject::PrepareSlowElementsForSort(), v8::internal::JSObject::PreventExtensions(), PrintCurrentStackTrace(), v8::internal::Debug::ProcessDebugMessages(), v8::internal::Debug::PromiseHasRejectHandler(), v8::internal::Map::RawCopy(), v8::internal::JSArray::ReadOnlyLengthError(), v8::RegExpFlagsToString(), v8::Promise::Resolver::Reject(), v8::V8::RemoveMessageListeners(), v8::internal::LiveEdit::ReplaceFunctionCode(), ReportFailedAccessCheck(), v8::internal::MessageHandler::ReportMessage(), v8::Promise::Resolver::Resolve(), v8::internal::ResolveBuiltinIdHolder(), v8::internal::Scope::ResolveVariable(), RunMicrotasks(), v8::internal::Runtime_NewObjectHelper(), v8::internal::SearchRegExpMultiple(), v8::internal::FunctionInfoListener::SerializeFunctionScope(), v8::ObjectTemplate::SetAccessCheckCallbacks(), v8::internal::JSObject::SetAccessor(), v8::Object::SetAccessorProperty(), v8::internal::BreakPointInfo::SetBreakPoint(), v8::internal::DebugInfo::SetBreakPoint(), v8::ObjectTemplate::SetCallAsFunctionHandler(), v8::FunctionTemplate::SetCallHandler(), v8::Debug::SetDebugEventListener(), v8::internal::JSObject::SetDictionaryElement(), v8::internal::JSObject::SetElement(), v8::internal::JSArray::SetElementsLength(), v8::internal::JSObject::SetElementWithCallback(), v8::internal::JSObject::SetElementWithCallbackSetterInPrototypes(), v8::internal::JSProxy::SetElementWithHandler(), v8::internal::JSObject::SetElementWithoutInterceptor(), v8::internal::Debug::SetEventListener(), v8::internal::SetFunctionPrototype(), v8::internal::JSObject::SetHiddenPropertiesHashTable(), v8::internal::JSObject::SetHiddenProperty(), v8::Object::SetHiddenValue(), v8::internal::JSObject::SetIdentityHash(), v8::ObjectTemplate::SetIndexedPropertyHandler(), v8::internal::ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::SetLengthImpl(), v8::internal::DictionaryElementsAccessor::SetLengthWithoutNormalize(), v8::ObjectTemplate::SetNamedPropertyHandler(), v8::internal::JSProxy::SetPropertyViaPrototypesWithHandler(), v8::internal::anonymous_namespace{i18n.cc}::SetResolvedBreakIteratorSettings(), v8::internal::anonymous_namespace{i18n.cc}::SetResolvedCollatorSettings(), v8::internal::anonymous_namespace{i18n.cc}::SetResolvedDateSettings(), v8::internal::anonymous_namespace{i18n.cc}::SetResolvedNumberSettings(), v8::internal::Builtins::SetUp(), v8::internal::Runtime::SetupArrayBuffer(), v8::SetupArrayBufferView(), v8::internal::String::SlowFlatten(), StackOverflow(), StackTraceString(), v8::internal::StringReplaceGlobalAtomRegExpWithString(), v8::internal::StringReplaceGlobalRegExpWithEmptyString(), v8::internal::StringReplaceOneCharWithString(), v8::internal::HeapTypeConfig::struct_create(), v8::internal::JSObjectWalkVisitor< ContextObject >::StructureWalk(), v8::SymbolFor(), v8::TemplateSet(), v8::internal::Parser::ThrowPendingError(), v8::internal::ThrowRegExpException(), v8::internal::ArrayConcatVisitor::ToArray(), v8::Value::ToArrayIndex(), v8::Value::ToBoolean(), v8::internal::compiler::X64OperandConverter::ToImmediate64(), v8::internal::Object::ToObject(), v8::internal::ReplacementStringBuilder::ToString(), v8::internal::BinaryOpIC::Transition(), v8::internal::Map::TransitionToAccessorProperty(), v8::internal::SeqString::Truncate(), v8::internal::TryConvertKey(), v8::internal::HOptimizedGraphBuilder::TryInlineBuiltinMethodCall(), v8::internal::compiler::Typer::Typer(), v8::internal::IC::TypeToMap(), v8::internal::URIUnescape::UnescapeSlow(), v8::internal::TypeFeedbackVector::UninitializedSentinel(), v8::internal::BreakIterator::UnpackBreakIterator(), v8::internal::Collator::UnpackCollator(), v8::internal::DateFormat::UnpackDateFormat(), v8::internal::NumberFormat::UnpackNumberFormat(), v8::internal::Map::UpdateCodeCache(), v8::internal::compiler::AstGraphBuilder::VisitDeclarations(), v8::internal::HOptimizedGraphBuilder::VisitDeclarations(), v8::internal::Object::WrapForRead(), and v8::internal::WrapInJSValue().

◆ FillCache()

void v8::internal::Isolate::FillCache ( )
private

◆ FindCodeObject()

Object * v8::internal::Isolate::FindCodeObject ( Address  a)

Definition at line 2214 of file isolate.cc.

2214  {
2216 }
Code * GcSafeFindCodeForInnerPointer(Address inner_pointer)
Definition: frames.cc:1468
InnerPointerToCodeCache * inner_pointer_to_code_cache()
Definition: isolate.h:911

References v8::internal::InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer(), and inner_pointer_to_code_cache().

Referenced by v8::internal::DeoptimizedFrameInfo::DeoptimizedFrameInfo(), v8::internal::Deoptimizer::FindOptimizedCode(), and v8::internal::StubFrame::unchecked_code().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindOrAllocatePerThreadDataForThisThread()

Isolate::PerIsolateThreadData * v8::internal::Isolate::FindOrAllocatePerThreadDataForThisThread ( )
private

Definition at line 119 of file isolate.cc.

119  {
120  ThreadId thread_id = ThreadId::Current();
121  PerIsolateThreadData* per_thread = NULL;
122  {
123  base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
124  per_thread = thread_data_table_->Lookup(this, thread_id);
125  if (per_thread == NULL) {
126  per_thread = new PerIsolateThreadData(this, thread_id);
127  thread_data_table_->Insert(per_thread);
128  }
129  DCHECK(thread_data_table_->Lookup(this, thread_id) == per_thread);
130  }
131  return per_thread;
132 }
PerIsolateThreadData * Lookup(Isolate *isolate, ThreadId thread_id)
Definition: isolate.cc:1414
void Insert(PerIsolateThreadData *data)
Definition: isolate.cc:1423
friend class ThreadId
Definition: isolate.h:1344

References v8::internal::ThreadId::Current(), DCHECK, v8::internal::Isolate::ThreadDataTable::Insert(), v8::internal::Isolate::ThreadDataTable::Lookup(), NULL, v8::base::LazyInstanceImpl< T, AllocationTrait, CreateTrait, InitOnceTrait, DestroyTrait >::Pointer(), thread_data_table_, and thread_data_table_mutex_.

Referenced by v8::internal::ThreadManager::ArchiveThread(), and Enter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindPerThreadDataForThisThread()

Isolate::PerIsolateThreadData * v8::internal::Isolate::FindPerThreadDataForThisThread ( )

Definition at line 135 of file isolate.cc.

135  {
136  ThreadId thread_id = ThreadId::Current();
137  return FindPerThreadDataForThread(thread_id);
138 }
PerIsolateThreadData * FindPerThreadDataForThread(ThreadId thread_id)
Definition: isolate.cc:141

References v8::internal::ThreadId::Current(), and FindPerThreadDataForThread().

Referenced by v8::internal::ThreadManager::IsArchived(), and v8::internal::ThreadManager::RestoreThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindPerThreadDataForThread()

Isolate::PerIsolateThreadData * v8::internal::Isolate::FindPerThreadDataForThread ( ThreadId  thread_id)

Definition at line 141 of file isolate.cc.

142  {
143  PerIsolateThreadData* per_thread = NULL;
144  {
145  base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
146  per_thread = thread_data_table_->Lookup(this, thread_id);
147  }
148  return per_thread;
149 }

References v8::internal::Isolate::ThreadDataTable::Lookup(), NULL, v8::base::LazyInstanceImpl< T, AllocationTrait, CreateTrait, InitOnceTrait, DestroyTrait >::Pointer(), thread_data_table_, and thread_data_table_mutex_.

Referenced by FindPerThreadDataForThisThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FireCallCompletedCallback()

void v8::internal::Isolate::FireCallCompletedCallback ( )

Definition at line 2265 of file isolate.cc.

2265  {
2266  bool has_call_completed_callbacks = !call_completed_callbacks_.is_empty();
2267  bool run_microtasks = autorun_microtasks() && pending_microtask_count();
2268  if (!has_call_completed_callbacks && !run_microtasks) return;
2269 
2270  if (!handle_scope_implementer()->CallDepthIsZero()) return;
2271  if (run_microtasks) RunMicrotasks();
2272  // Fire callbacks. Increase call depth to prevent recursive callbacks.
2274  reinterpret_cast<v8::Isolate*>(this));
2275  for (int i = 0; i < call_completed_callbacks_.length(); i++) {
2277  }
2278 }
Do not run microtasks while this scope is active, even if microtasks are automatically executed other...
Definition: v8.h:4458
HandleScopeImplementer * handle_scope_implementer()
Definition: isolate.h:901

References v8::internal::List< T, AllocationPolicy >::at(), call_completed_callbacks_, handle_scope_implementer(), and RunMicrotasks().

+ Here is the call graph for this function:

◆ formal_count_address()

void* v8::internal::Isolate::formal_count_address ( )
inline

Definition at line 666 of file isolate.h.

666 { return &thread_local_top_.formal_count_; }

References thread_local_top_.

◆ FreeThreadResources()

void v8::internal::Isolate::FreeThreadResources ( )
inline

Definition at line 684 of file isolate.h.

684 { thread_local_top_.Free(); }

References thread_local_top_.

Referenced by Deinit(), and v8::internal::ThreadManager::FreeThreadResources().

+ Here is the caller graph for this function:

◆ function_entry_hook()

FunctionEntryHook v8::internal::Isolate::function_entry_hook ( )
inline

Definition at line 1078 of file isolate.h.

1078 { return function_entry_hook_; }

References function_entry_hook_.

Referenced by v8::internal::ProfileEntryHookStub::EntryHookTrampoline(), Init(), and set_function_entry_hook().

+ Here is the caller graph for this function:

◆ get_address_from_id()

Address v8::internal::Isolate::get_address_from_id ( Isolate::AddressId  id)

Definition at line 162 of file isolate.cc.

162  {
163  return isolate_addresses_[id];
164 }
int id() const
Definition: isolate.h:1071

References id(), and isolate_addresses_.

Referenced by v8::internal::ExternalReferenceTable::PopulateTable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_initial_js_array_map()

Map * v8::internal::Isolate::get_initial_js_array_map ( ElementsKind  kind)

Definition at line 2160 of file isolate.cc.

2160  {
2161  Context* native_context = context()->native_context();
2162  Object* maybe_map_array = native_context->js_array_maps();
2163  if (!maybe_map_array->IsUndefined()) {
2164  Object* maybe_transitioned_map =
2165  FixedArray::cast(maybe_map_array)->get(kind);
2166  if (!maybe_transitioned_map->IsUndefined()) {
2167  return Map::cast(maybe_transitioned_map);
2168  }
2169  }
2170  return NULL;
2171 }
Context * native_context()
Definition: contexts.cc:44
Handle< Context > native_context()
Definition: isolate.cc:1339

References context(), v8::internal::Context::native_context(), native_context(), and NULL.

Referenced by IsFastArrayConstructorPrototypeChainIntact().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCallingNativeContext()

Handle< Context > v8::internal::Isolate::GetCallingNativeContext ( )

Definition at line 1349 of file isolate.cc.

1349  {
1350  JavaScriptFrameIterator it(this);
1351  if (debug_->in_debug_scope()) {
1352  while (!it.done()) {
1353  JavaScriptFrame* frame = it.frame();
1354  Context* context = Context::cast(frame->context());
1355  if (context->native_context() == *debug_->debug_context()) {
1356  it.Advance();
1357  } else {
1358  break;
1359  }
1360  }
1361  }
1362  if (it.done()) return Handle<Context>::null();
1363  JavaScriptFrame* frame = it.frame();
1364  Context* context = Context::cast(frame->context());
1365  return Handle<Context>(context->native_context());
1366 }
static Context * cast(Object *context)
Definition: contexts.h:255
bool in_debug_scope() const
Definition: debug.h:468
Handle< Context > debug_context()
Definition: debug.h:459
static Handle< T > null()
Definition: handles.h:123

References v8::internal::Context::cast(), context(), v8::internal::StandardFrame::context(), debug_, v8::internal::Debug::debug_context(), v8::internal::Debug::in_debug_scope(), v8::internal::Context::native_context(), and v8::internal::Handle< T >::null().

Referenced by v8::Isolate::GetCallingContext().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCodeTracer()

CodeTracer * v8::internal::Isolate::GetCodeTracer ( )

Definition at line 2154 of file isolate.cc.

2154  {
2155  if (code_tracer() == NULL) set_code_tracer(new CodeTracer(id()));
2156  return code_tracer();
2157 }

References NULL.

Referenced by v8::internal::RegExpCompiler::Assemble(), v8::internal::Deoptimizer::DeoptimizeAll(), v8::internal::Deoptimizer::DeoptimizeGlobalObject(), v8::internal::Deoptimizer::DeoptimizeMarkedCode(), v8::internal::Deoptimizer::DeoptimizeMarkedCodeForContext(), v8::internal::Deoptimizer::Deoptimizer(), v8::internal::CodeGenerator::PrintCode(), v8::internal::DependentCode::SetMarkedForDeoptimization(), and v8::internal::Builtins::SetUp().

+ Here is the caller graph for this function:

◆ GetData()

void* v8::internal::Isolate::GetData ( uint32_t  slot)
inline

Definition at line 994 of file isolate.h.

994  {
996  return embedder_data_[slot];
997  }
static const uint32_t kNumIsolateDataSlots
Definition: v8.h:5870

References DCHECK, embedder_data_, and v8::internal::Internals::kNumIsolateDataSlots.

◆ GetHStatistics()

HStatistics * v8::internal::Isolate::GetHStatistics ( )

Definition at line 2136 of file isolate.cc.

2136  {
2137  if (hstatistics() == NULL) set_hstatistics(new HStatistics());
2138  return hstatistics();
2139 }

References NULL.

Referenced by v8::internal::OptimizedCompileJob::CreateGraph(), Deinit(), and v8::internal::OptimizedCompileJob::RecordOptimizationStats().

+ Here is the caller graph for this function:

◆ GetHTracer()

HTracer * v8::internal::Isolate::GetHTracer ( )

Definition at line 2148 of file isolate.cc.

2148  {
2149  if (htracer() == NULL) set_htracer(new HTracer(id()));
2150  return htracer();
2151 }

References NULL.

Referenced by v8::internal::CodeStubGraphBuilderBase::BuildGraph(), and v8::internal::OptimizedCompileJob::CreateGraph().

+ Here is the caller graph for this function:

◆ GetMessageLocation()

MessageLocation v8::internal::Isolate::GetMessageLocation ( )

Definition at line 1226 of file isolate.cc.

1226  {
1228 
1229  if (thread_local_top_.pending_exception_ != heap()->termination_exception() &&
1230  thread_local_top_.has_pending_message_ &&
1231  !thread_local_top_.pending_message_obj_->IsTheHole() &&
1232  !thread_local_top_.pending_message_obj_->IsTheHole()) {
1233  Handle<Script> script(
1234  Script::cast(thread_local_top_.pending_message_script_));
1235  int start_pos = thread_local_top_.pending_message_start_pos_;
1236  int end_pos = thread_local_top_.pending_message_end_pos_;
1237  return MessageLocation(script, start_pos, end_pos);
1238  }
1239 
1240  return MessageLocation();
1241 }

References DCHECK, has_pending_exception(), heap(), and thread_local_top_.

Referenced by v8::internal::LiveEdit::GatherCompileInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetOrCreateBasicBlockProfiler()

BasicBlockProfiler * v8::internal::Isolate::GetOrCreateBasicBlockProfiler ( )

Definition at line 2365 of file isolate.cc.

2365  {
2366  if (basic_block_profiler_ == NULL) {
2367  basic_block_profiler_ = new BasicBlockProfiler();
2368  }
2369  return basic_block_profiler_;
2370 }

References basic_block_profiler_, and NULL.

Referenced by v8::internal::compiler::BasicBlockInstrumentor::Instrument().

+ Here is the caller graph for this function:

◆ GetPromiseOnStackOnThrow()

Handle< Object > v8::internal::Isolate::GetPromiseOnStackOnThrow ( )

Definition at line 1308 of file isolate.cc.

1308  {
1309  Handle<Object> undefined = factory()->undefined_value();
1310  ThreadLocalTop* tltop = thread_local_top();
1311  if (tltop->promise_on_stack_ == NULL) return undefined;
1312  StackHandler* promise_try = tltop->promise_on_stack_->handler();
1313  // Find the top-most try-catch handler.
1314  StackHandler* handler = StackHandler::FromAddress(Isolate::handler(tltop));
1315  do {
1316  if (handler == promise_try) {
1317  // Mark the pushed try-catch handler to prevent a later duplicate event
1318  // triggered with the following reject.
1319  return tltop->promise_on_stack_->promise();
1320  }
1321  handler = handler->next();
1322  // Throwing inside a Promise can be intercepted by an inner try-catch, so
1323  // we stop at the first try-catch handler.
1324  } while (handler != NULL && !handler->is_catch());
1325  return undefined;
1326 }

References factory(), handler(), NULL, and thread_local_top().

Referenced by v8::internal::Debug::OnThrow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSymbolRegistry()

Handle< JSObject > v8::internal::Isolate::GetSymbolRegistry ( )

Definition at line 2228 of file isolate.cc.

2228  {
2229  if (heap()->symbol_registry()->IsUndefined()) {
2230  Handle<Map> map = factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
2231  Handle<JSObject> registry = factory()->NewJSObjectFromMap(map);
2232  heap()->set_symbol_registry(*registry);
2233 
2234  static const char* nested[] = {
2235  "for", "for_api", "for_intern", "keyFor", "private_api", "private_intern"
2236  };
2237  for (unsigned i = 0; i < arraysize(nested); ++i) {
2238  Handle<String> name = factory()->InternalizeUtf8String(nested[i]);
2239  Handle<JSObject> obj = factory()->NewJSObjectFromMap(map);
2241  JSObject::SetProperty(registry, name, obj, STRICT).Assert();
2242  }
2243  }
2244  return Handle<JSObject>::cast(factory()->symbol_registry());
2245 }
static void NormalizeProperties(Handle< JSObject > object, PropertyNormalizationMode mode, int expected_additional_properties)
Definition: objects.cc:4166
static const int kHeaderSize
Definition: objects.h:2195
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
#define arraysize(array)
Definition: macros.h:86
@ JS_OBJECT_TYPE
Definition: objects.h:731
@ KEEP_INOBJECT_PROPERTIES
Definition: objects.h:249

References arraysize, v8::internal::Handle< T >::cast(), factory(), heap(), v8::internal::JS_OBJECT_TYPE, v8::internal::KEEP_INOBJECT_PROPERTIES, v8::internal::JSObject::kHeaderSize, map, name, v8::internal::JSObject::NormalizeProperties(), v8::internal::Object::SetProperty(), and v8::internal::STRICT.

Referenced by v8::Private::ForApi(), and v8::SymbolFor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTStatistics()

HStatistics * v8::internal::Isolate::GetTStatistics ( )

Definition at line 2142 of file isolate.cc.

2142  {
2143  if (tstatistics() == NULL) set_tstatistics(new HStatistics());
2144  return tstatistics();
2145 }

References NULL.

Referenced by Deinit(), v8::internal::compiler::Pipeline::GenerateCode(), and v8::internal::compiler::PhaseStats::~PhaseStats().

+ Here is the caller graph for this function:

◆ global_context()

Handle< Context > v8::internal::Isolate::global_context ( )

Definition at line 1344 of file isolate.cc.

1344  {
1345  return handle(context()->global_object()->global_context());
1346 }
Handle< GlobalObject > global_object()
Definition: isolate.h:670
Handle< Context > global_context()
Definition: isolate.cc:1344

References context(), global_object(), and v8::internal::handle().

Referenced by v8::ScriptCompiler::Compile(), v8::ScriptCompiler::CompileUnbound(), and v8::ScriptCompiler::StartStreamingScript().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ global_handles()

GlobalHandles* v8::internal::Isolate::global_handles ( )
inline

◆ global_object()

Handle<GlobalObject> v8::internal::Isolate::global_object ( )
inline

Definition at line 670 of file isolate.h.

670  {
671  return Handle<GlobalObject>(context()->global_object());
672  }

References context().

Referenced by v8::internal::Debug::ClearMirrorCache(), global_context(), and v8::internal::Debug::MakeJSObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ global_proxy()

JSObject* v8::internal::Isolate::global_proxy ( )
inline

Definition at line 675 of file isolate.h.

675  {
676  return context()->global_proxy();
677  }
JSObject * global_proxy()
Definition: contexts.cc:64

References context(), and v8::internal::Context::global_proxy().

Referenced by v8::internal::Debug::CallEventCallback(), v8::Script::Run(), and v8::internal::Runtime_NewObjectHelper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GlobalTearDown()

void v8::internal::Isolate::GlobalTearDown ( )
static

Definition at line 1585 of file isolate.cc.

1585  {
1586  delete thread_data_table_;
1588 }

References NULL, and thread_data_table_.

Referenced by v8::internal::V8::TearDown().

+ Here is the caller graph for this function:

◆ handle_scope_data()

◆ handle_scope_implementer()

◆ handler()

static Address v8::internal::Isolate::handler ( ThreadLocalTop *  thread)
inlinestatic

Definition at line 650 of file isolate.h.

650 { return thread->handler_; }

Referenced by CancelScheduledExceptionFromTryCatch(), GetPromiseOnStackOnThrow(), v8::internal::TickSample::Init(), IsFinallyOnTop(), v8::internal::SafeStackFrameIterator::IsValidTop(), PropagatePendingExceptionToExternalTryCatch(), PushPromise(), v8::internal::StackFrameIterator::Reset(), RestorePendingMessageFromTryCatch(), and ShouldReportException().

+ Here is the caller graph for this function:

◆ handler_address()

Address* v8::internal::Isolate::handler_address ( )
inline

Definition at line 655 of file isolate.h.

655 { return &thread_local_top_.handler_; }

References thread_local_top_.

◆ has_installed_extensions()

bool v8::internal::Isolate::has_installed_extensions ( )
inline

Definition at line 953 of file isolate.h.

953 { return has_installed_extensions_; }

References has_installed_extensions_.

Referenced by v8::internal::StartupSerializer::SerializeStrongReferences().

+ Here is the caller graph for this function:

◆ has_pending_exception()

◆ has_pending_message_address()

Address v8::internal::Isolate::has_pending_message_address ( )
inline

Definition at line 613 of file isolate.h.

613  {
614  return reinterpret_cast<Address>(&thread_local_top_.has_pending_message_);
615  }
byte * Address
Definition: globals.h:101

References thread_local_top_.

◆ has_scheduled_exception()

bool v8::internal::Isolate::has_scheduled_exception ( )
inline

Definition at line 627 of file isolate.h.

627  {
628  DCHECK(!thread_local_top_.scheduled_exception_->IsException());
629  return thread_local_top_.scheduled_exception_ != heap_.the_hole_value();
630  }

References DCHECK, heap_, and thread_local_top_.

Referenced by v8::internal::Debug::CallEventCallback(), CancelScheduledExceptionFromTryCatch(), CancelTerminateExecution(), v8::IsExecutionTerminatingCheck(), v8::internal::Debug::OnThrow(), v8::internal::MessageHandler::ReportMessage(), and scheduled_exception().

+ Here is the caller graph for this function:

◆ HasExternalTryCatch()

bool v8::internal::Isolate::HasExternalTryCatch ( )

Definition at line 1157 of file isolate.cc.

1157  {
1159 
1160  return (thread_local_top()->catcher_ != NULL) &&
1161  (try_catch_handler() == thread_local_top()->catcher_);
1162 }

References DCHECK, has_pending_exception(), NULL, thread_local_top(), and try_catch_handler().

Referenced by PropagatePendingExceptionToExternalTryCatch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ heap()

Heap* v8::internal::Isolate::heap ( )
inline

Definition at line 873 of file isolate.h.

873 { return &heap_; }

References heap_.

Referenced by v8::Isolate::AddGCEpilogueCallback(), v8::V8::AddGCEpilogueCallback(), v8::Isolate::AddGCPrologueCallback(), v8::V8::AddGCPrologueCallback(), v8::V8::AddMessageListener(), v8::internal::SharedFunctionInfo::AddToOptimizedCodeMap(), v8::internal::AddToWeakNativeContextList(), v8::internal::AddWeakObjectToCodeDependency(), v8::internal::PrototypeIterator::Advance(), v8::internal::CompilationSubCache::Age(), v8::internal::Deserializer::Allocate(), v8::internal::OrderedHashTable< Derived, Iterator, entrysize >::Allocate(), v8::internal::MemoryAllocator::AllocateChunk(), v8::internal::MemoryAllocator::AllocateLargePage(), v8::internal::MemoryAllocator::AllocatePage(), v8::Context::AllowCodeGenerationFromStrings(), v8::internal::BackgroundParsingTask::BackgroundParsingTask(), v8::internal::Debug::Break(), v8::internal::CodeStubGraphBuilder< Stub >::BuildCodeInitializedStub(), v8::internal::HOptimizedGraphBuilder::BuildFastLiteral(), CancelScheduledExceptionFromTryCatch(), v8::internal::LiveEdit::ChangeScriptSource(), v8::Date::CheckCast(), v8::NumberObject::CheckCast(), v8::BooleanObject::CheckCast(), v8::StringObject::CheckCast(), v8::SymbolObject::CheckCast(), v8::internal::StubCache::Clear(), v8::internal::BreakPointInfo::ClearBreakPoint(), v8::internal::ConstantPoolArray::ClearPtrEntries(), v8::internal::CompileGlobalEval(), v8::internal::Compiler::CompileScript(), v8::internal::PropertyICCompiler::ComputeCompareNil(), v8::internal::ComputeReceiverForNonGlobal(), v8::internal::ConstantIsObject(), v8::Isolate::ContextDisposedNotification(), v8::internal::CopyObjectToObjectElements(), v8::internal::EternalHandles::Create(), v8::internal::GlobalHandles::Create(), v8::internal::Runtime::CreateArrayLiteralBoilerplate(), v8::CreateEnvironment(), v8::internal::CreateObjectLiteralBoilerplate(), v8::internal::DeclareGlobals(), v8::internal::JSObject::DefineAccessor(), v8::internal::JSObject::DeleteNormalizedProperty(), v8::internal::Deoptimizer::DeoptimizeAll(), v8::internal::Deoptimizer::DeoptimizeMarkedCode(), v8::internal::Deoptimizer::DeoptimizeMarkedCodeForContext(), v8::internal::Deserializer::Deserialize(), v8::internal::Deserializer::DeserializePartial(), v8::internal::Deoptimizer::DoComputeAccessorStubFrame(), v8::internal::Deoptimizer::DoComputeArgumentsAdaptorFrame(), v8::internal::Deoptimizer::DoComputeCompiledStubFrame(), v8::internal::Deoptimizer::DoComputeConstructStubFrame(), v8::internal::Deoptimizer::DoComputeJSFrame(), v8::internal::JSDate::DoGetField(), v8::internal::Deoptimizer::DoTranslateCommand(), v8::internal::Deoptimizer::DoTranslateObject(), v8::DumpHeapConstants(), v8::internal::ScopeInfo::Empty(), EnqueueMicrotask(), v8::internal::HashTable< Derived, Shape, Key >::EnsureCapacity(), v8::internal::EnsureJSArrayWithWritableFastElements(), v8::internal::MaterializedObjectStore::EnsureStackEntries(), v8::internal::JSObject::EnsureWritableFastElements(), v8::EscapableHandleScope::EscapableHandleScope(), v8::internal::CodeFlusher::EvictCandidate(), v8::internal::CodeFlusher::EvictOptimizedCodeMap(), v8::internal::ExternalizeStringExtension::Externalize(), v8::internal::FillCache(), v8::internal::NativeObjectsExplorer::FillRetainedObjects(), v8::internal::LiveEdit::FindActiveGenerators(), v8::internal::HashTable< Derived, Shape, Key >::FindEntry(), v8::internal::NativeObjectsExplorer::FindOrAddGroupInfo(), v8::internal::PropertyICCompiler::FindPreMonomorphic(), v8::internal::Debug::FindSharedFunctionInfoInScript(), v8::internal::Deserializer::FlushICacheForNewCodeObjects(), v8::internal::MemoryAllocator::Free(), v8::internal::Heap::FreeQueuedChunks(), v8::internal::JSObject::Freeze(), v8::internal::FunctionCallbackArguments::FunctionCallbackArguments(), v8::internal::InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer(), v8::internal::GetAccessCheckInfo(), v8::internal::StatisticsExtension::GetCounters(), v8::internal::Deoptimizer::GetDeoptimizedCodeCount(), v8::internal::Object::GetElementWithReceiver(), v8::internal::GetEnumPropertyKeys(), v8::internal::GetFunctionArguments(), v8::internal::Compiler::GetFunctionFromEval(), v8::Isolate::GetHeapStatistics(), v8::internal::JSObject::GetIdentityHash(), v8::internal::GetLiteralAllocationSite(), v8::internal::Debug::GetLoadedScripts(), GetMessageLocation(), v8::internal::GetOwnProperty(), v8::internal::Object::GetRootMap(), v8::internal::Debug::GetSourceBreakLocations(), GetSymbolRegistry(), v8::internal::JSDate::GetUTCField(), v8::internal::HandleApiCallAsFunctionOrConstructor(), v8::internal::HandleApiCallHelper(), v8::internal::Map::has_code_cache(), v8::internal::HasOwnPropertyImplementation(), v8::internal::GlobalHandles::IdentifyNewSpaceWeakIndependentHandles(), v8::Isolate::IdleNotification(), Init(), v8::internal::BASE_EMBEDDED< Visitor >::Initialize(), v8::internal::Script::InitLineEnds(), v8::internal::PromotionQueue::insert(), v8::internal::IC::InvalidateMaps(), is_catchable_by_javascript(), v8::IsExecutionTerminatingCheck(), IsFastArrayConstructorPrototypeChainIntact(), v8::internal::IsFastLiteral(), v8::internal::StringTracker::IsFreshUnusedString(), v8::internal::IsInlined(), v8::internal::Heap::isolate(), v8::internal::SerializerDeserializer::Iterate(), v8::internal::CompilationSubCache::IterateFunctions(), v8::internal::GlobalHandles::IterateObjectGroups(), v8::internal::CodeFlusher::IteratePointersToFromSpace(), v8::internal::LoadLookupSlotHelper(), v8::internal::Logger::LogAccessorCallbacks(), v8::internal::Logger::LogCodeObjects(), v8::internal::Logger::LogCompiledFunctions(), v8::internal::Logger::LogExistingFunction(), v8::internal::StringTable::LookupTwoCharsStringIfExists(), v8::Isolate::LowMemoryNotification(), main(), v8::internal::CodeGenerator::MakeCodeEpilogue(), v8::String::MakeExternal(), v8::internal::JSTypedArray::MaterializeArrayBuffer(), v8::internal::Deoptimizer::MaterializeNextValue(), v8::internal::MaterializeStackLocalsWithFrameInspector(), v8::internal::JSObject::MigrateFastToSlow(), v8::internal::JSObject::MigrateSlowToFast(), v8::BooleanObject::New(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::New(), v8::String::NewExternal(), v8::internal::NewSloppyArguments(), v8::internal::JSObject::NormalizeElements(), v8::internal::Parser::Parse(), v8::internal::GlobalHandles::PostGarbageCollectionProcessing(), v8::internal::JSObject::PrepareElementsForSort(), v8::internal::Debug::PrepareForBreakPoints(), v8::internal::CodeFlusher::ProcessJSFunctionCandidates(), v8::internal::CodeFlusher::ProcessOptimizedCodeMaps(), v8::internal::CodeFlusher::ProcessSharedFunctionInfoCandidates(), PropagatePendingExceptionToExternalTryCatch(), v8::internal::PropertyCallbackArguments::PropertyCallbackArguments(), v8::internal::Deserializer::ReadChunk(), v8::internal::Deserializer::ReadObject(), v8::internal::RecordFunctionCompilation(), v8::internal::StringTracker::RecordWrite(), v8::internal::IncrementalMarking::RecordWriteFromCode(), v8::internal::Deserializer::RelinkAllocationSite(), v8::internal::Debug::RemoveDebugInfo(), v8::Isolate::RemoveGCEpilogueCallback(), v8::V8::RemoveGCEpilogueCallback(), v8::Isolate::RemoveGCPrologueCallback(), v8::V8::RemoveGCPrologueCallback(), v8::V8::RemoveMessageListeners(), v8::internal::MessageHandler::ReportMessage(), ReportPendingMessages(), v8::internal::JSObject::ResetElements(), ReThrow(), v8::internal::Serializer::RootIndex(), RunMicrotasks(), v8::internal::Heap::ScavengeObject(), v8::internal::Heap::ScavengeObjectSlow(), v8::internal::ScopeIterator::ScopeIterator(), v8::internal::ScriptCache::ScriptCache(), v8::internal::SearchRegExpMultiple(), v8::internal::StartupSerializer::SerializeStrongReferences(), v8::internal::StartupSerializer::SerializeWeakReferences(), v8::internal::DebugInfo::SetBreakPoint(), v8::internal::JSObject::SetDictionaryElement(), v8::internal::JSObject::SetFastElement(), v8::internal::JSFunction::SetInstancePrototype(), v8::internal::FastElementsAccessor< FastElementsAccessorSubclass, KindTraits >::SetLengthWithoutNormalize(), v8::internal::JSObject::SetObserved(), v8::internal::JSObject::SetPrototype(), v8::SetResourceConstraints(), v8::internal::Runtime::SetupArrayBuffer(), v8::internal::JSDate::SetValue(), v8::internal::PartialSerializer::ShouldBeInThePartialSnapshotCache(), v8::internal::Serializer::ShouldBeSkipped(), v8::internal::HashTable< Derived, Shape, Key >::Shrink(), v8::internal::String::SlowFlatten(), StackOverflow(), v8::internal::CpuProfiler::StartProcessorIfNotStarted(), v8::internal::StoreBuffer::StoreBufferOverflow(), v8::internal::StoreToSuper(), v8::internal::StringReplaceGlobalRegExpWithEmptyString(), v8::internal::StringReplaceGlobalRegExpWithString(), v8::internal::JSObjectWalkVisitor< ContextObject >::StructureWalk(), v8::internal::OptimizedFrame::Summarize(), v8::internal::Logger::SuspectReadEvent(), TerminateExecution(), Throw(), v8::Isolate::ThrowException(), v8::internal::ThrowReferenceError(), v8::internal::JSObject::TransitionElementsKind(), v8::internal::TypeOfString(), v8::internal::EntryFrame::unchecked_code(), v8::internal::EntryConstructFrame::unchecked_code(), v8::internal::FastElementsAccessor< FastElementsAccessorSubclass, KindTraits >::ValidateContents(), v8::internal::Deoptimizer::VisitAllOptimizedFunctions(), v8::V8::VisitExternalResources(), v8::internal::VerifyPointersVisitor::VisitPointers(), and v8::internal::Serializer::VisitPointers().

◆ heap_profiler()

HeapProfiler* v8::internal::Isolate::heap_profiler ( ) const
inline

Definition at line 972 of file isolate.h.

972 { return heap_profiler_; }

References heap_profiler_.

Referenced by v8::HeapSnapshot::Delete(), v8::internal::Heap::OnAllocationEvent(), v8::internal::Heap::OnMoveEvent(), v8::internal::Heap::RightTrimFixedArray(), v8::internal::Heap::SelectScavengingVisitorsTable(), and v8::internal::NativeObjectsExplorer::VisitSubtreeWrapper().

+ Here is the caller graph for this function:

◆ id()

int v8::internal::Isolate::id ( ) const
inline

Definition at line 1071 of file isolate.h.

1071 { return static_cast<int>(id_); }

References id_.

Referenced by get_address_from_id(), and NextOptimizationId().

+ Here is the caller graph for this function:

◆ Init()

bool v8::internal::Isolate::Init ( Deserializer des)

Definition at line 1828 of file isolate.cc.

1828  {
1830  TRACE_ISOLATE(init);
1831 
1832  stress_deopt_count_ = FLAG_deopt_every_n_times;
1833 
1834  has_fatal_error_ = false;
1835 
1836  if (function_entry_hook() != NULL) {
1837  // When function entry hooking is in effect, we have to create the code
1838  // stubs from scratch to get entry hooks, rather than loading the previously
1839  // generated stubs from disk.
1840  // If this assert fires, the initialization path has regressed.
1841  DCHECK(des == NULL);
1842  }
1843 
1844  // The initialization process does not handle memory exhaustion.
1845  DisallowAllocationFailure disallow_allocation_failure(this);
1846 
1847  memory_allocator_ = new MemoryAllocator(this);
1848  code_range_ = new CodeRange(this);
1849 
1850  // Safe after setting Heap::isolate_, and initializing StackGuard
1852 
1853 #define ASSIGN_ELEMENT(CamelName, hacker_name) \
1854  isolate_addresses_[Isolate::k##CamelName##Address] = \
1855  reinterpret_cast<Address>(hacker_name##_address());
1857 #undef ASSIGN_ELEMENT
1858 
1859  string_tracker_ = new StringTracker();
1860  string_tracker_->isolate_ = this;
1861  compilation_cache_ = new CompilationCache(this);
1862  keyed_lookup_cache_ = new KeyedLookupCache();
1863  context_slot_cache_ = new ContextSlotCache();
1864  descriptor_lookup_cache_ = new DescriptorLookupCache();
1865  unicode_cache_ = new UnicodeCache();
1866  inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this);
1867  write_iterator_ = new ConsStringIteratorOp();
1868  global_handles_ = new GlobalHandles(this);
1869  eternal_handles_ = new EternalHandles();
1870  bootstrapper_ = new Bootstrapper(this);
1872  stub_cache_ = new StubCache(this);
1873  materialized_object_store_ = new MaterializedObjectStore(this);
1874  regexp_stack_ = new RegExpStack();
1875  regexp_stack_->isolate_ = this;
1876  date_cache_ = new DateCache();
1878  new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS];
1879  cpu_profiler_ = new CpuProfiler(this);
1880  heap_profiler_ = new HeapProfiler(heap());
1881 
1882  // Enable logging before setting up the heap
1883  logger_->SetUp(this);
1884 
1885  // Initialize other runtime facilities
1886 #if defined(USE_SIMULATOR)
1887 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || \
1888  V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
1889  Simulator::Initialize(this);
1890 #endif
1891 #endif
1892 
1893  code_aging_helper_ = new CodeAgingHelper();
1894 
1895  { // NOLINT
1896  // Ensure that the thread has a valid stack guard. The v8::Locker object
1897  // will ensure this too, but we don't have to use lockers if we are only
1898  // using one thread.
1899  ExecutionAccess lock(this);
1900  stack_guard_.InitThread(lock);
1901  }
1902 
1903  // SetUp the object heap.
1905  if (!heap_.SetUp()) {
1906  V8::FatalProcessOutOfMemory("heap setup");
1907  return false;
1908  }
1909 
1910  deoptimizer_data_ = new DeoptimizerData(memory_allocator_);
1911 
1912  const bool create_heap_objects = (des == NULL);
1913  if (create_heap_objects && !heap_.CreateHeapObjects()) {
1914  V8::FatalProcessOutOfMemory("heap object creation");
1915  return false;
1916  }
1917 
1918  if (create_heap_objects) {
1919  // Terminate the cache array with the sentinel so we can iterate.
1920  PushToPartialSnapshotCache(heap_.undefined_value());
1921  }
1922 
1924 
1925  bootstrapper_->Initialize(create_heap_objects);
1926  builtins_.SetUp(this, create_heap_objects);
1927 
1928  if (FLAG_log_internal_timer_events) {
1929  set_event_logger(Logger::DefaultTimerEventsLogger);
1930  } else {
1931  set_event_logger(Logger::EmptyTimerEventsLogger);
1932  }
1933 
1934  // Set default value if not yet set.
1935  // TODO(yangguo): move this to ResourceConstraints::ConfigureDefaults
1936  // once ResourceConstraints becomes an argument to the Isolate constructor.
1937  if (max_available_threads_ < 1) {
1938  // Choose the default between 1 and 4.
1939  max_available_threads_ =
1940  Max(Min(base::SysInfo::NumberOfProcessors(), 4), 1);
1941  }
1942 
1943  if (!FLAG_job_based_sweeping) {
1945  SweeperThread::NumberOfThreads(max_available_threads_);
1946  }
1947 
1948  if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) {
1949  PrintF("Concurrent recompilation has been disabled for tracing.\n");
1950  } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) {
1953  }
1954 
1955  if (num_sweeper_threads_ > 0) {
1957  for (int i = 0; i < num_sweeper_threads_; i++) {
1958  sweeper_thread_[i] = new SweeperThread(this);
1959  sweeper_thread_[i]->Start();
1960  }
1961  }
1962 
1963  // If we are deserializing, read the state into the now-empty heap.
1964  if (!create_heap_objects) {
1965  des->Deserialize(this);
1966  }
1968 
1969  // Finish initialization of ThreadLocal after deserialization is done.
1973 
1974  // Deserializing may put strange things in the root array's copy of the
1975  // stack guard.
1977 
1978  // Quiet the heap NaN if needed on target platform.
1979  if (!create_heap_objects) Assembler::QuietNaN(heap_.nan_value());
1980 
1981  runtime_profiler_ = new RuntimeProfiler(this);
1982 
1983  // If we are deserializing, log non-function code objects and compiled
1984  // functions found in the snapshot.
1985  if (!create_heap_objects &&
1986  (FLAG_log_code ||
1987  FLAG_ll_prof ||
1988  FLAG_perf_jit_prof ||
1989  FLAG_perf_basic_prof ||
1991  HandleScope scope(this);
1992  LOG(this, LogCodeObjects());
1993  LOG(this, LogCompiledFunctions());
1994  }
1995 
1996  CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, embedder_data_)),
1998  CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)),
2000  CHECK_EQ(static_cast<int>(
2003  CHECK_EQ(static_cast<int>(OFFSET_OF(
2004  Isolate,
2007 
2008  state_ = INITIALIZED;
2010 
2011  if (!create_heap_objects) {
2012  // Now that the heap is consistent, it's OK to generate the code for the
2013  // deopt entry table that might have been referred to by optimized code in
2014  // the snapshot.
2015  HandleScope scope(this);
2017  this,
2020  }
2021 
2022  if (!serializer_enabled()) {
2023  // Ensure that all stubs which need to be generated ahead of time, but
2024  // cannot be serialized into the snapshot have been generated.
2025  HandleScope scope(this);
2026  CodeStub::GenerateFPStubs(this);
2029  }
2030 
2031  initialized_from_snapshot_ = (des != NULL);
2032 
2033  return true;
2034 }
static double TimeCurrentMillis()
static void QuietNaN(HeapObject *nan)
void SetUp(Isolate *isolate, bool create_heap_objects)
Definition: builtins.cc:1530
static void EnsureCodeForDeoptimizationEntry(Isolate *isolate, BailoutType type, int max_entry_id)
int64_t amount_of_external_allocated_memory_
Definition: heap.h:1417
void SetStackLimits()
Definition: heap.cc:5173
Object * roots_[kRootListLength]
Definition: heap.h:1426
int64_t amount_of_external_allocated_memory_at_last_global_gc_
Definition: heap.h:1420
bool HasBeenSetUp()
Definition: heap.cc:221
bool CreateHeapObjects()
Definition: heap.cc:5156
static const int kIsolateRootsOffset
Definition: v8.h:5840
static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset
Definition: v8.h:5838
static const int kAmountOfExternalAllocatedMemoryOffset
Definition: v8.h:5836
static const int kIsolateEmbedderDataOffset
Definition: v8.h:5835
double time_millis_at_init_
Definition: isolate.h:1286
bool serializer_enabled() const
Definition: isolate.h:1007
friend class HandleScopeImplementer
Definition: isolate.h:1337
FunctionEntryHook function_entry_hook()
Definition: isolate.h:1078
void PushToPartialSnapshotCache(Object *obj)
Definition: isolate.cc:1656
friend class OptimizingCompilerThread
Definition: isolate.h:1339
friend class ExecutionAccess
Definition: isolate.h:1336
friend class SweeperThread
Definition: isolate.h:1340
static void EmptyTimerEventsLogger(const char *name, int se)
Definition: log.h:303
bool is_logging_code_events()
Definition: log.h:315
bool SetUp(Isolate *isolate)
Definition: log.cc:1829
static void DefaultTimerEventsLogger(const char *name, int se)
Definition: log.cc:953
static void GenerateFixedRegStubsAheadOfTime(Isolate *isolate)
static void GenerateAheadOfTime(Isolate *isolate)
Definition: code-stubs.cc:917
static int NumberOfThreads(int max_available)
static void FatalProcessOutOfMemory(const char *location, bool take_snapshot=false)
#define ASSIGN_ELEMENT(CamelName, hacker_name)
#define LOG(isolate, Call)
Definition: log.h:69
#define CHECK_EQ(expected, value)
Definition: logging.h:169
#define OFFSET_OF(type, field)
Definition: macros.h:22
const int kDeoptTableSerializeEntryCount
Definition: serialize.h:40
PerIsolateAssertScopeDebugOnly< ALLOCATION_FAILURE_ASSERT, false > DisallowAllocationFailure
Definition: assert-scope.h:161

References v8::internal::Heap::amount_of_external_allocated_memory_, v8::internal::Heap::amount_of_external_allocated_memory_at_last_global_gc_, ASSIGN_ELEMENT, bootstrapper_, builtins_, call_descriptor_data_, CHECK_EQ, clear_pending_exception(), clear_pending_message(), clear_scheduled_exception(), code_aging_helper_, code_range_, compilation_cache_, context_slot_cache_, cpu_profiler_, v8::internal::Heap::CreateHeapObjects(), date_cache_, DCHECK, v8::internal::Logger::DefaultTimerEventsLogger(), deoptimizer_data_, descriptor_lookup_cache_, v8::internal::Deserializer::Deserialize(), embedder_data_, v8::internal::Logger::EmptyTimerEventsLogger(), v8::internal::OptimizingCompilerThread::Enabled(), v8::internal::Deoptimizer::EnsureCodeForDeoptimizationEntry(), eternal_handles_, ExecutionAccess, v8::internal::V8::FatalProcessOutOfMemory(), FOR_EACH_ISOLATE_ADDRESS_NAME, function_entry_hook(), v8::internal::StubFailureTrampolineStub::GenerateAheadOfTime(), v8::internal::StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(), global_handles_, handle_scope_implementer_, HandleScopeImplementer, has_fatal_error_, v8::internal::Heap::HasBeenSetUp(), heap(), heap_, heap_profiler_, v8::internal::StubCache::Initialize(), INITIALIZED, initialized_from_snapshot_, InitializeThreadLocal(), inner_pointer_to_code_cache_, v8::internal::Logger::is_logging_code_events(), v8::internal::StringTracker::isolate_, v8::internal::RegExpStack::isolate_, v8::internal::Internals::kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset, v8::internal::Internals::kAmountOfExternalAllocatedMemoryOffset, v8::internal::kDeoptTableSerializeEntryCount, keyed_lookup_cache_, v8::internal::Internals::kIsolateEmbedderDataOffset, v8::internal::Internals::kIsolateRootsOffset, v8::internal::Deoptimizer::LAZY, LOG, logger_, materialized_object_store_, v8::internal::Max(), memory_allocator_, v8::internal::Min(), NULL, num_sweeper_threads_, v8::internal::CallDescriptors::NUMBER_OF_DESCRIPTORS, v8::internal::SweeperThread::NumberOfThreads(), OFFSET_OF, optimizing_compiler_thread_, OptimizingCompilerThread, v8::internal::PrintF(), PushToPartialSnapshotCache(), v8::internal::Assembler::QuietNaN(), regexp_stack_, v8::internal::Heap::roots_, runtime_profiler_, serializer_enabled(), v8::internal::Heap::SetStackLimits(), v8::internal::Heap::SetUp(), v8::internal::Logger::SetUp(), v8::internal::Builtins::SetUp(), stack_guard_, v8::base::Thread::Start(), state_, stress_deopt_count_, string_tracker_, stub_cache_, sweeper_thread_, SweeperThread, time_millis_at_init_, v8::base::OS::TimeCurrentMillis(), TRACE_ISOLATE, unicode_cache_, and write_iterator_.

Referenced by v8::internal::Snapshot::Initialize(), and v8::Isolate::New().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialized_from_snapshot()

bool v8::internal::Isolate::initialized_from_snapshot ( )
inline

Definition at line 1014 of file isolate.h.

1014 { return initialized_from_snapshot_; }

References initialized_from_snapshot_.

◆ InitializeLoggingAndCounters()

void v8::internal::Isolate::InitializeLoggingAndCounters ( )

Definition at line 1818 of file isolate.cc.

1818  {
1819  if (logger_ == NULL) {
1820  logger_ = new Logger(this);
1821  }
1822  if (counters_ == NULL) {
1823  counters_ = new Counters(this);
1824  }
1825 }

References counters_, logger_, and NULL.

Referenced by v8::internal::Serializer::InitializeCodeAddressMap(), Isolate(), v8::Isolate::New(), PrintStack(), v8::Isolate::SetCounterFunction(), v8::Isolate::SetCreateHistogramFunction(), and v8::Isolate::SetJitCodeEventHandler().

+ Here is the caller graph for this function:

◆ InitializeOncePerProcess()

void v8::internal::Isolate::InitializeOncePerProcess ( )
static

Definition at line 152 of file isolate.cc.

152  {
153  base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
158  thread_data_table_ = new Isolate::ThreadDataTable();
159 }
static LocalStorageKey CreateThreadLocalKey()
static base::Thread::LocalStorageKey thread_id_key_
Definition: isolate.h:1179
static base::Thread::LocalStorageKey isolate_key_
Definition: isolate.h:1178

References CHECK, v8::base::Thread::CreateThreadLocalKey(), isolate_key_, NULL, per_isolate_thread_data_key_, v8::base::LazyInstanceImpl< T, AllocationTrait, CreateTrait, InitOnceTrait, DestroyTrait >::Pointer(), thread_data_table_, thread_data_table_mutex_, and thread_id_key_.

Referenced by v8::internal::V8::InitializeOncePerProcessImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeThreadLocal()

void v8::internal::Isolate::InitializeThreadLocal ( )
private

Definition at line 1771 of file isolate.cc.

1771  {
1772  thread_local_top_.isolate_ = this;
1773  thread_local_top_.Initialize();
1774 }

References thread_local_top_.

Referenced by ArchiveThread(), and Init().

+ Here is the caller graph for this function:

◆ INLINE() [1/3]

v8::internal::Isolate::INLINE ( static Isolate Current())
inline

Definition at line 480 of file isolate.h.

480  {
481  Isolate* isolate = reinterpret_cast<Isolate*>(
483  DCHECK(isolate != NULL);
484  return isolate;
485  }
static void * GetExistingThreadLocal(LocalStorageKey key)
Definition: platform.h:481

References DCHECK, v8::base::Thread::GetExistingThreadLocal(), isolate_key_, and NULL.

+ Here is the call graph for this function:

◆ INLINE() [2/3]

v8::internal::Isolate::INLINE ( static Isolate UncheckedCurrent())
inline

Definition at line 487 of file isolate.h.

487  {
488  return reinterpret_cast<Isolate*>(
490  }

References v8::base::Thread::GetThreadLocal(), and isolate_key_.

+ Here is the call graph for this function:

◆ INLINE() [3/3]

v8::internal::Isolate::INLINE ( static Isolate UnsafeCurrent())
inline

Definition at line 494 of file isolate.h.

494  {
495  return reinterpret_cast<Isolate*>(
497  }

References v8::base::Thread::GetThreadLocal(), and isolate_key_.

+ Here is the call graph for this function:

◆ inner_pointer_to_code_cache()

InnerPointerToCodeCache* v8::internal::Isolate::inner_pointer_to_code_cache ( )
inline

Definition at line 911 of file isolate.h.

911  {
913  }

References inner_pointer_to_code_cache_.

Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpaceAndCandidates(), FindCodeObject(), v8::internal::OptimizedFrame::GetDeoptimizationData(), v8::internal::IC::OnTypeFeedbackChanged(), v8::internal::MarkCompactCollector::RecordCodeTargetPatch(), and v8::internal::IncrementalMarking::RecordCodeTargetPatch().

+ Here is the caller graph for this function:

◆ interp_canonicalize_mapping()

unibrow::Mapping<unibrow::Ecma262Canonicalize>* v8::internal::Isolate::interp_canonicalize_mapping ( )
inline

Definition at line 963 of file isolate.h.

963  {
965  }
unibrow::Mapping< unibrow::Ecma262Canonicalize > interp_canonicalize_mapping_
Definition: isolate.h:1272

References interp_canonicalize_mapping_.

Referenced by v8::internal::RawMatch().

+ Here is the caller graph for this function:

◆ InvokeApiInterruptCallback()

void v8::internal::Isolate::InvokeApiInterruptCallback ( )

Definition at line 812 of file isolate.cc.

812  {
813  // Note: callback below should be called outside of execution access lock.
814  InterruptCallback callback = NULL;
815  void* data = NULL;
816  {
817  ExecutionAccess access(this);
818  callback = api_interrupt_callback_;
819  data = api_interrupt_callback_data_;
820  api_interrupt_callback_ = NULL;
821  api_interrupt_callback_data_ = NULL;
822  }
823 
824  if (callback != NULL) {
825  VMState<EXTERNAL> state(this);
826  HandleScope handle_scope(this);
827  callback(reinterpret_cast<v8::Isolate*>(this), data);
828  }
829 }
void(* InterruptCallback)(Isolate *isolate, void *data)
Definition: v8.h:4219

References ExecutionAccess, and NULL.

◆ is_catchable_by_javascript()

bool v8::internal::Isolate::is_catchable_by_javascript ( Object exception)
inline

Definition at line 639 of file isolate.h.

639  {
640  return exception != heap()->termination_exception();
641  }

References heap().

Referenced by DoThrow(), PropagatePendingExceptionToExternalTryCatch(), and ReThrow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsDead()

bool v8::internal::Isolate::IsDead ( )
inline

Definition at line 1009 of file isolate.h.

1009 { return has_fatal_error_; }

References has_fatal_error_.

Referenced by v8::V8::IsDead().

+ Here is the caller graph for this function:

◆ IsErrorObject()

bool v8::internal::Isolate::IsErrorObject ( Handle< Object obj)
private

Definition at line 981 of file isolate.cc.

981  {
982  if (!obj->IsJSObject()) return false;
983 
984  Handle<String> error_key =
985  factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("$Error"));
986  Handle<Object> error_constructor = Object::GetProperty(
987  js_builtins_object(), error_key).ToHandleChecked();
988 
990  for (PrototypeIterator iter(this, *obj, PrototypeIterator::START_AT_RECEIVER);
991  !iter.IsAtEnd(); iter.Advance()) {
992  if (iter.GetCurrent()->IsJSProxy()) return false;
993  if (JSObject::cast(iter.GetCurrent())->map()->constructor() ==
994  *error_constructor) {
995  return true;
996  }
997  }
998  return false;
999 }
PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, false > DisallowHeapAllocation
Definition: assert-scope.h:110

References factory(), v8::internal::Object::GetProperty(), v8::internal::PrototypeIterator::IsAtEnd(), js_builtins_object(), v8::internal::PrototypeIterator::START_AT_RECEIVER, and STATIC_CHAR_VECTOR.

Referenced by DoThrow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsFastArrayConstructorPrototypeChainIntact()

bool v8::internal::Isolate::IsFastArrayConstructorPrototypeChainIntact ( )

Definition at line 2181 of file isolate.cc.

2181  {
2182  Map* root_array_map =
2184  DCHECK(root_array_map != NULL);
2185  JSObject* initial_array_proto = JSObject::cast(*initial_array_prototype());
2186 
2187  // Check that the array prototype hasn't been altered WRT empty elements.
2188  if (root_array_map->prototype() != initial_array_proto) return false;
2189  if (initial_array_proto->elements() != heap()->empty_fixed_array()) {
2190  return false;
2191  }
2192 
2193  // Check that the object prototype hasn't been altered WRT empty elements.
2194  JSObject* initial_object_proto = JSObject::cast(*initial_object_prototype());
2195  PrototypeIterator iter(this, initial_array_proto);
2196  if (iter.IsAtEnd() || iter.GetCurrent() != initial_object_proto) {
2197  return false;
2198  }
2199  if (initial_object_proto->elements() != heap()->empty_fixed_array()) {
2200  return false;
2201  }
2202 
2203  iter.Advance();
2204  return iter.IsAtEnd();
2205 }
Map * get_initial_js_array_map(ElementsKind kind)
Definition: isolate.cc:2160
ElementsKind GetInitialFastElementsKind()
Definition: elements-kind.h:78

References v8::internal::PrototypeIterator::Advance(), DCHECK, get_initial_js_array_map(), v8::internal::PrototypeIterator::GetCurrent(), v8::internal::GetInitialFastElementsKind(), heap(), v8::internal::PrototypeIterator::IsAtEnd(), and NULL.

+ Here is the call graph for this function:

◆ IsFinallyOnTop()

bool v8::internal::Isolate::IsFinallyOnTop ( )

Definition at line 1165 of file isolate.cc.

1165  {
1166  // Get the address of the external handler so we can compare the address to
1167  // determine which one is closer to the top of the stack.
1168  Address external_handler_address =
1169  thread_local_top()->try_catch_handler_address();
1170  DCHECK(external_handler_address != NULL);
1171 
1172  // The exception has been externally caught if and only if there is
1173  // an external handler which is on top of the top-most try-finally
1174  // handler.
1175  // There should be no try-catch blocks as they would prohibit us from
1176  // finding external catcher in the first place (see catcher_ check above).
1177  //
1178  // Note, that finally clause would rethrow an exception unless it's
1179  // aborted by jumps in control flow like return, break, etc. and we'll
1180  // have another chances to set proper v8::TryCatch.
1181  StackHandler* handler =
1182  StackHandler::FromAddress(Isolate::handler(thread_local_top()));
1183  while (handler != NULL && handler->address() < external_handler_address) {
1184  DCHECK(!handler->is_catch());
1185  if (handler->is_finally()) return true;
1186 
1187  handler = handler->next();
1188  }
1189 
1190  return false;
1191 }

References DCHECK, handler(), NULL, and thread_local_top().

Referenced by PropagatePendingExceptionToExternalTryCatch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsInitialized()

bool v8::internal::Isolate::IsInitialized ( )
inline

◆ IsInUse()

bool v8::internal::Isolate::IsInUse ( )
inline

Definition at line 511 of file isolate.h.

511 { return entry_stack_ != NULL; }

References entry_stack_, and NULL.

Referenced by v8::Isolate::Dispose().

+ Here is the caller graph for this function:

◆ isolate_key()

static base::Thread::LocalStorageKey v8::internal::Isolate::isolate_key ( )
inlinestatic

Definition at line 531 of file isolate.h.

531  {
532  return isolate_key_;
533  }

References isolate_key_.

◆ Iterate() [1/3]

void v8::internal::Isolate::Iterate ( ObjectVisitor v)

Definition at line 206 of file isolate.cc.

206  {
207  ThreadLocalTop* current_t = thread_local_top();
208  Iterate(v, current_t);
209 }
void Iterate(ObjectVisitor *v)
Definition: isolate.cc:206

References thread_local_top().

Referenced by v8::internal::ThreadManager::Iterate(), Iterate(), and v8::internal::Heap::IterateStrongRoots().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Iterate() [2/3]

char * v8::internal::Isolate::Iterate ( ObjectVisitor v,
char *  t 
)

Definition at line 167 of file isolate.cc.

167  {
168  ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(thread_storage);
169  Iterate(v, thread);
170  return thread_storage + sizeof(ThreadLocalTop);
171 }

References Iterate().

+ Here is the call graph for this function:

◆ Iterate() [3/3]

void v8::internal::Isolate::Iterate ( ObjectVisitor v,
ThreadLocalTop *  t 
)

Definition at line 180 of file isolate.cc.

180  {
181  // Visit the roots from the top for a given thread.
182  v->VisitPointer(&thread->pending_exception_);
183  v->VisitPointer(&(thread->pending_message_obj_));
184  v->VisitPointer(bit_cast<Object**>(&(thread->pending_message_script_)));
185  v->VisitPointer(bit_cast<Object**>(&(thread->context_)));
186  v->VisitPointer(&thread->scheduled_exception_);
187 
188  for (v8::TryCatch* block = thread->try_catch_handler();
189  block != NULL;
190  block = block->next_) {
191  v->VisitPointer(bit_cast<Object**>(&(block->exception_)));
192  v->VisitPointer(bit_cast<Object**>(&(block->message_obj_)));
193  v->VisitPointer(bit_cast<Object**>(&(block->message_script_)));
194  }
195 
196  // Iterate over pointers on native execution stack.
197  for (StackFrameIterator it(this, thread); !it.done(); it.Advance()) {
198  it.frame()->Iterate(v);
199  }
200 
201  // Iterate pointers in live lookup results.
202  thread->top_lookup_result_->Iterate(v);
203 }
An external exception handler.
Definition: v8.h:5271

References v8::internal::StackFrameIterator::Advance(), and NULL.

+ Here is the call graph for this function:

◆ IterateDeferredHandles()

void v8::internal::Isolate::IterateDeferredHandles ( ObjectVisitor visitor)

Definition at line 212 of file isolate.cc.

212  {
213  for (DeferredHandles* deferred = deferred_handles_head_;
214  deferred != NULL;
215  deferred = deferred->next_) {
216  deferred->Iterate(visitor);
217  }
218 }

References deferred_handles_head_, and NULL.

Referenced by v8::internal::Heap::IterateStrongRoots().

+ Here is the caller graph for this function:

◆ IterateThread()

void v8::internal::Isolate::IterateThread ( ThreadVisitor v,
char *  t 
)

Definition at line 174 of file isolate.cc.

174  {
175  ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(t);
176  v->VisitThread(this, thread);
177 }

References v8::internal::ThreadVisitor::VisitThread().

Referenced by v8::internal::ThreadManager::IterateArchivedThreads().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_builtins_object()

Handle<JSBuiltinsObject> v8::internal::Isolate::js_builtins_object ( )
inline

Definition at line 679 of file isolate.h.

679  {
680  return Handle<JSBuiltinsObject>(thread_local_top_.context_->builtins());
681  }

References thread_local_top_.

Referenced by v8::CallV8HeapFunction(), CaptureSimpleStackTrace(), v8::internal::Debug::CheckBreakPoint(), v8::CheckConstructor(), v8::internal::MessageHandler::GetMessage(), IsErrorObject(), v8::internal::Debug::OnAfterCompile(), v8::internal::Debug::PromiseHasRejectHandler(), StackOverflow(), and v8::internal::BinaryOpIC::Transition().

+ Here is the caller graph for this function:

◆ js_entry_sp()

Address v8::internal::Isolate::js_entry_sp ( )
inline

Definition at line 658 of file isolate.h.

658  {
659  return thread_local_top_.js_entry_sp_;
660  }

References thread_local_top_.

Referenced by v8::internal::TickSample::Init(), and v8::CpuProfiler::SetIdle().

+ Here is the caller graph for this function:

◆ js_entry_sp_address()

Address* v8::internal::Isolate::js_entry_sp_address ( )
inline

Definition at line 661 of file isolate.h.

661  {
662  return &thread_local_top_.js_entry_sp_;
663  }

References thread_local_top_.

◆ jsregexp_canonrange()

unibrow::Mapping<unibrow::CanonicalizationRange>* v8::internal::Isolate::jsregexp_canonrange ( )
inline

Definition at line 929 of file isolate.h.

929  {
930  return &jsregexp_canonrange_;
931  }
unibrow::Mapping< unibrow::CanonicalizationRange > jsregexp_canonrange_
Definition: isolate.h:1264

References jsregexp_canonrange_.

Referenced by v8::internal::CharacterRange::AddCaseEquivalents().

+ Here is the caller graph for this function:

◆ jsregexp_uncanonicalize()

unibrow::Mapping<unibrow::Ecma262UnCanonicalize>* v8::internal::Isolate::jsregexp_uncanonicalize ( )
inline

Definition at line 925 of file isolate.h.

925  {
926  return &jsregexp_uncanonicalize_;
927  }
unibrow::Mapping< unibrow::Ecma262UnCanonicalize > jsregexp_uncanonicalize_
Definition: isolate.h:1263

References jsregexp_uncanonicalize_.

Referenced by v8::internal::CharacterRange::AddCaseEquivalents(), and v8::internal::GetCaseIndependentLetters().

+ Here is the caller graph for this function:

◆ keyed_lookup_cache()

KeyedLookupCache* v8::internal::Isolate::keyed_lookup_cache ( )
inline

Definition at line 887 of file isolate.h.

887  {
888  return keyed_lookup_cache_;
889  }

References keyed_lookup_cache_.

Referenced by v8::internal::Heap::CreateInitialObjects(), and v8::internal::Heap::MarkCompactPrologue().

+ Here is the caller graph for this function:

◆ LinkDeferredHandles()

void v8::internal::Isolate::LinkDeferredHandles ( DeferredHandles deferred_handles)

Definition at line 2106 of file isolate.cc.

2106  {
2107  deferred->next_ = deferred_handles_head_;
2108  if (deferred_handles_head_ != NULL) {
2109  deferred_handles_head_->previous_ = deferred;
2110  }
2111  deferred_handles_head_ = deferred;
2112 }
DeferredHandles * previous_
Definition: api.h:474

References deferred_handles_head_, v8::internal::DeferredHandles::next_, NULL, and v8::internal::DeferredHandles::previous_.

Referenced by v8::internal::DeferredHandles::DeferredHandles().

+ Here is the caller graph for this function:

◆ logger()

Logger* v8::internal::Isolate::logger ( )
inline

Definition at line 866 of file isolate.h.

866  {
867  // Call InitializeLoggingAndCounters() if logging is needed before
868  // the isolate is fully initialized.
869  DCHECK(logger_ != NULL);
870  return logger_;
871  }

References DCHECK, logger_, and NULL.

Referenced by v8::internal::CodeAddressMap::CodeAddressMap(), v8::internal::Profiler::Disengage(), v8::internal::Profiler::Engage(), v8::internal::Debug::EnqueueCommandMessage(), v8::Isolate::New(), v8::internal::Debug::NotifyMessageHandler(), v8::internal::Heap::OnMoveEvent(), v8::internal::RecordFunctionCompilation(), v8::internal::Heap::SelectScavengingVisitorsTable(), v8::Isolate::SetJitCodeEventHandler(), v8::internal::CpuProfiler::StartProcessorIfNotStarted(), v8::internal::CpuProfiler::StopProcessor(), and v8::internal::CodeAddressMap::~CodeAddressMap().

+ Here is the caller graph for this function:

◆ MarkCompactEpilogue()

void v8::internal::Isolate::MarkCompactEpilogue ( bool  is_compacting,
ThreadLocalTop *  archived_thread_data 
)
private

◆ MarkCompactPrologue()

void v8::internal::Isolate::MarkCompactPrologue ( bool  is_compacting,
ThreadLocalTop *  archived_thread_data 
)
private

◆ materialized_object_store()

MaterializedObjectStore* v8::internal::Isolate::materialized_object_store ( )
inline

Definition at line 879 of file isolate.h.

879  {
881  }

References materialized_object_store_.

Referenced by v8::internal::Deoptimizer::MaterializeHeapObjects().

+ Here is the caller graph for this function:

◆ MayIndexedAccess()

bool v8::internal::Isolate::MayIndexedAccess ( Handle< JSObject receiver,
uint32_t  index,
v8::AccessType  type 
)

Definition at line 736 of file isolate.cc.

738  {
739  DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded());
740  // Check for compatibility between the security tokens in the
741  // current lexical context and the accessed object.
742  DCHECK(context());
743 
744  MayAccessDecision decision = MayAccessPreCheck(this, receiver, type);
745  if (decision != UNKNOWN) return decision == YES;
746 
747  HandleScope scope(this);
748  Handle<Object> data;
750  { DisallowHeapAllocation no_gc;
751  // Get named access check callback
752  AccessCheckInfo* access_check_info = GetAccessCheckInfo(this, receiver);
753  if (!access_check_info) return false;
754  Object* fun_obj = access_check_info->indexed_callback();
755  callback = v8::ToCData<v8::IndexedSecurityCallback>(fun_obj);
756  if (!callback) return false;
757  data = handle(access_check_info->data(), this);
758  }
759 
760  LOG(this, ApiIndexedSecurityCheck(index));
761 
762  // Leaving JavaScript.
763  VMState<EXTERNAL> state(this);
764  return callback(
765  v8::Utils::ToLocal(receiver), index, type, v8::Utils::ToLocal(data));
766 }
static Local< Context > ToLocal(v8::internal::Handle< v8::internal::Context > obj)
static MayAccessDecision MayAccessPreCheck(Isolate *isolate, Handle< JSObject > receiver, v8::AccessType type)
Definition: isolate.cc:671
static AccessCheckInfo * GetAccessCheckInfo(Isolate *isolate, Handle< JSObject > receiver)
Definition: isolate.cc:621
bool(* IndexedSecurityCallback)(Local< Object > host, uint32_t index, AccessType type, Local< Value > data)
Returns true if cross-context access should be allowed to the indexed property with the given index o...
Definition: v8.h:3542

References context(), DCHECK, v8::internal::GetAccessCheckInfo(), v8::internal::handle(), LOG, v8::internal::MayAccessPreCheck(), v8::Utils::ToLocal(), v8::internal::UNKNOWN, and v8::internal::YES.

Referenced by v8::internal::JSObject::DeleteElement(), v8::internal::JSObject::GetElementAttributeWithReceiver(), v8::internal::Object::GetElementWithReceiver(), v8::internal::JSObject::HasRealElementProperty(), and v8::internal::JSObject::SetElement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MayNamedAccess()

bool v8::internal::Isolate::MayNamedAccess ( Handle< JSObject receiver,
Handle< Object key,
v8::AccessType  type 
)

Definition at line 697 of file isolate.cc.

699  {
700  DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded());
701 
702  // Skip checks for hidden properties access. Note, we do not
703  // require existence of a context in this case.
704  if (key.is_identical_to(factory()->hidden_string())) return true;
705 
706  // Check for compatibility between the security tokens in the
707  // current lexical context and the accessed object.
708  DCHECK(context());
709 
710  MayAccessDecision decision = MayAccessPreCheck(this, receiver, type);
711  if (decision != UNKNOWN) return decision == YES;
712 
713  HandleScope scope(this);
714  Handle<Object> data;
715  v8::NamedSecurityCallback callback;
716  { DisallowHeapAllocation no_gc;
717  AccessCheckInfo* access_check_info = GetAccessCheckInfo(this, receiver);
718  if (!access_check_info) return false;
719  Object* fun_obj = access_check_info->named_callback();
720  callback = v8::ToCData<v8::NamedSecurityCallback>(fun_obj);
721  if (!callback) return false;
722  data = handle(access_check_info->data(), this);
723  }
724 
725  LOG(this, ApiNamedSecurityCheck(*key));
726 
727  // Leaving JavaScript.
728  VMState<EXTERNAL> state(this);
729  return callback(v8::Utils::ToLocal(receiver),
730  v8::Utils::ToLocal(key),
731  type,
732  v8::Utils::ToLocal(data));
733 }
bool(* NamedSecurityCallback)(Local< Object > host, Local< Value > key, AccessType type, Local< Value > data)
Returns true if cross-context access should be allowed to the named property with the given key on th...
Definition: v8.h:3532

References context(), DCHECK, factory(), v8::internal::GetAccessCheckInfo(), v8::internal::handle(), LOG, v8::internal::MayAccessPreCheck(), v8::Utils::ToLocal(), v8::internal::UNKNOWN, and v8::internal::YES.

Referenced by v8::internal::JSObject::DefineAccessor(), v8::internal::JSObject::Freeze(), v8::internal::JSObject::GetAccessor(), v8::internal::JSReceiver::GetKeys(), v8::internal::JSObject::PreventExtensions(), v8::internal::JSObject::SetAccessor(), and v8::internal::StoreToSuper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ memory_allocator()

MemoryAllocator* v8::internal::Isolate::memory_allocator ( )
inline

Definition at line 883 of file isolate.h.

883  {
884  return memory_allocator_;
885  }

References memory_allocator_.

Referenced by v8::V8::AddMemoryAllocationCallback(), v8::internal::LargeObjectSpace::AllocateRaw(), v8::internal::CodeRange::AllocateRawMemory(), v8::internal::RegExpCompiler::Assemble(), v8::internal::MemoryChunk::CommitArea(), v8::internal::CodeRange::CommitRawMemory(), v8::internal::Heap::CommittedMemoryExecutable(), v8::internal::Heap::Contains(), v8::internal::PagedSpace::CreateEmergencyMemory(), v8::internal::PagedSpace::Expand(), v8::internal::PagedSpace::FreeEmergencyMemory(), v8::internal::Heap::FreeQueuedChunks(), v8::internal::LargeObjectSpace::FreeUnmarkedObjects(), v8::internal::StatisticsExtension::GetCounters(), v8::internal::Heap::InSpace(), v8::internal::PagedSpace::PagedSpace(), v8::internal::Heap::PrintShortHeapStatistics(), v8::internal::Heap::RecordStats(), v8::internal::PagedSpace::ReleasePage(), v8::V8::RemoveMemoryAllocationCallback(), v8::internal::Heap::SelectGarbageCollector(), v8::internal::Heap::SetUp(), v8::internal::NewSpace::SetUp(), v8::internal::SemiSpace::ShrinkTo(), v8::internal::Serializer::SpaceAreaSize(), v8::internal::GCTracer::Start(), v8::internal::GCTracer::Stop(), v8::internal::Heap::TearDown(), v8::internal::PagedSpace::TearDown(), v8::internal::NewSpace::TearDown(), and v8::internal::LargeObjectSpace::TearDown().

+ Here is the caller graph for this function:

◆ native_context()

Handle< Context > v8::internal::Isolate::native_context ( )

Definition at line 1339 of file isolate.cc.

1339  {
1340  return handle(context()->native_context());
1341 }

References context(), and v8::internal::handle().

Referenced by v8::internal::CallJsBuiltin(), v8::internal::Debug::CompileDebuggerScript(), v8::internal::CompileToplevel(), get_initial_js_array_map(), v8::internal::IC::GetHandlerCacheHolder(), v8::internal::IC::GetICCacheHolder(), v8::internal::AstValue::Internalize(), v8::internal::Map::Normalize(), v8::internal::TypedArrayMap(), and v8::internal::UnscopableLookup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NewForTesting()

static Isolate* v8::internal::Isolate::NewForTesting ( )
inlinestatic

Definition at line 1114 of file isolate.h.

1114 { return new Isolate(); }

References Isolate().

+ Here is the call graph for this function:

◆ NextOptimizationId()

int v8::internal::Isolate::NextOptimizationId ( )
inline

Definition at line 1090 of file isolate.h.

1090  {
1091  int id = next_optimization_id_++;
1094  }
1095  return id;
1096  }
static bool IsValid(intptr_t value)
Definition: objects-inl.h:1334

References id(), v8::internal::Smi::IsValid(), and next_optimization_id_.

Referenced by v8::internal::CompilationInfo::SetOptimizing().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NO_INLINE()

v8::internal::Isolate::NO_INLINE ( void   PushStackTraceAndDieunsigned int magic, Object *object, Map *map, unsigned int magic2)

◆ NotifyExtensionInstalled()

void v8::internal::Isolate::NotifyExtensionInstalled ( )
inline

Definition at line 949 of file isolate.h.

949  {
951  }

References has_installed_extensions_.

◆ num_sweeper_threads()

int v8::internal::Isolate::num_sweeper_threads ( ) const
inline

Definition at line 1063 of file isolate.h.

1063  {
1064  return num_sweeper_threads_;
1065  }

References num_sweeper_threads_.

Referenced by v8::internal::MarkCompactCollector::EnsureSweepingCompleted(), v8::internal::MarkCompactCollector::IsSweepingCompleted(), and v8::internal::MarkCompactCollector::StartSweeperThreads().

+ Here is the caller graph for this function:

◆ objects_string_compare_iterator_a()

ConsStringIteratorOp* v8::internal::Isolate::objects_string_compare_iterator_a ( )
inline

Definition at line 933 of file isolate.h.

933  {
935  }
ConsStringIteratorOp objects_string_compare_iterator_a_
Definition: isolate.h:1265

References objects_string_compare_iterator_a_.

Referenced by v8::internal::String::SlowEquals().

+ Here is the caller graph for this function:

◆ objects_string_compare_iterator_b()

ConsStringIteratorOp* v8::internal::Isolate::objects_string_compare_iterator_b ( )
inline

Definition at line 937 of file isolate.h.

937  {
939  }
ConsStringIteratorOp objects_string_compare_iterator_b_
Definition: isolate.h:1266

References objects_string_compare_iterator_b_.

Referenced by v8::internal::String::SlowEquals().

+ Here is the caller graph for this function:

◆ objects_string_iterator()

StaticResource<ConsStringIteratorOp>* v8::internal::Isolate::objects_string_iterator ( )
inline

Definition at line 941 of file isolate.h.

941  {
942  return &objects_string_iterator_;
943  }
StaticResource< ConsStringIteratorOp > objects_string_iterator_
Definition: isolate.h:1267

References objects_string_iterator_.

Referenced by v8::internal::String::ToCString(), and v8::internal::String::ToWideCString().

+ Here is the caller graph for this function:

◆ optimizing_compiler_thread()

OptimizingCompilerThread* v8::internal::Isolate::optimizing_compiler_thread ( )
inline

Definition at line 1059 of file isolate.h.

1059  {
1061  }

References optimizing_compiler_thread_.

Referenced by v8::internal::Heap::CollectAllAvailableGarbage(), v8::internal::Heap::GarbageCollectionPrologue(), v8::internal::GetOptimizedCodeLater(), v8::internal::Heap::NotifyContextDisposed(), v8::internal::RuntimeProfiler::Optimize(), and v8::internal::Debug::PrepareForBreakPoints().

+ Here is the caller graph for this function:

◆ OptionalRescheduleException()

bool v8::internal::Isolate::OptionalRescheduleException ( bool  is_bottom_call)

Definition at line 1244 of file isolate.cc.

1244  {
1247 
1248  bool is_termination_exception =
1249  pending_exception() == heap_.termination_exception();
1250 
1251  // Do not reschedule the exception if this is the bottom call.
1252  bool clear_exception = is_bottom_call;
1253 
1254  if (is_termination_exception) {
1255  if (is_bottom_call) {
1256  thread_local_top()->external_caught_exception_ = false;
1258  return false;
1259  }
1260  } else if (thread_local_top()->external_caught_exception_) {
1261  // If the exception is externally caught, clear it if there are no
1262  // JavaScript frames on the way to the C++ frame that has the
1263  // external handler.
1265  Address external_handler_address =
1266  thread_local_top()->try_catch_handler_address();
1267  JavaScriptFrameIterator it(this);
1268  if (it.done() || (it.frame()->sp() > external_handler_address)) {
1269  clear_exception = true;
1270  }
1271  }
1272 
1273  // Clear the exception if needed.
1274  if (clear_exception) {
1275  thread_local_top()->external_caught_exception_ = false;
1277  return false;
1278  }
1279 
1280  // Reschedule the exception.
1281  thread_local_top()->scheduled_exception_ = pending_exception();
1283  return true;
1284 }
bool PropagatePendingExceptionToExternalTryCatch()
Definition: isolate.cc:1777
Address try_catch_handler_address()
Definition: isolate.h:596

References clear_pending_exception(), DCHECK, has_pending_exception(), heap_, NULL, pending_exception(), PropagatePendingExceptionToExternalTryCatch(), thread_local_top(), and try_catch_handler_address().

Referenced by v8::internal::ModuleGetExport(), and v8::internal::ModuleSetExport().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pending_exception()

Object* v8::internal::Isolate::pending_exception ( )
inline

Definition at line 561 of file isolate.h.

561  {
563  DCHECK(!thread_local_top_.pending_exception_->IsException());
564  return thread_local_top_.pending_exception_;
565  }

References DCHECK, has_pending_exception(), and thread_local_top_.

Referenced by CancelTerminateExecution(), v8::internal::LiveEdit::GatherCompileInfo(), OptionalRescheduleException(), PropagatePendingExceptionToExternalTryCatch(), v8::internal::MessageHandler::ReportMessage(), and ScheduleThrow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pending_exception_address()

Object** v8::internal::Isolate::pending_exception_address ( )
inline

Definition at line 577 of file isolate.h.

577  {
578  return &thread_local_top_.pending_exception_;
579  }

References thread_local_top_.

◆ pending_message_obj_address()

Address v8::internal::Isolate::pending_message_obj_address ( )
inline

Definition at line 609 of file isolate.h.

609  {
610  return reinterpret_cast<Address>(&thread_local_top_.pending_message_obj_);
611  }

References thread_local_top_.

◆ pending_message_script_address()

Address v8::internal::Isolate::pending_message_script_address ( )
inline

Definition at line 617 of file isolate.h.

617  {
618  return reinterpret_cast<Address>(
619  &thread_local_top_.pending_message_script_);
620  }

References thread_local_top_.

◆ per_isolate_thread_data_key()

static base::Thread::LocalStorageKey v8::internal::Isolate::per_isolate_thread_data_key ( )
static

◆ PopPromise()

void v8::internal::Isolate::PopPromise ( )

Definition at line 1297 of file isolate.cc.

1297  {
1298  ThreadLocalTop* tltop = thread_local_top();
1299  if (tltop->promise_on_stack_ == NULL) return;
1300  PromiseOnStack* prev = tltop->promise_on_stack_->prev();
1301  Handle<Object> global_handle = tltop->promise_on_stack_->promise();
1302  delete tltop->promise_on_stack_;
1303  tltop->promise_on_stack_ = prev;
1304  global_handles()->Destroy(global_handle.location());
1305 }
static void Destroy(Object **location)
GlobalHandles * global_handles()
Definition: isolate.h:917

References v8::internal::GlobalHandles::Destroy(), global_handles(), NULL, v8::internal::PromiseOnStack::prev(), and thread_local_top().

+ Here is the call graph for this function:

◆ PrintCurrentStackTrace()

void v8::internal::Isolate::PrintCurrentStackTrace ( FILE *  out)

Definition at line 904 of file isolate.cc.

904  {
905  StackTraceFrameIterator it(this);
906  while (!it.done()) {
907  HandleScope scope(this);
908  // Find code position if recorded in relocation info.
909  JavaScriptFrame* frame = it.frame();
910  int pos = frame->LookupCode()->SourcePosition(frame->pc());
911  Handle<Object> pos_obj(Smi::FromInt(pos), this);
912  // Fetch function and receiver.
913  Handle<JSFunction> fun(frame->function());
914  Handle<Object> recv(frame->receiver(), this);
915  // Advance to the next JavaScript frame and determine if the
916  // current frame is the top-level frame.
917  it.Advance();
918  Handle<Object> is_top_level = it.done()
919  ? factory()->true_value()
920  : factory()->false_value();
921  // Generate and print stack trace line.
922  Handle<String> line =
923  Execution::GetStackTraceLine(recv, fun, pos_obj, is_top_level);
924  if (line->length() > 0) {
925  line->PrintOn(out);
926  PrintF(out, "\n");
927  }
928  }
929 }

References v8::internal::StackTraceFrameIterator::Advance(), factory(), v8::internal::Smi::FromInt(), v8::internal::JavaScriptFrame::function(), v8::internal::PrintF(), and v8::internal::JavaScriptFrame::receiver().

Referenced by DoThrow(), and v8::Message::PrintCurrentStackTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintStack() [1/2]

void v8::internal::Isolate::PrintStack ( FILE *  out)

Definition at line 553 of file isolate.cc.

553  {
554  if (stack_trace_nesting_level_ == 0) {
556  StringStream::ClearMentionedObjectCache(this);
557  HeapStringAllocator allocator;
558  StringStream accumulator(&allocator);
559  incomplete_message_ = &accumulator;
560  PrintStack(&accumulator);
561  accumulator.OutputToFile(out);
563  accumulator.Log(this);
566  } else if (stack_trace_nesting_level_ == 1) {
569  "\n\nAttempt to print stack while printing stack (double fault)\n");
571  "If you are lucky you may find a partial stack dump on stdout.\n\n");
572  incomplete_message_->OutputToFile(out);
573  }
574 }
void PrintStack(StringStream *accumulator)
Definition: isolate.cc:587

References incomplete_message_, InitializeLoggingAndCounters(), NULL, v8::base::OS::PrintError(), PrintStack(), and stack_trace_nesting_level_.

+ Here is the call graph for this function:

◆ PrintStack() [2/2]

void v8::internal::Isolate::PrintStack ( StringStream *  accumulator)

Definition at line 587 of file isolate.cc.

587  {
588  if (!IsInitialized()) {
589  accumulator->Add(
590  "\n==== JS stack trace is not available =======================\n\n");
591  accumulator->Add(
592  "\n==== Isolate for the thread is not initialized =============\n\n");
593  return;
594  }
595  // The MentionedObjectCache is not GC-proof at the moment.
597  DCHECK(StringStream::IsMentionedObjectCacheClear(this));
598 
599  // Avoid printing anything if there are no frames.
600  if (c_entry_fp(thread_local_top()) == 0) return;
601 
602  accumulator->Add(
603  "\n==== JS stack trace =========================================\n\n");
604  PrintFrames(this, accumulator, StackFrame::OVERVIEW);
605 
606  accumulator->Add(
607  "\n==== Details ================================================\n\n");
608  PrintFrames(this, accumulator, StackFrame::DETAILS);
609 
610  accumulator->PrintMentionedObjectCache(this);
611  accumulator->Add("=====================\n\n");
612 }
static Address c_entry_fp(ThreadLocalTop *thread)
Definition: isolate.h:647
static void PrintFrames(Isolate *isolate, StringStream *accumulator, StackFrame::PrintMode mode)
Definition: isolate.cc:577

References c_entry_fp(), DCHECK, IsInitialized(), v8::internal::PrintFrames(), and thread_local_top().

Referenced by PrintStack(), StackTraceString(), and ThrowIllegalOperation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PromoteScheduledException()

Object * v8::internal::Isolate::PromoteScheduledException ( )

Definition at line 896 of file isolate.cc.

896  {
897  Object* thrown = scheduled_exception();
899  // Re-throw the exception to avoid getting repeated error reporting.
900  return ReThrow(thrown);
901 }
Object * ReThrow(Object *exception)
Definition: isolate.cc:838

References clear_scheduled_exception(), ReThrow(), and scheduled_exception().

+ Here is the call graph for this function:

◆ PropagatePendingExceptionToExternalTryCatch()

bool v8::internal::Isolate::PropagatePendingExceptionToExternalTryCatch ( )
private

Definition at line 1777 of file isolate.cc.

1777  {
1779 
1780  bool has_external_try_catch = HasExternalTryCatch();
1781  if (!has_external_try_catch) {
1782  thread_local_top_.external_caught_exception_ = false;
1783  return true;
1784  }
1785 
1786  bool catchable_by_js = is_catchable_by_javascript(pending_exception());
1787  if (catchable_by_js && IsFinallyOnTop()) {
1788  thread_local_top_.external_caught_exception_ = false;
1789  return false;
1790  }
1791 
1792  thread_local_top_.external_caught_exception_ = true;
1793  if (thread_local_top_.pending_exception_ == heap()->termination_exception()) {
1794  try_catch_handler()->can_continue_ = false;
1796  try_catch_handler()->exception_ = heap()->null_value();
1797  } else {
1799  DCHECK(thread_local_top_.pending_message_obj_->IsJSMessageObject() ||
1800  thread_local_top_.pending_message_obj_->IsTheHole());
1801  DCHECK(thread_local_top_.pending_message_script_->IsScript() ||
1802  thread_local_top_.pending_message_script_->IsTheHole());
1803  handler->can_continue_ = true;
1804  handler->has_terminated_ = false;
1805  handler->exception_ = pending_exception();
1806  // Propagate to the external try-catch only if we got an actual message.
1807  if (thread_local_top_.pending_message_obj_->IsTheHole()) return true;
1808 
1809  handler->message_obj_ = thread_local_top_.pending_message_obj_;
1810  handler->message_script_ = thread_local_top_.pending_message_script_;
1811  handler->message_start_pos_ = thread_local_top_.pending_message_start_pos_;
1812  handler->message_end_pos_ = thread_local_top_.pending_message_end_pos_;
1813  }
1814  return true;
1815 }
void * exception_
Definition: v8.h:5402
bool can_continue_
Definition: v8.h:5409
bool HasExternalTryCatch()
Definition: isolate.cc:1157

References v8::TryCatch::can_continue_, DCHECK, v8::TryCatch::exception_, handler(), has_pending_exception(), v8::TryCatch::has_terminated_, HasExternalTryCatch(), heap(), is_catchable_by_javascript(), IsFinallyOnTop(), pending_exception(), thread_local_top_, and try_catch_handler().

Referenced by OptionalRescheduleException(), ReportPendingMessages(), and ScheduleThrow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PushPromise()

void v8::internal::Isolate::PushPromise ( Handle< JSObject promise)

Definition at line 1287 of file isolate.cc.

1287  {
1288  ThreadLocalTop* tltop = thread_local_top();
1289  PromiseOnStack* prev = tltop->promise_on_stack_;
1290  StackHandler* handler = StackHandler::FromAddress(Isolate::handler(tltop));
1291  Handle<JSObject> global_handle =
1292  Handle<JSObject>::cast(global_handles()->Create(*promise));
1293  tltop->promise_on_stack_ = new PromiseOnStack(handler, global_handle, prev);
1294 }

References v8::internal::Handle< T >::cast(), global_handles(), handler(), and thread_local_top().

+ Here is the call graph for this function:

◆ PushToPartialSnapshotCache()

void v8::internal::Isolate::PushToPartialSnapshotCache ( Object obj)

Definition at line 1656 of file isolate.cc.

1656  {
1657  int length = serialize_partial_snapshot_cache_length();
1658  int capacity = serialize_partial_snapshot_cache_capacity();
1659 
1660  if (length >= capacity) {
1661  int new_capacity = static_cast<int>((capacity + 10) * 1.2);
1662  Object** new_array = new Object*[new_capacity];
1663  for (int i = 0; i < length; i++) {
1664  new_array[i] = serialize_partial_snapshot_cache()[i];
1665  }
1666  if (capacity != 0) delete[] serialize_partial_snapshot_cache();
1667  set_serialize_partial_snapshot_cache(new_array);
1668  set_serialize_partial_snapshot_cache_capacity(new_capacity);
1669  }
1670 
1671  serialize_partial_snapshot_cache()[length] = obj;
1672  set_serialize_partial_snapshot_cache_length(length + 1);
1673 }

Referenced by Init(), v8::internal::SerializerDeserializer::Iterate(), and v8::internal::PartialSerializer::PartialSnapshotCacheIndex().

+ Here is the caller graph for this function:

◆ random_number_generator()

base::RandomNumberGenerator * v8::internal::Isolate::random_number_generator ( )
inline

Definition at line 33 of file isolate-inl.h.

33  {
35  if (FLAG_random_seed != 0) {
37  new base::RandomNumberGenerator(FLAG_random_seed);
38  } else {
39  random_number_generator_ = new base::RandomNumberGenerator();
40  }
41  }
43 }

References NULL.

Referenced by v8::internal::Heap::AllocateSymbol(), v8::internal::AssemblerBase::AssemblerBase(), v8::internal::GenerateIdentityHash(), and v8::internal::Heap::SetUp().

+ Here is the caller graph for this function:

◆ regexp_macro_assembler_canonicalize()

unibrow::Mapping<unibrow::Ecma262Canonicalize>* v8::internal::Isolate::regexp_macro_assembler_canonicalize ( )
inline

Definition at line 956 of file isolate.h.

956  {
958  }
unibrow::Mapping< unibrow::Ecma262Canonicalize > regexp_macro_assembler_canonicalize_
Definition: isolate.h:1269

References regexp_macro_assembler_canonicalize_.

Referenced by v8::internal::NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16().

+ Here is the caller graph for this function:

◆ regexp_stack()

RegExpStack* v8::internal::Isolate::regexp_stack ( )
inline

Definition at line 960 of file isolate.h.

960 { return regexp_stack_; }

References regexp_stack_.

Referenced by v8::internal::ThreadManager::EagerlyArchiveThread(), v8::internal::ThreadManager::FreeThreadResources(), v8::internal::NativeRegExpMacroAssembler::GrowStack(), and v8::internal::ThreadManager::RestoreThread().

+ Here is the caller graph for this function:

◆ RegisterTryCatchHandler()

void v8::internal::Isolate::RegisterTryCatchHandler ( v8::TryCatch that)

Definition at line 244 of file isolate.cc.

244  {
245  thread_local_top()->set_try_catch_handler(that);
246 }

References thread_local_top().

Referenced by v8::TryCatch::TryCatch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveCallCompletedCallback()

void v8::internal::Isolate::RemoveCallCompletedCallback ( CallCompletedCallback  callback)

Definition at line 2256 of file isolate.cc.

2256  {
2257  for (int i = 0; i < call_completed_callbacks_.length(); i++) {
2258  if (callback == call_completed_callbacks_.at(i)) {
2260  }
2261  }
2262 }
T Remove(int i)
Definition: list-inl.h:103

References v8::internal::List< T, AllocationPolicy >::at(), call_completed_callbacks_, and v8::internal::List< T, AllocationPolicy >::Remove().

Referenced by v8::Isolate::RemoveCallCompletedCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReportFailedAccessCheck()

void v8::internal::Isolate::ReportFailedAccessCheck ( Handle< JSObject receiver,
v8::AccessType  type 
)

Definition at line 634 of file isolate.cc.

635  {
636  if (!thread_local_top()->failed_access_check_callback_) {
637  Handle<String> message = factory()->InternalizeUtf8String("no access");
638  Handle<Object> error;
640  this, error, factory()->NewTypeError(message), /* void */);
641  ScheduleThrow(*error);
642  return;
643  }
644 
645  DCHECK(receiver->IsAccessCheckNeeded());
646  DCHECK(context());
647 
648  // Get the data object from access check info.
649  HandleScope scope(this);
650  Handle<Object> data;
651  { DisallowHeapAllocation no_gc;
652  AccessCheckInfo* access_check_info = GetAccessCheckInfo(this, receiver);
653  if (!access_check_info) return;
654  data = handle(access_check_info->data(), this);
655  }
656 
657  // Leaving JavaScript.
658  VMState<EXTERNAL> state(this);
659  thread_local_top()->failed_access_check_callback_(
660  v8::Utils::ToLocal(receiver),
661  type,
662  v8::Utils::ToLocal(data));
663 }
void ScheduleThrow(Object *exception)
Definition: isolate.cc:858
#define ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value)
Definition: isolate.h:123

References ASSIGN_RETURN_ON_EXCEPTION_VALUE, context(), DCHECK, factory(), v8::internal::GetAccessCheckInfo(), v8::internal::handle(), ScheduleThrow(), thread_local_top(), and v8::Utils::ToLocal().

Referenced by v8::internal::JSObject::DefineAccessor(), v8::internal::JSObject::DeleteElement(), v8::internal::JSObject::Freeze(), v8::internal::JSObject::GetAccessor(), v8::internal::JSObject::GetElementAttributeWithReceiver(), v8::internal::Object::GetElementWithReceiver(), v8::internal::JSReceiver::GetKeys(), v8::internal::JSObject::HasRealElementProperty(), v8::internal::JSObject::PreventExtensions(), v8::internal::JSObject::SetAccessor(), v8::internal::JSObject::SetElement(), and v8::internal::StoreToSuper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReportPendingMessages()

void v8::internal::Isolate::ReportPendingMessages ( )

Definition at line 1194 of file isolate.cc.

1194  {
1196  bool can_clear_message = PropagatePendingExceptionToExternalTryCatch();
1197 
1198  HandleScope scope(this);
1199  if (thread_local_top_.pending_exception_ == heap()->termination_exception()) {
1200  // Do nothing: if needed, the exception has been already propagated to
1201  // v8::TryCatch.
1202  } else {
1203  if (thread_local_top_.has_pending_message_) {
1204  thread_local_top_.has_pending_message_ = false;
1205  if (!thread_local_top_.pending_message_obj_->IsTheHole()) {
1206  HandleScope scope(this);
1207  Handle<Object> message_obj(thread_local_top_.pending_message_obj_,
1208  this);
1209  if (!thread_local_top_.pending_message_script_->IsTheHole()) {
1210  Handle<Script> script(
1211  Script::cast(thread_local_top_.pending_message_script_));
1212  int start_pos = thread_local_top_.pending_message_start_pos_;
1213  int end_pos = thread_local_top_.pending_message_end_pos_;
1214  MessageLocation location(script, start_pos, end_pos);
1215  MessageHandler::ReportMessage(this, &location, message_obj);
1216  } else {
1217  MessageHandler::ReportMessage(this, NULL, message_obj);
1218  }
1219  }
1220  }
1221  }
1222  if (can_clear_message) clear_pending_message();
1223 }
static void ReportMessage(Isolate *isolate, MessageLocation *loc, Handle< Object > message)
Definition: messages.cc:77

References clear_pending_message(), DCHECK, has_pending_exception(), heap(), NULL, PropagatePendingExceptionToExternalTryCatch(), v8::internal::MessageHandler::ReportMessage(), and thread_local_top_.

Referenced by v8::ScriptCompiler::Compile(), v8::internal::Compiler::CompileScript(), and v8::internal::Invoke().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RestorePendingMessageFromTryCatch()

void v8::internal::Isolate::RestorePendingMessageFromTryCatch ( v8::TryCatch handler)

Definition at line 871 of file isolate.cc.

871  {
873  DCHECK(handler->HasCaught());
874  DCHECK(handler->rethrow_);
875  DCHECK(handler->capture_message_);
876  Object* message = reinterpret_cast<Object*>(handler->message_obj_);
877  Object* script = reinterpret_cast<Object*>(handler->message_script_);
878  DCHECK(message->IsJSMessageObject() || message->IsTheHole());
879  DCHECK(script->IsScript() || script->IsTheHole());
880  thread_local_top()->pending_message_obj_ = message;
881  thread_local_top()->pending_message_script_ = script;
882  thread_local_top()->pending_message_start_pos_ = handler->message_start_pos_;
883  thread_local_top()->pending_message_end_pos_ = handler->message_end_pos_;
884 }

References DCHECK, handler(), thread_local_top(), and try_catch_handler().

+ Here is the call graph for this function:

◆ RestoreThread()

char * v8::internal::Isolate::RestoreThread ( char *  from)

Definition at line 1380 of file isolate.cc.

1380  {
1381  MemCopy(reinterpret_cast<char*>(thread_local_top()), from,
1382  sizeof(ThreadLocalTop));
1383 // This might be just paranoia, but it seems to be needed in case a
1384 // thread_local_top_ is restored on a separate OS thread.
1385 #ifdef USE_SIMULATOR
1386  thread_local_top()->simulator_ = Simulator::current(this);
1387 #endif
1388  DCHECK(context() == NULL || context()->IsContext());
1389  return from + sizeof(ThreadLocalTop);
1390 }

References context(), DCHECK, v8::internal::MemCopy(), NULL, and thread_local_top().

Referenced by v8::internal::ThreadManager::RestoreThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReThrow()

Object * v8::internal::Isolate::ReThrow ( Object exception)

Definition at line 838 of file isolate.cc.

838  {
839  bool can_be_caught_externally = false;
840  bool catchable_by_javascript = is_catchable_by_javascript(exception);
841  ShouldReportException(&can_be_caught_externally, catchable_by_javascript);
842 
843  thread_local_top()->catcher_ = can_be_caught_externally ?
845 
846  // Set the exception being re-thrown.
847  set_pending_exception(exception);
848  return heap()->exception();
849 }

References heap(), is_catchable_by_javascript(), NULL, set_pending_exception(), ShouldReportException(), thread_local_top(), and try_catch_handler().

Referenced by PromoteScheduledException().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RunMicrotasks()

void v8::internal::Isolate::RunMicrotasks ( )

Definition at line 2299 of file isolate.cc.

2299  {
2300  // %RunMicrotasks may be called in mjsunit tests, which violates
2301  // this assertion, hence the check for --allow-natives-syntax.
2302  // TODO(adamk): However, this also fails some layout tests.
2303  //
2304  // DCHECK(FLAG_allow_natives_syntax ||
2305  // handle_scope_implementer()->CallDepthIsZero());
2306 
2307  // Increase call depth to prevent recursive callbacks.
2309  reinterpret_cast<v8::Isolate*>(this));
2310 
2311  while (pending_microtask_count() > 0) {
2312  HandleScope scope(this);
2313  int num_tasks = pending_microtask_count();
2314  Handle<FixedArray> queue(heap()->microtask_queue(), this);
2315  DCHECK(num_tasks <= queue->length());
2316  set_pending_microtask_count(0);
2317  heap()->set_microtask_queue(heap()->empty_fixed_array());
2318 
2319  for (int i = 0; i < num_tasks; i++) {
2320  HandleScope scope(this);
2321  Handle<Object> microtask(queue->get(i), this);
2322  if (microtask->IsJSFunction()) {
2323  Handle<JSFunction> microtask_function =
2324  Handle<JSFunction>::cast(microtask);
2325  SaveContext save(this);
2326  set_context(microtask_function->context()->native_context());
2327  MaybeHandle<Object> maybe_exception;
2328  MaybeHandle<Object> result =
2329  Execution::TryCall(microtask_function, factory()->undefined_value(),
2330  0, NULL, &maybe_exception);
2331  // If execution is terminating, just bail out.
2332  Handle<Object> exception;
2333  if (result.is_null() && maybe_exception.is_null()) {
2334  // Clear out any remaining callbacks in the queue.
2335  heap()->set_microtask_queue(heap()->empty_fixed_array());
2336  set_pending_microtask_count(0);
2337  return;
2338  }
2339  } else {
2340  Handle<CallHandlerInfo> callback_info =
2341  Handle<CallHandlerInfo>::cast(microtask);
2342  v8::MicrotaskCallback callback =
2343  v8::ToCData<v8::MicrotaskCallback>(callback_info->callback());
2344  void* data = v8::ToCData<void*>(callback_info->data());
2345  callback(data);
2346  }
2347  }
2348  }
2349 }
void set_context(Context *context)
Definition: isolate.h:549
void(* MicrotaskCallback)(void *data)
Definition: v8.h:4179

References v8::internal::Handle< T >::cast(), DCHECK, factory(), heap(), v8::internal::MaybeHandle< T >::is_null(), NULL, and set_context().

Referenced by FireCallCompletedCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ runtime_profiler()

RuntimeProfiler* v8::internal::Isolate::runtime_profiler ( )
inline

Definition at line 864 of file isolate.h.

864 { return runtime_profiler_; }

References runtime_profiler_.

Referenced by v8::internal::IC::OnTypeFeedbackChanged().

+ Here is the caller graph for this function:

◆ runtime_state()

RuntimeState* v8::internal::Isolate::runtime_state ( )
inline

Definition at line 945 of file isolate.h.

945 { return &runtime_state_; }
RuntimeState runtime_state_
Definition: isolate.h:1259

References runtime_state_.

Referenced by v8::internal::ConvertCaseHelper().

+ Here is the caller graph for this function:

◆ runtime_zone()

Zone* v8::internal::Isolate::runtime_zone ( )
inline

Definition at line 905 of file isolate.h.

905 { return &runtime_zone_; }

References runtime_zone_.

Referenced by v8::internal::StringReplaceGlobalAtomRegExpWithString(), and v8::internal::StringReplaceGlobalRegExpWithString().

+ Here is the caller graph for this function:

◆ scheduled_exception()

Object* v8::internal::Isolate::scheduled_exception ( )
inline

Definition at line 622 of file isolate.h.

622  {
624  DCHECK(!thread_local_top_.scheduled_exception_->IsException());
625  return thread_local_top_.scheduled_exception_;
626  }

References DCHECK, has_scheduled_exception(), and thread_local_top_.

Referenced by CancelScheduledExceptionFromTryCatch(), CancelTerminateExecution(), v8::IsExecutionTerminatingCheck(), v8::internal::Debug::OnThrow(), and PromoteScheduledException().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scheduled_exception_address()

Object** v8::internal::Isolate::scheduled_exception_address ( )
inline

Definition at line 605 of file isolate.h.

605  {
606  return &thread_local_top_.scheduled_exception_;
607  }

References thread_local_top_.

◆ ScheduleThrow()

void v8::internal::Isolate::ScheduleThrow ( Object exception)

Definition at line 858 of file isolate.cc.

858  {
859  // When scheduling a throw we first throw the exception to get the
860  // error reporting if it is uncaught before rescheduling it.
861  Throw(exception);
863  if (has_pending_exception()) {
864  thread_local_top()->scheduled_exception_ = pending_exception();
865  thread_local_top()->external_caught_exception_ = false;
867  }
868 }
Object * Throw(Object *exception, MessageLocation *location=NULL)
Definition: isolate.cc:832

References clear_pending_exception(), has_pending_exception(), pending_exception(), PropagatePendingExceptionToExternalTryCatch(), thread_local_top(), and Throw().

Referenced by v8::internal::ModuleGetExport(), v8::internal::ModuleSetExport(), ReportFailedAccessCheck(), and v8::Isolate::ThrowException().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serializer_enabled()

bool v8::internal::Isolate::serializer_enabled ( ) const
inline

Definition at line 1007 of file isolate.h.

1007 { return serializer_enabled_; }

References serializer_enabled_.

Referenced by Init(), v8::internal::SerializerDeserializer::Iterate(), v8::internal::NoTrackDoubleFieldsForSerializerScope::NoTrackDoubleFieldsForSerializerScope(), v8::internal::IncrementalMarking::Start(), v8::internal::JSFunction::StartInobjectSlackTracking(), and v8::internal::IncrementalMarking::WorthActivating().

+ Here is the caller graph for this function:

◆ set_context()

void v8::internal::Isolate::set_context ( Context context)
inline

Definition at line 549 of file isolate.h.

549  {
550  DCHECK(context == NULL || context->IsContext());
551  thread_local_top_.context_ = context;
552  }

References context(), DCHECK, NULL, and thread_local_top_.

Referenced by v8::Context::Enter(), v8::Context::Exit(), v8::internal::Debug::Load(), and RunMicrotasks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_date_cache()

void v8::internal::Isolate::set_date_cache ( DateCache date_cache)
inline

Definition at line 1024 of file isolate.h.

1024  {
1025  if (date_cache != date_cache_) {
1026  delete date_cache_;
1027  }
1029  }
DateCache * date_cache()
Definition: isolate.h:1020

References date_cache(), and date_cache_.

+ Here is the call graph for this function:

◆ set_function_entry_hook()

void v8::internal::Isolate::set_function_entry_hook ( FunctionEntryHook  function_entry_hook)
inline

Definition at line 1079 of file isolate.h.

1079  {
1081  }

References function_entry_hook(), and function_entry_hook_.

Referenced by v8::Isolate::New().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_pending_exception()

void v8::internal::Isolate::set_pending_exception ( Object exception_obj)
inline

Definition at line 567 of file isolate.h.

567  {
568  DCHECK(!exception_obj->IsException());
569  thread_local_top_.pending_exception_ = exception_obj;
570  }

References DCHECK, and thread_local_top_.

Referenced by v8::internal::Debug::CompileDebuggerScript(), DoThrow(), ReThrow(), and v8::internal::Isolate::ExceptionScope::~ExceptionScope().

+ Here is the caller graph for this function:

◆ SetCaptureStackTraceForUncaughtExceptions()

void v8::internal::Isolate::SetCaptureStackTraceForUncaughtExceptions ( bool  capture,
int  frame_limit,
StackTrace::StackTraceOptions  options 
)

◆ SetData()

void v8::internal::Isolate::SetData ( uint32_t  slot,
void *  data 
)
inline

Definition at line 990 of file isolate.h.

990  {
992  embedder_data_[slot] = data;
993  }

References DCHECK, embedder_data_, and v8::internal::Internals::kNumIsolateDataSlots.

◆ SetFailedAccessCheckCallback()

void v8::internal::Isolate::SetFailedAccessCheckCallback ( v8::FailedAccessCheckCallback  callback)

Definition at line 615 of file isolate.cc.

616  {
617  thread_local_top()->failed_access_check_callback_ = callback;
618 }

References thread_local_top().

Referenced by v8::V8::SetFailedAccessCheckCallbackFunction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetIsolateThreadLocals()

void v8::internal::Isolate::SetIsolateThreadLocals ( Isolate isolate,
PerIsolateThreadData data 
)
staticprivate

Definition at line 1676 of file isolate.cc.

1677  {
1680 }
static void SetThreadLocal(LocalStorageKey key, void *value)

References isolate_key_, per_isolate_thread_data_key_, and v8::base::Thread::SetThreadLocal().

Referenced by Enter(), Exit(), v8::internal::SweeperThread::Run(), v8::internal::OptimizingCompilerThread::Run(), and TearDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetUseCounterCallback()

void v8::internal::Isolate::SetUseCounterCallback ( v8::Isolate::UseCounterCallback  callback)

Definition at line 2352 of file isolate.cc.

2352  {
2354  use_counter_callback_ = callback;
2355 }

References DCHECK, and use_counter_callback_.

◆ ShouldReportException()

bool v8::internal::Isolate::ShouldReportException ( bool can_be_caught_externally,
bool  catchable_by_javascript 
)

Definition at line 950 of file isolate.cc.

951  {
952  // Find the top-most try-catch handler.
953  StackHandler* handler =
954  StackHandler::FromAddress(Isolate::handler(thread_local_top()));
955  while (handler != NULL && !handler->is_catch()) {
956  handler = handler->next();
957  }
958 
959  // Get the address of the external handler so we can compare the address to
960  // determine which one is closer to the top of the stack.
961  Address external_handler_address =
962  thread_local_top()->try_catch_handler_address();
963 
964  // The exception has been externally caught if and only if there is
965  // an external handler which is on top of the top-most try-catch
966  // handler.
967  *can_be_caught_externally = external_handler_address != NULL &&
968  (handler == NULL || handler->address() > external_handler_address ||
969  !catchable_by_javascript);
970 
971  if (*can_be_caught_externally) {
972  // Only report the exception if the external handler is verbose.
973  return try_catch_handler()->is_verbose_;
974  } else {
975  // Report the exception if it isn't caught by JavaScript code.
976  return handler == NULL;
977  }
978 }
bool is_verbose_
Definition: v8.h:5408

References handler(), v8::TryCatch::is_verbose_, NULL, thread_local_top(), and try_catch_handler().

Referenced by DoThrow(), and ReThrow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SignalFatalError()

void v8::internal::Isolate::SignalFatalError ( )
inline

Definition at line 1010 of file isolate.h.

1010 { has_fatal_error_ = true; }

References has_fatal_error_.

Referenced by v8::Utils::ReportApiFailure().

+ Here is the caller graph for this function:

◆ stack_guard()

◆ StackOverflow()

Object * v8::internal::Isolate::StackOverflow ( )

Definition at line 773 of file isolate.cc.

773  {
774  HandleScope scope(this);
775  // At this point we cannot create an Error object using its javascript
776  // constructor. Instead, we copy the pre-constructed boilerplate and
777  // attach the stack trace as a hidden property.
778  Handle<String> key = factory()->stack_overflow_string();
779  Handle<JSObject> boilerplate = Handle<JSObject>::cast(
780  Object::GetProperty(js_builtins_object(), key).ToHandleChecked());
781  Handle<JSObject> exception = factory()->CopyJSObject(boilerplate);
782  DoThrow(*exception, NULL);
783 
784  CaptureAndSetSimpleStackTrace(exception, factory()->undefined_value());
785  return heap()->exception();
786 }
void CaptureAndSetSimpleStackTrace(Handle< JSObject > error_object, Handle< Object > caller)
Definition: isolate.cc:430
void DoThrow(Object *exception, MessageLocation *location)
Definition: isolate.cc:1003

References CaptureAndSetSimpleStackTrace(), v8::internal::Handle< T >::cast(), DoThrow(), factory(), v8::internal::Object::GetProperty(), heap(), js_builtins_object(), and NULL.

Referenced by v8::internal::CompileUnoptimizedCode(), v8::internal::NativeRegExpMacroAssembler::Execute(), v8::internal::Parser::Internalize(), v8::internal::RegExpImpl::IrregexpExecRaw(), and v8::internal::JSObjectWalkVisitor< ContextObject >::StructureWalk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StackTraceString()

Handle< String > v8::internal::Isolate::StackTraceString ( )

Definition at line 256 of file isolate.cc.

256  {
257  if (stack_trace_nesting_level_ == 0) {
259  HeapStringAllocator allocator;
260  StringStream::ClearMentionedObjectCache(this);
261  StringStream accumulator(&allocator);
262  incomplete_message_ = &accumulator;
263  PrintStack(&accumulator);
264  Handle<String> stack_trace = accumulator.ToString(this);
267  return stack_trace;
268  } else if (stack_trace_nesting_level_ == 1) {
271  "\n\nAttempt to print stack while printing stack (double fault)\n");
273  "If you are lucky you may find a partial stack dump on stdout.\n\n");
274  incomplete_message_->OutputToStdOut();
275  return factory()->empty_string();
276  } else {
277  base::OS::Abort();
278  // Unreachable
279  return factory()->empty_string();
280  }
281 }

References v8::base::OS::Abort(), factory(), incomplete_message_, NULL, v8::base::OS::PrintError(), PrintStack(), and stack_trace_nesting_level_.

+ Here is the call graph for this function:

◆ stats_table()

StatsTable * v8::internal::Isolate::stats_table ( )

Definition at line 2039 of file isolate.cc.

2039  {
2040  if (stats_table_ == NULL) {
2041  stats_table_ = new StatsTable;
2042  }
2043  return stats_table_;
2044 }

References NULL, and stats_table_.

Referenced by v8::internal::Histogram::AddSample(), v8::internal::Histogram::CreateHistogram(), v8::internal::StatsCounter::FindLocationInStatsTable(), v8::internal::CompilationCacheScript::Lookup(), v8::Isolate::SetCounterFunction(), and v8::Isolate::SetCreateHistogramFunction().

+ Here is the caller graph for this function:

◆ stress_deopt_count_address()

void* v8::internal::Isolate::stress_deopt_count_address ( )
inline

Definition at line 1083 of file isolate.h.

1083 { return &stress_deopt_count_; }

References stress_deopt_count_.

◆ string_tracker()

StringTracker* v8::internal::Isolate::string_tracker ( )
inline

Definition at line 923 of file isolate.h.

923 { return string_tracker_; }

References string_tracker_.

Referenced by v8::String::CanMakeExternal(), v8::String::MakeExternal(), and v8::WriteHelper().

+ Here is the caller graph for this function:

◆ stub_cache()

StubCache* v8::internal::Isolate::stub_cache ( )
inline

Definition at line 875 of file isolate.h.

875 { return stub_cache_; }

References stub_cache_.

Referenced by v8::internal::TypeFeedbackOracle::CollectReceiverTypes(), v8::internal::IC::ComputeHandler(), v8::internal::MarkCompactCollector::Finish(), v8::internal::ExternalReferenceTable::PopulateTable(), and v8::internal::IC::UpdateMegamorphicCache().

+ Here is the caller graph for this function:

◆ sweeper_threads()

SweeperThread** v8::internal::Isolate::sweeper_threads ( )
inline

Definition at line 1067 of file isolate.h.

1067  {
1068  return sweeper_thread_;
1069  }

References sweeper_thread_.

Referenced by v8::internal::MarkCompactCollector::AreSweeperThreadsActivated(), v8::internal::MarkCompactCollector::EnsureSweepingCompleted(), v8::internal::MarkCompactCollector::IsSweepingCompleted(), and v8::internal::MarkCompactCollector::StartSweeperThreads().

+ Here is the caller graph for this function:

◆ TearDown()

void v8::internal::Isolate::TearDown ( )

Definition at line 1555 of file isolate.cc.

1555  {
1556  TRACE_ISOLATE(tear_down);
1557 
1558  // Temporarily set this isolate as current so that various parts of
1559  // the isolate can access it in their destructors without having a
1560  // direct pointer. We don't use Enter/Exit here to avoid
1561  // initializing the thread data.
1562  PerIsolateThreadData* saved_data = CurrentPerIsolateThreadData();
1563  Isolate* saved_isolate = UncheckedCurrent();
1565 
1566  Deinit();
1567 
1568  {
1569  base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
1571  }
1572 
1573  if (serialize_partial_snapshot_cache_ != NULL) {
1574  delete[] serialize_partial_snapshot_cache_;
1575  serialize_partial_snapshot_cache_ = NULL;
1576  }
1577 
1578  delete this;
1579 
1580  // Restore the previous current isolate.
1581  SetIsolateThreadLocals(saved_isolate, saved_data);
1582 }
void RemoveAllThreads(Isolate *isolate)
Definition: isolate.cc:1438

References CurrentPerIsolateThreadData(), Deinit(), NULL, v8::base::LazyInstanceImpl< T, AllocationTrait, CreateTrait, InitOnceTrait, DestroyTrait >::Pointer(), v8::internal::Isolate::ThreadDataTable::RemoveAllThreads(), SetIsolateThreadLocals(), thread_data_table_, thread_data_table_mutex_, and TRACE_ISOLATE.

Referenced by v8::Isolate::Dispose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TerminateExecution()

Object * v8::internal::Isolate::TerminateExecution ( )

Definition at line 789 of file isolate.cc.

789  {
790  DoThrow(heap_.termination_exception(), NULL);
791  return heap()->exception();
792 }

References DoThrow(), heap(), heap_, and NULL.

+ Here is the call graph for this function:

◆ thread_id_key()

static base::Thread::LocalStorageKey v8::internal::Isolate::thread_id_key ( )
inlinestatic

Definition at line 536 of file isolate.h.

536  {
537  return thread_id_key_;
538  }

References thread_id_key_.

◆ thread_local_top()

◆ thread_manager()

◆ Throw() [1/2]

template<typename T >
MUST_USE_RESULT MaybeHandle<T> v8::internal::Isolate::Throw ( Handle< Object exception,
MessageLocation location = NULL 
)
inline

Definition at line 759 of file isolate.h.

760  {
761  Throw(*exception, location);
762  return MaybeHandle<T>();
763  }

References Throw().

+ Here is the call graph for this function:

◆ Throw() [2/2]

Object * v8::internal::Isolate::Throw ( Object exception,
MessageLocation location = NULL 
)

Definition at line 832 of file isolate.cc.

832  {
833  DoThrow(exception, location);
834  return heap()->exception();
835 }

References DoThrow(), and heap().

Referenced by v8::internal::CompileGlobalEval(), v8::internal::CreateRegExpErrorObjectAndThrow(), v8::internal::LiveEdit::GatherCompileInfo(), v8::internal::LoadLookupSlotHelper(), v8::internal::Scope::ResolveVariable(), ScheduleThrow(), Throw(), ThrowIllegalOperation(), and v8::internal::Parser::ThrowPendingError().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ThrowIllegalOperation()

Object * v8::internal::Isolate::ThrowIllegalOperation ( )

Definition at line 852 of file isolate.cc.

852  {
853  if (FLAG_stack_trace_on_illegal) PrintStack(stdout);
854  return Throw(heap_.illegal_access_string());
855 }

References heap_, PrintStack(), and Throw().

Referenced by v8::internal::Invoke(), v8::internal::LoadLookupSlotHelper(), and v8::internal::TransitionElements().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ time_millis_since_init()

double v8::internal::Isolate::time_millis_since_init ( )
inline

Definition at line 1016 of file isolate.h.

1016  {
1018  }

References time_millis_at_init_, and v8::base::OS::TimeCurrentMillis().

Referenced by v8::internal::GCTracer::Print(), and v8::internal::GCTracer::PrintNVP().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ try_catch_handler()

v8::TryCatch* v8::internal::Isolate::try_catch_handler ( )
inline

Definition at line 593 of file isolate.h.

593  {
594  return thread_local_top_.try_catch_handler();
595  }

References thread_local_top_.

Referenced by CancelTerminateExecution(), DoThrow(), v8::internal::ThreadManager::FreeThreadResources(), HasExternalTryCatch(), PropagatePendingExceptionToExternalTryCatch(), RestorePendingMessageFromTryCatch(), ReThrow(), ShouldReportException(), and UnregisterTryCatchHandler().

+ Here is the caller graph for this function:

◆ try_catch_handler_address()

Address v8::internal::Isolate::try_catch_handler_address ( )
inline

Definition at line 596 of file isolate.h.

596  {
597  return thread_local_top_.try_catch_handler_address();
598  }

References thread_local_top_.

Referenced by OptionalRescheduleException().

+ Here is the caller graph for this function:

◆ unicode_cache()

UnicodeCache* v8::internal::Isolate::unicode_cache ( )
inline

Definition at line 907 of file isolate.h.

907  {
908  return unicode_cache_;
909  }

References unicode_cache_.

Referenced by v8::internal::Parser::Parse().

+ Here is the caller graph for this function:

◆ UnlinkDeferredHandles()

void v8::internal::Isolate::UnlinkDeferredHandles ( DeferredHandles deferred_handles)

Definition at line 2115 of file isolate.cc.

2115  {
2116 #ifdef DEBUG
2117  // In debug mode assert that the linked list is well-formed.
2118  DeferredHandles* deferred_iterator = deferred;
2119  while (deferred_iterator->previous_ != NULL) {
2120  deferred_iterator = deferred_iterator->previous_;
2121  }
2122  DCHECK(deferred_handles_head_ == deferred_iterator);
2123 #endif
2124  if (deferred_handles_head_ == deferred) {
2126  }
2127  if (deferred->next_ != NULL) {
2128  deferred->next_->previous_ = deferred->previous_;
2129  }
2130  if (deferred->previous_ != NULL) {
2131  deferred->previous_->next_ = deferred->next_;
2132  }
2133 }
DeferredHandles * next_
Definition: api.h:473

References DCHECK, deferred_handles_head_, v8::internal::DeferredHandles::next_, NULL, and v8::internal::DeferredHandles::previous_.

◆ UnregisterTryCatchHandler()

void v8::internal::Isolate::UnregisterTryCatchHandler ( v8::TryCatch that)

Definition at line 249 of file isolate.cc.

249  {
251  thread_local_top()->set_try_catch_handler(that->next_);
252  thread_local_top()->catcher_ = NULL;
253 }
v8::TryCatch * next_
Definition: v8.h:5401

References DCHECK, v8::TryCatch::next_, NULL, thread_local_top(), and try_catch_handler().

+ Here is the call graph for this function:

◆ use_crankshaft()

bool v8::internal::Isolate::use_crankshaft ( ) const

Definition at line 2174 of file isolate.cc.

2174  {
2175  return FLAG_crankshaft &&
2178 }

References serializer_enabled_, and v8::internal::CpuFeatures::SupportsCrankshaft().

Referenced by v8::internal::Compiler::GetLazyCode(), and v8::internal::IsSuitableForOnStackReplacement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write_iterator()

ConsStringIteratorOp* v8::internal::Isolate::write_iterator ( )
inline

Definition at line 915 of file isolate.h.

915 { return write_iterator_; }

References write_iterator_.

Friends And Related Function Documentation

◆ ExecutionAccess

friend class ExecutionAccess
friend

Definition at line 1336 of file isolate.h.

Referenced by Init(), and InvokeApiInterruptCallback().

◆ GlobalState

friend struct GlobalState
friend

Definition at line 1119 of file isolate.h.

◆ HandleScopeImplementer

friend class HandleScopeImplementer
friend

Definition at line 1337 of file isolate.h.

Referenced by Init().

◆ InitializeGlobalState

friend struct InitializeGlobalState
friend

Definition at line 1120 of file isolate.h.

◆ IsolateInitializer

friend class IsolateInitializer
friend

Definition at line 1338 of file isolate.h.

◆ OptimizingCompilerThread

friend class OptimizingCompilerThread
friend

Definition at line 1339 of file isolate.h.

Referenced by Init().

◆ Simulator

friend class Simulator
friend

Definition at line 1342 of file isolate.h.

◆ StackGuard

friend class StackGuard
friend

Definition at line 1343 of file isolate.h.

◆ SweeperThread

friend class SweeperThread
friend

Definition at line 1340 of file isolate.h.

Referenced by Init().

◆ TestCodeRangeScope

friend class TestCodeRangeScope
friend

Definition at line 1346 of file isolate.h.

◆ TestMemoryAllocatorScope

friend class TestMemoryAllocatorScope
friend

Definition at line 1345 of file isolate.h.

◆ ThreadId

friend class ThreadId
friend

Definition at line 1344 of file isolate.h.

◆ ThreadManager

friend class ThreadManager
friend

Definition at line 1341 of file isolate.h.

Referenced by Isolate().

◆ v8::Isolate

friend class v8::Isolate
friend

Definition at line 1347 of file isolate.h.

◆ v8::Locker

friend class v8::Locker
friend

Definition at line 1348 of file isolate.h.

◆ v8::Unlocker

friend class v8::Unlocker
friend

Definition at line 1349 of file isolate.h.

Member Data Documentation

◆ basic_block_profiler_

BasicBlockProfiler* v8::internal::Isolate::basic_block_profiler_
private

Definition at line 1334 of file isolate.h.

Referenced by basic_block_profiler(), Deinit(), and GetOrCreateBasicBlockProfiler().

◆ bootstrapper_

Bootstrapper* v8::internal::Isolate::bootstrapper_
private

Definition at line 1228 of file isolate.h.

Referenced by bootstrapper(), Deinit(), Init(), and ~Isolate().

◆ break_access_

base::RecursiveMutex v8::internal::Isolate::break_access_
private

Definition at line 1233 of file isolate.h.

Referenced by break_access().

◆ builtins_

Builtins v8::internal::Isolate::builtins_
private

Definition at line 1260 of file isolate.h.

Referenced by builtins(), Deinit(), and Init().

◆ call_completed_callbacks_

List<CallCompletedCallback> v8::internal::Isolate::call_completed_callbacks_
private

◆ call_descriptor_data_

CallInterfaceDescriptorData* v8::internal::Isolate::call_descriptor_data_
private

Definition at line 1273 of file isolate.h.

Referenced by call_descriptor_data(), Init(), and ~Isolate().

◆ capture_stack_trace_for_uncaught_exceptions_

bool v8::internal::Isolate::capture_stack_trace_for_uncaught_exceptions_
private

◆ code_aging_helper_

CodeAgingHelper* v8::internal::Isolate::code_aging_helper_
private

Definition at line 1239 of file isolate.h.

Referenced by code_aging_helper(), Init(), and ~Isolate().

◆ code_range_

CodeRange* v8::internal::Isolate::code_range_
private

Definition at line 1232 of file isolate.h.

Referenced by code_range(), Init(), and ~Isolate().

◆ compilation_cache_

CompilationCache* v8::internal::Isolate::compilation_cache_
private

Definition at line 1230 of file isolate.h.

Referenced by compilation_cache(), Init(), and ~Isolate().

◆ context_slot_cache_

ContextSlotCache* v8::internal::Isolate::context_slot_cache_
private

Definition at line 1248 of file isolate.h.

Referenced by context_slot_cache(), Init(), and ~Isolate().

◆ counters_

Counters* v8::internal::Isolate::counters_
private

Definition at line 1231 of file isolate.h.

Referenced by counters(), InitializeLoggingAndCounters(), and ~Isolate().

◆ cpu_profiler_

CpuProfiler* v8::internal::Isolate::cpu_profiler_
private

Definition at line 1295 of file isolate.h.

Referenced by cpu_profiler(), Deinit(), and Init().

◆ date_cache_

DateCache* v8::internal::Isolate::date_cache_
private

Definition at line 1271 of file isolate.h.

Referenced by date_cache(), Init(), set_date_cache(), and ~Isolate().

◆ debug_

Debug* v8::internal::Isolate::debug_
private

Definition at line 1294 of file isolate.h.

Referenced by debug(), GetCallingNativeContext(), Isolate(), and ~Isolate().

◆ debugger_initialized_

base::Atomic32 v8::internal::Isolate::debugger_initialized_
private

Definition at line 1234 of file isolate.h.

◆ deferred_handles_head_

DeferredHandles* v8::internal::Isolate::deferred_handles_head_
private

Definition at line 1320 of file isolate.h.

Referenced by IterateDeferredHandles(), LinkDeferredHandles(), and UnlinkDeferredHandles().

◆ deoptimizer_data_

DeoptimizerData* v8::internal::Isolate::deoptimizer_data_
private

Definition at line 1240 of file isolate.h.

Referenced by Deinit(), deoptimizer_data(), and Init().

◆ descriptor_lookup_cache_

DescriptorLookupCache* v8::internal::Isolate::descriptor_lookup_cache_
private

Definition at line 1249 of file isolate.h.

Referenced by descriptor_lookup_cache(), Init(), and ~Isolate().

◆ embedder_data_

void* v8::internal::Isolate::embedder_data_[Internals::kNumIsolateDataSlots]
private

Definition at line 1130 of file isolate.h.

Referenced by GetData(), Init(), and SetData().

◆ entry_stack_

EntryStackItem* v8::internal::Isolate::entry_stack_
private

Definition at line 1224 of file isolate.h.

Referenced by Enter(), Exit(), IsInUse(), and ~Isolate().

◆ eternal_handles_

EternalHandles* v8::internal::Isolate::eternal_handles_
private

Definition at line 1257 of file isolate.h.

Referenced by eternal_handles(), Init(), and ~Isolate().

◆ function_entry_hook_

FunctionEntryHook v8::internal::Isolate::function_entry_hook_
private

Definition at line 1297 of file isolate.h.

Referenced by function_entry_hook(), and set_function_entry_hook().

◆ global_handles_

GlobalHandles* v8::internal::Isolate::global_handles_
private

Definition at line 1256 of file isolate.h.

Referenced by global_handles(), Init(), and ~Isolate().

◆ handle_scope_data_

HandleScopeData v8::internal::Isolate::handle_scope_data_
private

Definition at line 1250 of file isolate.h.

Referenced by handle_scope_data(), and Isolate().

◆ handle_scope_implementer_

HandleScopeImplementer* v8::internal::Isolate::handle_scope_implementer_
private

Definition at line 1251 of file isolate.h.

Referenced by handle_scope_implementer(), Init(), and ~Isolate().

◆ has_fatal_error_

bool v8::internal::Isolate::has_fatal_error_
private

Definition at line 1280 of file isolate.h.

Referenced by Init(), IsDead(), and SignalFatalError().

◆ has_installed_extensions_

bool v8::internal::Isolate::has_installed_extensions_
private

Definition at line 1261 of file isolate.h.

Referenced by has_installed_extensions(), and NotifyExtensionInstalled().

◆ heap_

◆ heap_profiler_

HeapProfiler* v8::internal::Isolate::heap_profiler_
private

Definition at line 1296 of file isolate.h.

Referenced by Deinit(), heap_profiler(), and Init().

◆ id_

base::Atomic32 v8::internal::Isolate::id_
private

Definition at line 1223 of file isolate.h.

Referenced by id(), and Isolate().

◆ incomplete_message_

StringStream* v8::internal::Isolate::incomplete_message_
private

Definition at line 1226 of file isolate.h.

Referenced by PrintStack(), and StackTraceString().

◆ initialized_from_snapshot_

bool v8::internal::Isolate::initialized_from_snapshot_
private

Definition at line 1283 of file isolate.h.

Referenced by Init(), and initialized_from_snapshot().

◆ inner_pointer_to_code_cache_

InnerPointerToCodeCache* v8::internal::Isolate::inner_pointer_to_code_cache_
private

Definition at line 1254 of file isolate.h.

Referenced by Init(), inner_pointer_to_code_cache(), and ~Isolate().

◆ interp_canonicalize_mapping_

unibrow::Mapping<unibrow::Ecma262Canonicalize> v8::internal::Isolate::interp_canonicalize_mapping_
private

Definition at line 1272 of file isolate.h.

Referenced by interp_canonicalize_mapping().

◆ isolate_addresses_

Address v8::internal::Isolate::isolate_addresses_[kIsolateAddressCount+1]
private

Definition at line 1227 of file isolate.h.

Referenced by get_address_from_id(), and Isolate().

◆ isolate_counter_

base::Atomic32 v8::internal::Isolate::isolate_counter_ = 0
staticprivate

Definition at line 1183 of file isolate.h.

Referenced by Isolate().

◆ isolate_key_

base::Thread::LocalStorageKey v8::internal::Isolate::isolate_key_
staticprivate

Definition at line 1178 of file isolate.h.

Referenced by InitializeOncePerProcess(), INLINE(), isolate_key(), and SetIsolateThreadLocals().

◆ jsregexp_canonrange_

unibrow::Mapping<unibrow::CanonicalizationRange> v8::internal::Isolate::jsregexp_canonrange_
private

Definition at line 1264 of file isolate.h.

Referenced by jsregexp_canonrange().

◆ jsregexp_uncanonicalize_

unibrow::Mapping<unibrow::Ecma262UnCanonicalize> v8::internal::Isolate::jsregexp_uncanonicalize_
private

Definition at line 1263 of file isolate.h.

Referenced by jsregexp_uncanonicalize().

◆ kBMMaxShift

const int v8::internal::Isolate::kBMMaxShift = 250
static

Definition at line 823 of file isolate.h.

◆ keyed_lookup_cache_

KeyedLookupCache* v8::internal::Isolate::keyed_lookup_cache_
private

Definition at line 1247 of file isolate.h.

Referenced by Init(), keyed_lookup_cache(), and ~Isolate().

◆ kJSRegexpStaticOffsetsVectorSize

const int v8::internal::Isolate::kJSRegexpStaticOffsetsVectorSize = 128
static

◆ kStackOverflowMessage

const char *const v8::internal::Isolate::kStackOverflowMessage
static
Initial value:
=
"Uncaught RangeError: Maximum call stack size exceeded"

Definition at line 820 of file isolate.h.

◆ kUC16AlphabetSize

const int v8::internal::Isolate::kUC16AlphabetSize = 256
static

Definition at line 822 of file isolate.h.

◆ logger_

Logger* v8::internal::Isolate::logger_
private

Definition at line 1235 of file isolate.h.

Referenced by Deinit(), Init(), InitializeLoggingAndCounters(), logger(), and ~Isolate().

◆ materialized_object_store_

MaterializedObjectStore* v8::internal::Isolate::materialized_object_store_
private

Definition at line 1241 of file isolate.h.

Referenced by Init(), materialized_object_store(), and ~Isolate().

◆ memory_allocator_

MemoryAllocator* v8::internal::Isolate::memory_allocator_
private

Definition at line 1246 of file isolate.h.

Referenced by Init(), memory_allocator(), and ~Isolate().

◆ next_optimization_id_

int v8::internal::Isolate::next_optimization_id_
private

Definition at line 1328 of file isolate.h.

Referenced by NextOptimizationId().

◆ num_sweeper_threads_

int v8::internal::Isolate::num_sweeper_threads_
private

Definition at line 1323 of file isolate.h.

Referenced by Deinit(), Init(), and num_sweeper_threads().

◆ objects_string_compare_iterator_a_

ConsStringIteratorOp v8::internal::Isolate::objects_string_compare_iterator_a_
private

Definition at line 1265 of file isolate.h.

Referenced by objects_string_compare_iterator_a().

◆ objects_string_compare_iterator_b_

ConsStringIteratorOp v8::internal::Isolate::objects_string_compare_iterator_b_
private

Definition at line 1266 of file isolate.h.

Referenced by objects_string_compare_iterator_b().

◆ objects_string_iterator_

StaticResource<ConsStringIteratorOp> v8::internal::Isolate::objects_string_iterator_
private

Definition at line 1267 of file isolate.h.

Referenced by objects_string_iterator().

◆ optimizing_compiler_thread_

OptimizingCompilerThread* v8::internal::Isolate::optimizing_compiler_thread_
private

◆ per_isolate_thread_data_key_

base::Thread::LocalStorageKey v8::internal::Isolate::per_isolate_thread_data_key_
staticprivate

◆ random_number_generator_

base::RandomNumberGenerator* v8::internal::Isolate::random_number_generator_
private

Definition at line 1274 of file isolate.h.

Referenced by ~Isolate().

◆ regexp_macro_assembler_canonicalize_

unibrow::Mapping<unibrow::Ecma262Canonicalize> v8::internal::Isolate::regexp_macro_assembler_canonicalize_
private

Definition at line 1269 of file isolate.h.

Referenced by regexp_macro_assembler_canonicalize().

◆ regexp_stack_

RegExpStack* v8::internal::Isolate::regexp_stack_
private

Definition at line 1270 of file isolate.h.

Referenced by Init(), regexp_stack(), and ~Isolate().

◆ runtime_profiler_

RuntimeProfiler* v8::internal::Isolate::runtime_profiler_
private

Definition at line 1229 of file isolate.h.

Referenced by Deinit(), Init(), and runtime_profiler().

◆ runtime_state_

RuntimeState v8::internal::Isolate::runtime_state_
private

Definition at line 1259 of file isolate.h.

Referenced by runtime_state().

◆ runtime_zone_

Zone v8::internal::Isolate::runtime_zone_
private

Definition at line 1253 of file isolate.h.

Referenced by runtime_zone(), and ~Isolate().

◆ serializer_enabled_

bool v8::internal::Isolate::serializer_enabled_
private

Definition at line 1277 of file isolate.h.

Referenced by enable_serializer(), serializer_enabled(), and use_crankshaft().

◆ stack_guard_

StackGuard v8::internal::Isolate::stack_guard_
private

Definition at line 1236 of file isolate.h.

Referenced by Init(), Isolate(), and stack_guard().

◆ stack_trace_for_uncaught_exceptions_frame_limit_

int v8::internal::Isolate::stack_trace_for_uncaught_exceptions_frame_limit_
private

◆ stack_trace_for_uncaught_exceptions_options_

StackTrace::StackTraceOptions v8::internal::Isolate::stack_trace_for_uncaught_exceptions_options_
private

◆ stack_trace_nesting_level_

int v8::internal::Isolate::stack_trace_nesting_level_
private

Definition at line 1225 of file isolate.h.

Referenced by PrintStack(), and StackTraceString().

◆ state_

State v8::internal::Isolate::state_
private

Definition at line 1132 of file isolate.h.

Referenced by Deinit(), enable_serializer(), Init(), and IsInitialized().

◆ stats_table_

StatsTable* v8::internal::Isolate::stats_table_
private

Definition at line 1237 of file isolate.h.

Referenced by stats_table(), and ~Isolate().

◆ stress_deopt_count_

unsigned int v8::internal::Isolate::stress_deopt_count_
private

Definition at line 1326 of file isolate.h.

Referenced by Deinit(), Init(), and stress_deopt_count_address().

◆ string_tracker_

StringTracker* v8::internal::Isolate::string_tracker_
private

Definition at line 1262 of file isolate.h.

Referenced by Init(), string_tracker(), and ~Isolate().

◆ stub_cache_

StubCache* v8::internal::Isolate::stub_cache_
private

Definition at line 1238 of file isolate.h.

Referenced by Init(), stub_cache(), and ~Isolate().

◆ sweeper_thread_

SweeperThread** v8::internal::Isolate::sweeper_thread_
private

Definition at line 1322 of file isolate.h.

Referenced by Deinit(), Init(), and sweeper_threads().

◆ thread_data_table_

Isolate::ThreadDataTable * v8::internal::Isolate::thread_data_table_ = NULL
staticprivate

◆ thread_data_table_mutex_

base::LazyMutex v8::internal::Isolate::thread_data_table_mutex_ = LAZY_MUTEX_INITIALIZER
staticprivate

◆ thread_id_key_

base::Thread::LocalStorageKey v8::internal::Isolate::thread_id_key_
staticprivate

◆ thread_local_top_

◆ thread_manager_

ThreadManager* v8::internal::Isolate::thread_manager_
private

Definition at line 1258 of file isolate.h.

Referenced by Isolate(), thread_manager(), and ~Isolate().

◆ time_millis_at_init_

double v8::internal::Isolate::time_millis_at_init_
private

Definition at line 1286 of file isolate.h.

Referenced by Init(), and time_millis_since_init().

◆ unicode_cache_

UnicodeCache* v8::internal::Isolate::unicode_cache_
private

Definition at line 1252 of file isolate.h.

Referenced by Init(), unicode_cache(), and ~Isolate().

◆ use_counter_callback_

v8::Isolate::UseCounterCallback v8::internal::Isolate::use_counter_callback_
private

Definition at line 1333 of file isolate.h.

Referenced by CountUsage(), and SetUseCounterCallback().

◆ write_iterator_

ConsStringIteratorOp* v8::internal::Isolate::write_iterator_
private

Definition at line 1255 of file isolate.h.

Referenced by Init(), write_iterator(), and ~Isolate().


The documentation for this class was generated from the following files: