Commit cbd8f426 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[api] Remove several deprecated methods

Removes deprecated platform::CreateDefaultPlatform,
Object::GetPropertNames/GetOwnPropertyNames/HasRealNamedProperty/
HasRealIndexedProperty/HasRealNamedCallbackProperty,
Function::New/Call and Isolate::SetWasmCompileStreamingCallback.

Change-Id: I00c73576bbfbdc6bbe72bad9ac9d7a338a5bf068
Reviewed-on: https://chromium-review.googlesource.com/c/1460952Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59510}
parent 1bcf6265
......@@ -41,15 +41,6 @@ V8_PLATFORM_EXPORT std::unique_ptr<v8::Platform> NewDefaultPlatform(
InProcessStackDumping::kDisabled,
std::unique_ptr<v8::TracingController> tracing_controller = {});
V8_PLATFORM_EXPORT V8_DEPRECATED(
"Use NewDefaultPlatform instead",
v8::Platform* CreateDefaultPlatform(
int thread_pool_size = 0,
IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled,
InProcessStackDumping in_process_stack_dumping =
InProcessStackDumping::kDisabled,
v8::TracingController* tracing_controller = nullptr));
/**
* Pumps the message loop for the given isolate.
*
......
......@@ -3523,7 +3523,6 @@ class V8_EXPORT Object : public Value {
* array returned by this method contains the same values as would
* be enumerated by a for-in statement over this object.
*/
V8_DEPRECATED("Use maybe version", Local<Array> GetPropertyNames());
V8_WARN_UNUSED_RESULT MaybeLocal<Array> GetPropertyNames(
Local<Context> context);
V8_WARN_UNUSED_RESULT MaybeLocal<Array> GetPropertyNames(
......@@ -3536,7 +3535,6 @@ class V8_EXPORT Object : public Value {
* the returned array doesn't contain the names of properties from
* prototype objects.
*/
V8_DEPRECATED("Use maybe version", Local<Array> GetOwnPropertyNames());
V8_WARN_UNUSED_RESULT MaybeLocal<Array> GetOwnPropertyNames(
Local<Context> context);
......@@ -3646,8 +3644,6 @@ class V8_EXPORT Object : public Value {
Local<Name> key);
V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
uint32_t index);
V8_DEPRECATED("Use maybe version",
bool HasRealNamedProperty(Local<String> key));
/**
* Use HasRealNamedProperty() if you want to check if an object has an own
* property without causing side effects, i.e., without calling interceptors.
......@@ -3663,12 +3659,8 @@ class V8_EXPORT Object : public Value {
*/
V8_WARN_UNUSED_RESULT Maybe<bool> HasRealNamedProperty(Local<Context> context,
Local<Name> key);
V8_DEPRECATED("Use maybe version",
bool HasRealIndexedProperty(uint32_t index));
V8_WARN_UNUSED_RESULT Maybe<bool> HasRealIndexedProperty(
Local<Context> context, uint32_t index);
V8_DEPRECATED("Use maybe version",
bool HasRealNamedCallbackProperty(Local<String> key));
V8_WARN_UNUSED_RESULT Maybe<bool> HasRealNamedCallbackProperty(
Local<Context> context, Local<Name> key);
......@@ -4139,11 +4131,6 @@ class V8_EXPORT Function : public Object {
Local<Value> data = Local<Value>(), int length = 0,
ConstructorBehavior behavior = ConstructorBehavior::kAllow,
SideEffectType side_effect_type = SideEffectType::kHasSideEffect);
static V8_DEPRECATED("Use maybe version",
Local<Function> New(Isolate* isolate,
FunctionCallback callback,
Local<Value> data = Local<Value>(),
int length = 0));
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
Local<Context> context, int argc, Local<Value> argv[]) const;
......@@ -4162,9 +4149,6 @@ class V8_EXPORT Function : public Object {
Local<Context> context, int argc, Local<Value> argv[],
SideEffectType side_effect_type = SideEffectType::kHasSideEffect) const;
V8_DEPRECATED("Use maybe version",
Local<Value> Call(Local<Value> recv, int argc,
Local<Value> argv[]));
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Call(Local<Context> context,
Local<Value> recv, int argc,
Local<Value> argv[]);
......@@ -8364,10 +8348,6 @@ class V8_EXPORT Isolate {
void SetWasmModuleCallback(ExtensionCallback callback);
void SetWasmInstanceCallback(ExtensionCallback callback);
V8_DEPRECATED(
"The callback set in SetWasmStreamingCallback is used now",
void SetWasmCompileStreamingCallback(ApiImplementationCallback callback));
void SetWasmStreamingCallback(WasmStreamingCallback callback);
void SetWasmThreadsEnabledCallback(WasmThreadsEnabledCallback callback);
......
......@@ -4437,22 +4437,11 @@ MaybeLocal<Array> v8::Object::GetPropertyNames(
RETURN_ESCAPED(Utils::ToLocal(result));
}
Local<Array> v8::Object::GetPropertyNames() {
auto context = ContextFromNeverReadOnlySpaceObject(Utils::OpenHandle(this));
RETURN_TO_LOCAL_UNCHECKED(GetPropertyNames(context), Array);
}
MaybeLocal<Array> v8::Object::GetOwnPropertyNames(Local<Context> context) {
return GetOwnPropertyNames(
context, static_cast<v8::PropertyFilter>(ONLY_ENUMERABLE | SKIP_SYMBOLS));
}
Local<Array> v8::Object::GetOwnPropertyNames() {
auto context = ContextFromNeverReadOnlySpaceObject(Utils::OpenHandle(this));
RETURN_TO_LOCAL_UNCHECKED(GetOwnPropertyNames(context), Array);
}
MaybeLocal<Array> v8::Object::GetOwnPropertyNames(
Local<Context> context, PropertyFilter filter,
KeyConversionMode key_conversion) {
......@@ -4714,12 +4703,6 @@ Maybe<bool> v8::Object::HasRealNamedProperty(Local<Context> context,
}
bool v8::Object::HasRealNamedProperty(Local<String> key) {
auto context = ContextFromNeverReadOnlySpaceObject(Utils::OpenHandle(this));
return HasRealNamedProperty(context, key).FromMaybe(false);
}
Maybe<bool> v8::Object::HasRealIndexedProperty(Local<Context> context,
uint32_t index) {
auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
......@@ -4734,13 +4717,6 @@ Maybe<bool> v8::Object::HasRealIndexedProperty(Local<Context> context,
return result;
}
bool v8::Object::HasRealIndexedProperty(uint32_t index) {
auto context = ContextFromNeverReadOnlySpaceObject(Utils::OpenHandle(this));
return HasRealIndexedProperty(context, index).FromMaybe(false);
}
Maybe<bool> v8::Object::HasRealNamedCallbackProperty(Local<Context> context,
Local<Name> key) {
auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
......@@ -4756,13 +4732,6 @@ Maybe<bool> v8::Object::HasRealNamedCallbackProperty(Local<Context> context,
return result;
}
bool v8::Object::HasRealNamedCallbackProperty(Local<String> key) {
auto context = ContextFromNeverReadOnlySpaceObject(Utils::OpenHandle(this));
return HasRealNamedCallbackProperty(context, key).FromMaybe(false);
}
bool v8::Object::HasNamedLookupInterceptor() {
auto self = Utils::OpenHandle(this);
return self->IsJSObject() &&
......@@ -4948,14 +4917,6 @@ MaybeLocal<Function> Function::New(Local<Context> context,
return templ->GetFunction(context);
}
Local<Function> Function::New(Isolate* v8_isolate, FunctionCallback callback,
Local<Value> data, int length) {
return Function::New(v8_isolate->GetCurrentContext(), callback, data, length,
ConstructorBehavior::kAllow)
.FromMaybe(Local<Function>());
}
MaybeLocal<Object> Function::NewInstance(Local<Context> context, int argc,
v8::Local<v8::Value> argv[]) const {
return NewInstanceWithSideEffectType(context, argc, argv,
......@@ -5031,14 +4992,6 @@ MaybeLocal<v8::Value> Function::Call(Local<Context> context,
RETURN_ESCAPED(result);
}
Local<v8::Value> Function::Call(v8::Local<v8::Value> recv, int argc,
v8::Local<v8::Value> argv[]) {
auto context = ContextFromNeverReadOnlySpaceObject(Utils::OpenHandle(this));
RETURN_TO_LOCAL_UNCHECKED(Call(context, recv, argc, argv), Value);
}
void Function::SetName(v8::Local<v8::String> name) {
auto self = Utils::OpenHandle(this);
if (!self->IsJSFunction()) return;
......@@ -8789,9 +8742,6 @@ CALLBACK_SETTER(AllowWasmCodeGenerationCallback,
CALLBACK_SETTER(WasmModuleCallback, ExtensionCallback, wasm_module_callback)
CALLBACK_SETTER(WasmInstanceCallback, ExtensionCallback, wasm_instance_callback)
CALLBACK_SETTER(WasmCompileStreamingCallback, ApiImplementationCallback,
wasm_compile_streaming_callback)
CALLBACK_SETTER(WasmStreamingCallback, WasmStreamingCallback,
wasm_streaming_callback)
......
......@@ -466,7 +466,6 @@ typedef std::vector<HeapObject> DebugObjectCache;
V(AllowWasmCodeGenerationCallback, allow_wasm_code_gen_callback, nullptr) \
V(ExtensionCallback, wasm_module_callback, &NoExtension) \
V(ExtensionCallback, wasm_instance_callback, &NoExtension) \
V(ApiImplementationCallback, wasm_compile_streaming_callback, nullptr) \
V(WasmStreamingCallback, wasm_streaming_callback, nullptr) \
V(WasmThreadsEnabledCallback, wasm_threads_enabled_callback, nullptr) \
/* State for Relocatable. */ \
......
......@@ -45,16 +45,6 @@ std::unique_ptr<v8::Platform> NewDefaultPlatform(
return std::move(platform);
}
v8::Platform* CreateDefaultPlatform(
int thread_pool_size, IdleTaskSupport idle_task_support,
InProcessStackDumping in_process_stack_dumping,
v8::TracingController* tracing_controller) {
return NewDefaultPlatform(
thread_pool_size, idle_task_support, in_process_stack_dumping,
std::unique_ptr<v8::TracingController>(tracing_controller))
.release();
}
bool PumpMessageLoop(v8::Platform* platform, v8::Isolate* isolate,
MessageLoopBehavior behavior) {
return static_cast<DefaultPlatform*>(platform)->PumpMessageLoop(isolate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment