From ac1c713646bf4e59115d825f1e1c4984517cb68f Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 17 Jul 2015 02:26:42 -0700 Subject: [PATCH] Delete APIs deprecated since last release BUG=none R=verwaest@chromium.org LOG=y Review URL: https://codereview.chromium.org/1114873002 Cr-Commit-Position: refs/heads/master@{#29720} --- include/v8.h | 32 -------------------------------- src/api.cc | 29 ++--------------------------- src/v8.cc | 1 - src/v8.h | 11 ----------- 4 files changed, 2 insertions(+), 71 deletions(-) diff --git a/include/v8.h b/include/v8.h index b1dd164aa..29fac0be7 100644 --- a/include/v8.h +++ b/include/v8.h @@ -1114,11 +1114,6 @@ class V8_EXPORT Script { * Returns the corresponding context-unbound script. */ Local GetUnboundScript(); - - V8_DEPRECATED("Use GetUnboundScript()->GetId()", - int GetId()) { - return GetUnboundScript()->GetId(); - } }; @@ -4810,12 +4805,6 @@ class V8_EXPORT ResourceConstraints { 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_; } @@ -4825,14 +4814,6 @@ class V8_EXPORT ResourceConstraints { 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; @@ -4843,7 +4824,6 @@ class V8_EXPORT ResourceConstraints { int max_old_space_size_; int max_executable_size_; uint32_t* stack_limit_; - int max_available_threads_; size_t code_range_size_; }; @@ -5376,8 +5356,6 @@ class V8_EXPORT Isolate { */ 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. @@ -5977,16 +5955,6 @@ class V8_EXPORT V8 { "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. diff --git a/src/api.cc b/src/api.cc index 2697e098c..646c07080 100644 --- a/src/api.cc +++ b/src/api.cc @@ -480,15 +480,8 @@ ResourceConstraints::ResourceConstraints() 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 @@ -5376,15 +5369,6 @@ void v8::V8::SetReturnAddressLocationResolver( 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(); @@ -7100,20 +7084,11 @@ Isolate* Isolate::GetCurrent() { } -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); - 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 { diff --git a/src/v8.cc b/src/v8.cc index fcffebb34..7e346837d 100644 --- a/src/v8.cc +++ b/src/v8.cc @@ -35,7 +35,6 @@ V8_DECLARE_ONCE(init_natives_once); V8_DECLARE_ONCE(init_snapshot_once); #endif -v8::ArrayBuffer::Allocator* V8::array_buffer_allocator_ = NULL; v8::Platform* V8::platform_ = NULL; diff --git a/src/v8.h b/src/v8.h index 211f3c614..71dd42f49 100644 --- a/src/v8.h +++ b/src/v8.h @@ -69,15 +69,6 @@ class V8 : public AllStatic { // 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(); @@ -89,8 +80,6 @@ class V8 : public AllStatic { 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_; }; -- 2.34.1