V8 Project
|
Isolate represents an isolated instance of the V8 engine. More...
#include <v8.h>
Classes | |
class | AllowJavascriptExecutionScope |
Introduce exception to DisallowJavascriptExecutionScope. More... | |
struct | CreateParams |
Initial configuration parameters for a new Isolate. More... | |
class | DisallowJavascriptExecutionScope |
Assert that no Javascript code is invoked. More... | |
class | Scope |
Stack-allocated class which sets the isolate for all operations executed within a local scope. More... | |
class | SuppressMicrotaskExecutionScope |
Do not run microtasks while this scope is active, even if microtasks are automatically executed otherwise. More... | |
Public Types | |
enum | GarbageCollectionType { kFullGarbageCollection , kMinorGarbageCollection } |
Types of garbage collections that can be requested via RequestGarbageCollectionForTesting. More... | |
enum | UseCounterFeature { kUseAsm = 0 , kUseCounterFeatureCount } |
Features reported via the SetUseCounterCallback callback. More... | |
typedef void(* | UseCounterCallback) (Isolate *isolate, UseCounterFeature feature) |
typedef void(* | GCPrologueCallback) (Isolate *isolate, GCType type, GCCallbackFlags flags) |
typedef void(* | GCEpilogueCallback) (Isolate *isolate, GCType type, GCCallbackFlags flags) |
Public Member Functions | |
void | Enter () |
Methods below this point require holding a lock (using Locker) in a multi-threaded environment. More... | |
void | Exit () |
Exits this isolate by restoring the previously entered one in the current thread. More... | |
void | Dispose () |
Disposes the isolate. More... | |
void | SetData (uint32_t slot, void *data) |
Associate embedder-specific data with the isolate. More... | |
void * | GetData (uint32_t slot) |
Retrieve embedder-specific data from the isolate. More... | |
void | GetHeapStatistics (HeapStatistics *heap_statistics) |
Get statistics about the heap memory usage. More... | |
int64_t | AdjustAmountOfExternalAllocatedMemory (int64_t change_in_bytes) |
Adjusts the amount of registered external memory. More... | |
HeapProfiler * | GetHeapProfiler () |
Returns heap profiler for this isolate. More... | |
CpuProfiler * | GetCpuProfiler () |
Returns CPU profiler for this isolate. More... | |
bool | InContext () |
Returns true if this isolate has a current context. More... | |
Local< Context > | GetCurrentContext () |
Returns the context that is on the top of the stack. More... | |
Local< Context > | GetCallingContext () |
Returns the context of the calling JavaScript code. More... | |
Local< Context > | GetEnteredContext () |
Returns the last entered context. More... | |
Local< Value > | ThrowException (Local< Value > exception) |
Schedules an exception to be thrown when returning to JavaScript. More... | |
template<typename T > | |
void | SetObjectGroupId (const Persistent< T > &object, UniqueId id) |
Allows the host application to group objects together. More... | |
template<typename T > | |
void | SetReferenceFromGroup (UniqueId id, const Persistent< T > &child) |
Allows the host application to declare implicit references from an object group to an object. More... | |
template<typename T , typename S > | |
void | SetReference (const Persistent< T > &parent, const Persistent< S > &child) |
Allows the host application to declare implicit references from an object to another object. More... | |
void | AddGCPrologueCallback (GCPrologueCallback callback, GCType gc_type_filter=kGCTypeAll) |
Enables the host application to receive a notification before a garbage collection. More... | |
void | RemoveGCPrologueCallback (GCPrologueCallback callback) |
This function removes callback which was installed by AddGCPrologueCallback function. More... | |
void | AddGCEpilogueCallback (GCEpilogueCallback callback, GCType gc_type_filter=kGCTypeAll) |
Enables the host application to receive a notification after a garbage collection. More... | |
void | RemoveGCEpilogueCallback (GCEpilogueCallback callback) |
This function removes callback which was installed by AddGCEpilogueCallback function. More... | |
void | RequestInterrupt (InterruptCallback callback, void *data) |
Request V8 to interrupt long running JavaScript code and invoke the given |callback| passing the given |data| to it. More... | |
void | ClearInterrupt () |
Clear interrupt request created by |RequestInterrupt|. More... | |
void | RequestGarbageCollectionForTesting (GarbageCollectionType type) |
Request garbage collection in this Isolate. More... | |
void | SetEventLogger (LogEventCallback that) |
Set the callback to invoke for logging event. More... | |
void | AddCallCompletedCallback (CallCompletedCallback callback) |
Adds a callback to notify the host application when a script finished running. More... | |
void | RemoveCallCompletedCallback (CallCompletedCallback callback) |
Removes callback that was installed by AddCallCompletedCallback. More... | |
void | RunMicrotasks () |
Experimental: Runs the Microtask Work Queue until empty Any exceptions thrown by microtask callbacks are swallowed. More... | |
void | EnqueueMicrotask (Handle< Function > microtask) |
Experimental: Enqueues the callback to the Microtask Work Queue. More... | |
void | EnqueueMicrotask (MicrotaskCallback microtask, void *data=NULL) |
Experimental: Enqueues the callback to the Microtask Work Queue. More... | |
void | SetAutorunMicrotasks (bool autorun) |
Experimental: Controls whether the Microtask Work Queue is automatically run when the script call depth decrements to zero. More... | |
bool | WillAutorunMicrotasks () const |
Experimental: Returns whether the Microtask Work Queue is automatically run when the script call depth decrements to zero. More... | |
void | SetUseCounterCallback (UseCounterCallback callback) |
Sets a callback for counting the number of times a feature of V8 is used. More... | |
void | SetCounterFunction (CounterLookupCallback) |
Enables the host application to provide a mechanism for recording statistics counters. More... | |
void | SetCreateHistogramFunction (CreateHistogramCallback) |
Enables the host application to provide a mechanism for recording histograms. More... | |
void | SetAddHistogramSampleFunction (AddHistogramSampleCallback) |
bool | IdleNotification (int idle_time_in_ms) |
Optional notification that the embedder is idle. More... | |
void | LowMemoryNotification () |
Optional notification that the system is running low on memory. More... | |
int | ContextDisposedNotification () |
Optional notification that a context has been disposed. More... | |
void | SetJitCodeEventHandler (JitCodeEventOptions options, JitCodeEventHandler event_handler) |
Allows the host application to provide the address of a function that is notified each time code is added, moved or removed. More... | |
void | SetStackLimit (uintptr_t stack_limit) |
Modifies the stack limit for this Isolate. More... | |
void | GetCodeRange (void **start, size_t *length_in_bytes) |
Returns a memory range that can potentially contain jitted code. More... | |
Static Public Member Functions | |
static Isolate * | New (const CreateParams ¶ms=CreateParams()) |
Creates a new isolate. More... | |
static Isolate * | GetCurrent () |
Returns the entered isolate for the current thread or NULL in case there is no current isolate. More... | |
static uint32_t | GetNumberOfDataSlots () |
Returns the maximum number of available embedder data slots. More... | |
Private Member Functions | |
Isolate () | |
Isolate (const Isolate &) | |
~Isolate () | |
Isolate & | operator= (const Isolate &) |
void * | operator new (size_t size) |
void | operator delete (void *, size_t) |
void | SetObjectGroupId (internal::Object **object, UniqueId id) |
void | SetReferenceFromGroup (UniqueId id, internal::Object **object) |
void | SetReference (internal::Object **parent, internal::Object **child) |
void | CollectAllGarbage (const char *gc_reason) |
Friends | |
template<class K , class V , class Traits > | |
class | PersistentValueMap |
Isolate represents an isolated instance of the V8 engine.
V8 isolates have completely separate states. Objects from one isolate must not be used in other isolates. The embedder can create multiple isolates and use them in parallel in multiple threads. An isolate can be entered by at most one thread at any given time. The Locker/Unlocker API must be used to synchronize.
typedef void(* v8::Isolate::GCEpilogueCallback) (Isolate *isolate, GCType type, GCCallbackFlags flags) |
typedef void(* v8::Isolate::GCPrologueCallback) (Isolate *isolate, GCType type, GCCallbackFlags flags) |
typedef void(* v8::Isolate::UseCounterCallback) (Isolate *isolate, UseCounterFeature feature) |
|
private |
|
private |
|
private |
void v8::Isolate::AddCallCompletedCallback | ( | CallCompletedCallback | callback | ) |
Adds a callback to notify the host application when a script finished running.
If a script re-enters the runtime during executing, the CallCompletedCallback is only invoked when the outer-most script execution ends. Executing scripts inside the callback do not trigger further callbacks.
Definition at line 6713 of file api.cc.
References v8::internal::Isolate::AddCallCompletedCallback(), and NULL.
void v8::Isolate::AddGCEpilogueCallback | ( | GCEpilogueCallback | callback, |
GCType | gc_type_filter = kGCTypeAll |
||
) |
Enables the host application to receive a notification after a garbage collection.
Allocations are allowed in the callback function, but the callback is not re-entrant: if the allocation inside it will trigger the garbage collection, the callback won't be called again. It is possible to specify the GCType filter for your callback. But it is not possible to register the same callback function two times with different GCType filters.
Definition at line 6465 of file api.cc.
References v8::internal::Heap::AddGCEpilogueCallback(), and v8::internal::Isolate::heap().
void v8::Isolate::AddGCPrologueCallback | ( | GCPrologueCallback | callback, |
GCType | gc_type_filter = kGCTypeAll |
||
) |
Enables the host application to receive a notification before a garbage collection.
Allocations are allowed in the callback function, but the callback is not re-entrant: if the allocation inside it will trigger the garbage collection, the callback won't be called again. It is possible to specify the GCType filter for your callback. But it is not possible to register the same callback function two times with different GCType filters.
Definition at line 6452 of file api.cc.
References v8::internal::Heap::AddGCPrologueCallback(), and v8::internal::Isolate::heap().
|
inline |
Adjusts the amount of registered external memory.
Used to give V8 an indication of the amount of externally allocated memory that is kept alive by JavaScript objects. V8 uses this to decide when to perform global garbage collections. Registering externally allocated memory will trigger global garbage collections more often than it would otherwise in an attempt to garbage collect the JavaScript objects that keep the externally allocated memory alive.
change_in_bytes | the change in externally allocated memory that is kept alive by JavaScript objects. |
Definition at line 6890 of file v8.h.
References I.
Referenced by v8::Shell::ReadBuffer(), and v8::ReadBufferWeakCallback().
void v8::Isolate::ClearInterrupt | ( | ) |
Clear interrupt request created by |RequestInterrupt|.
Can be called from another thread without acquiring a |Locker|.
Definition at line 6554 of file api.cc.
References NULL, and v8::internal::Isolate::stack_guard().
|
private |
int v8::Isolate::ContextDisposedNotification | ( | ) |
Optional notification that a context has been disposed.
V8 uses these notifications to guide the GC heuristic. Returns the number of context disposals - including this one - since the last time V8 had a chance to clean up.
Definition at line 6807 of file api.cc.
References v8::internal::Isolate::heap(), and v8::internal::Heap::NotifyContextDisposed().
Referenced by v8::SourceGroup::ExecuteInThread(), and v8::Shell::RunMain().
void v8::Isolate::Dispose | ( | ) |
Disposes the isolate.
The isolate must not be entered by any thread to be disposable.
Definition at line 6609 of file api.cc.
References v8::Utils::ApiCheck(), v8::internal::Isolate::IsInUse(), and v8::internal::Isolate::TearDown().
Referenced by v8::SourceGroup::ExecuteInThread(), main(), v8::Shell::Main(), and v8::TestWithIsolate::TearDownTestCase().
Experimental: Enqueues the callback to the Microtask Work Queue.
Definition at line 6731 of file api.cc.
References v8::internal::Isolate::EnqueueMicrotask(), and v8::Utils::OpenHandle().
void v8::Isolate::EnqueueMicrotask | ( | MicrotaskCallback | microtask, |
void * | data = NULL |
||
) |
Experimental: Enqueues the callback to the Microtask Work Queue.
Definition at line 6737 of file api.cc.
References v8::internal::CALL_HANDLER_INFO_TYPE, v8::internal::Handle< T >::cast(), v8::internal::Isolate::EnqueueMicrotask(), v8::internal::Isolate::factory(), and SET_FIELD_WRAPPED.
void v8::Isolate::Enter | ( | ) |
Methods below this point require holding a lock (using Locker) in a multi-threaded environment.
Sets this isolate as the entered one for the current thread. Saves the previously entered one (if any), so that it can be restored when exiting. Re-entering an isolate is allowed.
Definition at line 6620 of file api.cc.
References v8::internal::Isolate::Enter().
Referenced by v8::Isolate::Scope::Scope().
void v8::Isolate::Exit | ( | ) |
Exits this isolate by restoring the previously entered one in the current thread.
The isolate may still stay the same, if it was entered more than once.
Requires: this == Isolate::GetCurrent().
Definition at line 6626 of file api.cc.
References v8::internal::Isolate::Exit().
v8::Local< v8::Context > v8::Isolate::GetCallingContext | ( | ) |
Returns the context of the calling JavaScript code.
That is the context of the top-most JavaScript frame. If there are no JavaScript frames an empty handle is returned.
Definition at line 6394 of file api.cc.
References v8::internal::Isolate::GetCallingNativeContext(), v8::internal::Handle< T >::is_null(), and v8::Utils::ToLocal().
void v8::Isolate::GetCodeRange | ( | void ** | start, |
size_t * | length_in_bytes | ||
) |
Returns a memory range that can potentially contain jitted code.
On Win64, embedders are advised to install function table callbacks for these ranges, as default SEH won't be able to unwind through jitted code.
Might be empty on other platforms.
https://code.google.com/p/v8/issues/detail?id=3598
Definition at line 6829 of file api.cc.
References v8::internal::Isolate::code_range(), NULL, v8::internal::CodeRange::size(), v8::internal::CodeRange::start(), and v8::internal::CodeRange::valid().
CpuProfiler * v8::Isolate::GetCpuProfiler | ( | ) |
Returns CPU profiler for this isolate.
Will return NULL unless the isolate is initialized. It is the embedder's responsibility to stop all CPU profiling activities if it has started any.
Definition at line 6371 of file api.cc.
|
static |
Returns the entered isolate for the current thread or NULL in case there is no current isolate.
Definition at line 6577 of file api.cc.
Referenced by v8::HandleDebugEvent().
v8::Local< v8::Context > v8::Isolate::GetCurrentContext | ( | ) |
Returns the context that is on the top of the stack.
Definition at line 6384 of file api.cc.
References v8::internal::Isolate::context(), v8::internal::Context::native_context(), NULL, and v8::Utils::ToLocal().
|
inline |
Retrieve embedder-specific data from the isolate.
Returns NULL if SetData has never been called for the given |slot|.
Definition at line 6878 of file v8.h.
References I.
Referenced by v8::PerIsolateData::Get().
v8::Local< v8::Context > v8::Isolate::GetEnteredContext | ( | ) |
Returns the last entered context.
Definition at line 6402 of file api.cc.
References v8::internal::Isolate::handle_scope_implementer(), v8::internal::Handle< T >::is_null(), v8::internal::HandleScopeImplementer::LastEnteredContext(), and v8::Utils::ToLocal().
Referenced by v8::Shell::RealmCurrent(), and v8::PerIsolateData::RealmScope::RealmScope().
HeapProfiler * v8::Isolate::GetHeapProfiler | ( | ) |
Returns heap profiler for this isolate.
Will return NULL until the isolate is initialized.
Definition at line 6364 of file api.cc.
void v8::Isolate::GetHeapStatistics | ( | HeapStatistics * | heap_statistics | ) |
Get statistics about the heap memory usage.
Definition at line 6685 of file api.cc.
References v8::internal::Heap::CommittedMemory(), v8::internal::Heap::CommittedMemoryExecutable(), v8::internal::Heap::CommittedPhysicalMemory(), v8::internal::Isolate::heap(), v8::HeapStatistics::heap_size_limit_, v8::internal::Isolate::IsInitialized(), v8::internal::Heap::MaxReserved(), v8::internal::Heap::SizeOfObjects(), v8::HeapStatistics::total_heap_size_, v8::HeapStatistics::total_heap_size_executable_, v8::HeapStatistics::total_physical_size_, and v8::HeapStatistics::used_heap_size_.
|
inlinestatic |
Returns the maximum number of available embedder data slots.
Valid slots are in the range of 0 - GetNumberOfDataSlots() - 1.
Definition at line 6884 of file v8.h.
References I.
Optional notification that the embedder is idle.
V8 uses the notification to reduce memory footprint. This call can be used repeatedly if the embedder remains idle. Returns true if the embedder should stop calling IdleNotification until real work has been done. This indicates that V8 has done as much cleanup as it will be able to do.
The idle_time_in_ms argument specifies the time V8 has to do reduce the memory footprint. There is no guarantee that the actual work will be done within the time limit.
Definition at line 6788 of file api.cc.
References v8::internal::Isolate::heap(), and v8::internal::Heap::IdleNotification().
Referenced by v8::SourceGroup::ExecuteInThread(), and v8::Shell::RunMain().
bool v8::Isolate::InContext | ( | ) |
Returns true if this isolate has a current context.
Definition at line 6378 of file api.cc.
References v8::internal::Isolate::context(), and NULL.
Referenced by v8::Shell::ReportException().
void v8::Isolate::LowMemoryNotification | ( | ) |
Optional notification that the system is running low on memory.
V8 uses these notifications to attempt to free memory.
Definition at line 6797 of file api.cc.
References v8::internal::Heap::CollectAllAvailableGarbage(), v8::internal::Isolate::counters(), and v8::internal::Isolate::heap().
Referenced by v8::SourceGroup::ExecuteInThread(), and v8::Shell::RunMain().
|
static |
Creates a new isolate.
Does not change the currently entered isolate.
When an isolate is no longer used its resources should be freed by calling Dispose(). Using the delete operator is not allowed.
V8::Initialize() must have run prior to this.
Definition at line 6583 of file api.cc.
References v8::Isolate::CreateParams::code_event_handler, v8::Isolate::CreateParams::constraints, v8::Isolate::CreateParams::enable_serializer, v8::internal::Isolate::enable_serializer(), v8::Isolate::CreateParams::entry_hook, v8::internal::Isolate::Init(), v8::internal::Snapshot::Initialize(), v8::internal::Isolate::InitializeLoggingAndCounters(), v8::kJitCodeEventDefault, v8::internal::Isolate::logger(), NULL, v8::internal::Isolate::set_function_entry_hook(), v8::internal::Logger::SetCodeEventHandler(), and v8::SetResourceConstraints().
Referenced by v8::SourceGroup::ExecuteInThread(), main(), v8::Shell::Main(), and v8::TestWithIsolate::SetUpTestCase().
|
private |
|
private |
void v8::Isolate::RemoveCallCompletedCallback | ( | CallCompletedCallback | callback | ) |
Removes callback that was installed by AddCallCompletedCallback.
Definition at line 6720 of file api.cc.
References v8::internal::Isolate::RemoveCallCompletedCallback().
void v8::Isolate::RemoveGCEpilogueCallback | ( | GCEpilogueCallback | callback | ) |
This function removes callback which was installed by AddGCEpilogueCallback function.
Definition at line 6472 of file api.cc.
References v8::internal::Isolate::heap(), and v8::internal::Heap::RemoveGCEpilogueCallback().
void v8::Isolate::RemoveGCPrologueCallback | ( | GCPrologueCallback | callback | ) |
This function removes callback which was installed by AddGCPrologueCallback function.
Definition at line 6459 of file api.cc.
References v8::internal::Isolate::heap(), and v8::internal::Heap::RemoveGCPrologueCallback().
void v8::Isolate::RequestGarbageCollectionForTesting | ( | GarbageCollectionType | type | ) |
Request garbage collection in this Isolate.
It is only valid to call this function if –expose_gc was specified.
This should only be used for testing purposes and not to enforce a garbage collection schedule. It has strong negative impact on the garbage collection performance. Use IdleNotification() or LowMemoryNotification() instead to influence the garbage collection schedule.
Definition at line 6562 of file api.cc.
References CHECK, DCHECK_EQ, v8::internal::Heap::kAbortIncrementalMarkingMask, v8::kGCCallbackFlagForced, and v8::internal::NEW_SPACE.
Referenced by v8::internal::GCExtension::GC().
void v8::Isolate::RequestInterrupt | ( | InterruptCallback | callback, |
void * | data | ||
) |
Request V8 to interrupt long running JavaScript code and invoke the given |callback| passing the given |data| to it.
After |callback| returns control will be returned to the JavaScript code. At any given moment V8 can remember only a single callback for the very last interrupt request. Can be called from another thread without acquiring a |Locker|. Registered |callback| must not reenter interrupted Isolate.
Definition at line 6546 of file api.cc.
References v8::internal::Isolate::stack_guard().
void v8::Isolate::RunMicrotasks | ( | ) |
Experimental: Runs the Microtask Work Queue until empty Any exceptions thrown by microtask callbacks are swallowed.
Definition at line 6726 of file api.cc.
void v8::Isolate::SetAddHistogramSampleFunction | ( | AddHistogramSampleCallback | callback | ) |
Definition at line 6780 of file api.cc.
Referenced by v8::Shell::Initialize(), and v8::Shell::MapCounters().
void v8::Isolate::SetAutorunMicrotasks | ( | bool | autorun | ) |
Experimental: Controls whether the Microtask Work Queue is automatically run when the script call depth decrements to zero.
void v8::Isolate::SetCounterFunction | ( | CounterLookupCallback | callback | ) |
Enables the host application to provide a mechanism for recording statistics counters.
Definition at line 6764 of file api.cc.
References v8::internal::Isolate::counters(), v8::internal::Isolate::InitializeLoggingAndCounters(), v8::internal::Counters::ResetCounters(), v8::internal::StatsTable::SetCounterFunction(), and v8::internal::Isolate::stats_table().
Referenced by v8::Shell::Initialize(), and v8::Shell::MapCounters().
void v8::Isolate::SetCreateHistogramFunction | ( | CreateHistogramCallback | callback | ) |
Enables the host application to provide a mechanism for recording histograms.
The CreateHistogram function returns a histogram which will later be passed to the AddHistogramSample function.
Definition at line 6772 of file api.cc.
References v8::internal::Isolate::counters(), v8::internal::Isolate::InitializeLoggingAndCounters(), v8::internal::Counters::ResetHistograms(), v8::internal::StatsTable::SetCreateHistogramFunction(), and v8::internal::Isolate::stats_table().
Referenced by v8::Shell::Initialize(), and v8::Shell::MapCounters().
|
inline |
Associate embedder-specific data with the isolate.
|slot| has to be between 0 and GetNumberOfDataSlots() - 1.
Definition at line 6872 of file v8.h.
References I.
Referenced by v8::PerIsolateData::PerIsolateData(), and v8::PerIsolateData::~PerIsolateData().
void v8::Isolate::SetEventLogger | ( | LogEventCallback | that | ) |
void v8::Isolate::SetJitCodeEventHandler | ( | JitCodeEventOptions | options, |
JitCodeEventHandler | event_handler | ||
) |
Allows the host application to provide the address of a function that is notified each time code is added, moved or removed.
options | options for the JIT code event handler. |
event_handler | the JIT code event handler, which will be invoked each time code is added, moved or removed. |
event_handler
won't get notified of existent code. event_handler
may get notifications of code that overlaps earlier code notifications. This happens when code areas are reused, and the earlier overlapping code areas should therefore be discarded. event_handler
and the strings they point to are not guaranteed to live past each call. The event_handler
must copy strings and other parameters it needs to keep around. event_handler
function must ignore event codes it does not recognize to maintain future compatibility. Definition at line 6813 of file api.cc.
References v8::internal::Isolate::InitializeLoggingAndCounters(), v8::internal::Isolate::logger(), and v8::internal::Logger::SetCodeEventHandler().
void v8::Isolate::SetObjectGroupId | ( | const Persistent< T > & | object, |
UniqueId | id | ||
) |
Allows the host application to group objects together.
If one object in the group is alive, all objects in the group are alive. After each garbage collection, object groups are removed. It is intended to be used in the before-garbage-collection callback function, for instance to simulate DOM tree connections among JS wrapper objects. Object groups for all dependent handles need to be provided for kGCTypeMarkSweepCompact collections, for all other garbage collection types it is sufficient to provide object groups for partially dependent handles only.
Definition at line 6913 of file v8.h.
References T, and TYPE_CHECK.
|
private |
Definition at line 6425 of file api.cc.
References v8::internal::Isolate::global_handles(), and v8::internal::GlobalHandles::SetObjectGroupId().
void v8::Isolate::SetReference | ( | const Persistent< T > & | parent, |
const Persistent< S > & | child | ||
) |
Allows the host application to declare implicit references from an object to another object.
If the parent object is alive, the child object is alive too. After each garbage collection, all implicit references are removed. It is intended to be used in the before-garbage-collection callback function.
Definition at line 6930 of file v8.h.
References S, T, TYPE_CHECK, and v8::PersistentBase< T >::val_.
Referenced by v8::PersistentValueMap< K, V, Traits >::SetReference().
|
private |
Definition at line 6441 of file api.cc.
References v8::internal::Isolate::global_handles(), and v8::internal::GlobalHandles::SetReference().
void v8::Isolate::SetReferenceFromGroup | ( | UniqueId | id, |
const Persistent< T > & | child | ||
) |
Allows the host application to declare implicit references from an object group to an object.
If the objects of the object group are alive, the child object is alive too. After each garbage collection, all implicit references are removed. It is intended to be used in the before-garbage-collection callback function.
Definition at line 6921 of file v8.h.
References T, and TYPE_CHECK.
|
private |
Definition at line 6433 of file api.cc.
References v8::internal::Isolate::global_handles(), and v8::internal::GlobalHandles::SetReferenceFromGroup().
void v8::Isolate::SetStackLimit | ( | uintptr_t | stack_limit | ) |
Modifies the stack limit for this Isolate.
stack_limit | An address beyond which the Vm's stack may not grow. |
Definition at line 6822 of file api.cc.
References CHECK, and v8::internal::Isolate::stack_guard().
void v8::Isolate::SetUseCounterCallback | ( | UseCounterCallback | callback | ) |
Sets a callback for counting the number of times a feature of V8 is used.
Definition at line 6759 of file api.cc.
Schedules an exception to be thrown when returning to JavaScript.
When an exception has been scheduled it is illegal to invoke any JavaScript operation; the caller must return immediately and only after the exception has been handled does it become legal to invoke JavaScript operations.
Definition at line 6411 of file api.cc.
References ENTER_V8, v8::internal::Isolate::heap(), v8::Handle< T >::IsEmpty(), v8::Utils::OpenHandle(), v8::internal::Isolate::ScheduleThrow(), and v8::Undefined().
Referenced by v8::Shell::ChangeDirectory(), v8::CheckItsADirectory(), v8::ChildLaunchedOK(), v8::internal::ExternalizeStringExtension::Externalize(), v8::GetStdout(), v8::GetTimeouts(), v8::ExecArgs::Init(), v8::internal::ExternalizeStringExtension::IsOneByte(), v8::Shell::MakeDirectory(), v8::mkdirp(), v8::Shell::RemoveDirectory(), v8::Shell::SetEnvironment(), v8::Shell::SetUMask(), v8::Shell::System(), v8::Throw(), v8::Shell::UnsetEnvironment(), and v8::WaitForChild().
bool v8::Isolate::WillAutorunMicrotasks | ( | ) | const |
Experimental: Returns whether the Microtask Work Queue is automatically run when the script call depth decrements to zero.
|
friend |