* Returns the corresponding context-unbound script.
*/
Local<UnboundScript> GetUnboundScript();
-
- V8_DEPRECATED("Use GetUnboundScript()->GetId()",
- int GetId()) {
- return GetUnboundScript()->GetId();
- }
};
void ConfigureDefaults(uint64_t physical_memory,
uint64_t virtual_memory_limit);
- // Deprecated, will be removed soon.
- V8_DEPRECATED("Use two-args version instead",
- void ConfigureDefaults(uint64_t physical_memory,
- uint64_t virtual_memory_limit,
- uint32_t number_of_processors));
-
int max_semi_space_size() const { return max_semi_space_size_; }
void set_max_semi_space_size(int value) { max_semi_space_size_ = value; }
int max_old_space_size() const { return max_old_space_size_; }
uint32_t* stack_limit() const { return stack_limit_; }
// Sets an address beyond which the VM's stack may not grow.
void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
- V8_DEPRECATED("Unused, will be removed", int max_available_threads() const) {
- return max_available_threads_;
- }
- // Set the number of threads available to V8, assuming at least 1.
- V8_DEPRECATED("Unused, will be removed",
- void set_max_available_threads(int value)) {
- max_available_threads_ = value;
- }
size_t code_range_size() const { return code_range_size_; }
void set_code_range_size(size_t value) {
code_range_size_ = value;
int max_old_space_size_;
int max_executable_size_;
uint32_t* stack_limit_;
- int max_available_threads_;
size_t code_range_size_;
};
*/
static Isolate* New(const CreateParams& params);
- static V8_DEPRECATED("Always pass CreateParams", Isolate* New());
-
/**
* Returns the entered isolate for the current thread or NULL in
* case there is no current isolate.
"Use isolate version", void SetAllowCodeGenerationFromStringsCallback(
AllowCodeGenerationFromStringsCallback that));
- /**
- * Set allocator to use for ArrayBuffer memory.
- * The allocator should be set only once. The allocator should be set
- * before any code tha uses ArrayBuffers is executed.
- * This allocator is used in all isolates.
- */
- static V8_DEPRECATE_SOON(
- "Use isolate version",
- void SetArrayBufferAllocator(ArrayBuffer::Allocator* allocator));
-
/**
* Check if V8 is dead and therefore unusable. This is the case after
* fatal errors such as out-of-memory situations.
max_old_space_size_(0),
max_executable_size_(0),
stack_limit_(NULL),
- max_available_threads_(0),
code_range_size_(0) { }
-void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory,
- uint64_t virtual_memory_limit,
- uint32_t number_of_processors) {
- ConfigureDefaults(physical_memory, virtual_memory_limit);
-}
-
void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory,
uint64_t virtual_memory_limit) {
#if V8_OS_ANDROID
i::V8::SetReturnAddressLocationResolver(return_address_resolver);
}
-void v8::V8::SetArrayBufferAllocator(
- ArrayBuffer::Allocator* allocator) {
- if (!Utils::ApiCheck(i::V8::ArrayBufferAllocator() == NULL,
- "v8::V8::SetArrayBufferAllocator",
- "ArrayBufferAllocator might only be set once"))
- return;
- i::V8::SetArrayBufferAllocator(allocator);
-}
-
bool v8::V8::Dispose() {
i::V8::TearDown();
}
-Isolate* Isolate::New() {
- Isolate::CreateParams create_params;
- return New(create_params);
-}
-
-
Isolate* Isolate::New(const Isolate::CreateParams& params) {
i::Isolate* isolate = new i::Isolate(false);
Isolate* v8_isolate = reinterpret_cast<Isolate*>(isolate);
- if (params.array_buffer_allocator != NULL) {
- isolate->set_array_buffer_allocator(params.array_buffer_allocator);
- } else {
- isolate->set_array_buffer_allocator(i::V8::ArrayBufferAllocator());
- }
+ CHECK(params.array_buffer_allocator != NULL);
+ isolate->set_array_buffer_allocator(params.array_buffer_allocator);
if (params.snapshot_blob != NULL) {
isolate->set_snapshot_blob(params.snapshot_blob);
} else {
// Support for entry hooking JITed code.
static void SetFunctionEntryHook(FunctionEntryHook entry_hook);
- static v8::ArrayBuffer::Allocator* ArrayBufferAllocator() {
- return array_buffer_allocator_;
- }
-
- static void SetArrayBufferAllocator(v8::ArrayBuffer::Allocator *allocator) {
- CHECK_NULL(array_buffer_allocator_);
- array_buffer_allocator_ = allocator;
- }
-
static void InitializePlatform(v8::Platform* platform);
static void ShutdownPlatform();
static v8::Platform* GetCurrentPlatform();
static void InitializeOncePerProcessImpl();
static void InitializeOncePerProcess();
- // Allocator for external array buffers.
- static v8::ArrayBuffer::Allocator* array_buffer_allocator_;
// v8::Platform to use.
static v8::Platform* platform_;
};