Commit e84b92d7 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[api] Remove deprecations from before version 7.2

R=delphick@chromium.org

Change-Id: Iad128dc76a8d399bbf18053fc1f32e34fa36c198
Reviewed-on: https://chromium-review.googlesource.com/c/1357056Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58015}
parent bcf79f1c
......@@ -1392,10 +1392,6 @@ class V8_EXPORT ScriptCompiler {
StreamedSource(ExternalSourceStream* source_stream, Encoding encoding);
~StreamedSource();
V8_DEPRECATED("No longer used", const CachedData* GetCachedData() const) {
return nullptr;
}
internal::ScriptStreamingData* impl() const { return impl_.get(); }
// Prevent copying.
......@@ -1845,12 +1841,10 @@ class V8_EXPORT JSON {
* Tries to parse the string |json_string| and returns it as value if
* successful.
*
* \param the context in which to parse and create the value.
* \param json_string The string to parse.
* \return The corresponding value if successfully parsed.
*/
static V8_DEPRECATED("Use the maybe version taking context",
MaybeLocal<Value> Parse(Isolate* isolate,
Local<String> json_string));
static V8_WARN_UNUSED_RESULT MaybeLocal<Value> Parse(
Local<Context> context, Local<String> json_string);
......@@ -1946,12 +1940,6 @@ class V8_EXPORT ValueSerializer {
V8_WARN_UNUSED_RESULT Maybe<bool> WriteValue(Local<Context> context,
Local<Value> value);
/**
* Returns the stored data. This serializer should not be used once the buffer
* is released. The contents are undefined if a previous write has failed.
*/
V8_DEPRECATED("Use Release()", std::vector<uint8_t> ReleaseBuffer());
/**
* Returns the stored data (allocated using the delegate's
* ReallocateBufferMemory) and its size. This serializer should not be used
......@@ -1968,13 +1956,6 @@ class V8_EXPORT ValueSerializer {
void TransferArrayBuffer(uint32_t transfer_id,
Local<ArrayBuffer> array_buffer);
/**
* Similar to TransferArrayBuffer, but for SharedArrayBuffer.
*/
V8_DEPRECATED("Use Delegate::GetSharedArrayBufferId",
void TransferSharedArrayBuffer(
uint32_t transfer_id,
Local<SharedArrayBuffer> shared_array_buffer));
/**
* Indicate whether to treat ArrayBufferView objects as host objects,
......@@ -3310,7 +3291,6 @@ class V8_EXPORT Object : public Value {
V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetOwnPropertyDescriptor(
Local<Context> context, Local<Name> key);
V8_DEPRECATED("Use maybe version", bool Has(Local<Value> key));
/**
* Object::Has() calls the abstract operation HasProperty(O, P) described
* in ECMA-262, 7.3.10. Has() returns
......@@ -3329,7 +3309,6 @@ class V8_EXPORT Object : public Value {
V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context,
Local<Value> key);
V8_DEPRECATED("Use maybe version", bool Delete(Local<Value> key));
V8_WARN_UNUSED_RESULT Maybe<bool> Delete(Local<Context> context,
Local<Value> key);
......@@ -5089,8 +5068,6 @@ class V8_EXPORT SharedArrayBuffer : public Object {
*/
class V8_EXPORT Date : public Object {
public:
static V8_DEPRECATED("Use maybe version.",
Local<Value> New(Isolate* isolate, double time));
static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context,
double time);
......@@ -6350,18 +6327,6 @@ class V8_EXPORT ResourceConstraints {
void ConfigureDefaults(uint64_t physical_memory,
uint64_t virtual_memory_limit);
// Returns the max semi-space size in MB.
V8_DEPRECATED("Use max_semi_space_size_in_kb()",
size_t max_semi_space_size()) {
return max_semi_space_size_in_kb_ / 1024;
}
// Sets the max semi-space size in MB.
V8_DEPRECATED("Use set_max_semi_space_size_in_kb(size_t limit_in_kb)",
void set_max_semi_space_size(size_t limit_in_mb)) {
max_semi_space_size_in_kb_ = limit_in_mb * 1024;
}
// Returns the max semi-space size in KB.
size_t max_semi_space_size_in_kb() const {
return max_semi_space_size_in_kb_;
......@@ -6376,14 +6341,6 @@ class V8_EXPORT ResourceConstraints {
void set_max_old_space_size(size_t limit_in_mb) {
max_old_space_size_ = limit_in_mb;
}
V8_DEPRECATED("max_executable_size_ is subsumed by max_old_space_size_",
size_t max_executable_size() const) {
return max_executable_size_;
}
V8_DEPRECATED("max_executable_size_ is subsumed by max_old_space_size_",
void set_max_executable_size(size_t limit_in_mb)) {
max_executable_size_ = limit_in_mb;
}
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; }
......@@ -6400,7 +6357,6 @@ class V8_EXPORT ResourceConstraints {
// The remaining limits are in MB
size_t max_old_space_size_;
size_t max_executable_size_;
uint32_t* stack_limit_;
size_t code_range_size_;
size_t max_zone_pool_size_;
......
......@@ -2987,20 +2987,6 @@ bool StackFrame::IsWasm() const { return Utils::OpenHandle(this)->is_wasm(); }
// --- J S O N ---
MaybeLocal<Value> JSON::Parse(Isolate* v8_isolate, Local<String> json_string) {
PREPARE_FOR_EXECUTION(v8_isolate->GetCurrentContext(), JSON, Parse, Value);
i::Handle<i::String> string = Utils::OpenHandle(*json_string);
i::Handle<i::String> source = i::String::Flatten(isolate, string);
i::Handle<i::Object> undefined = isolate->factory()->undefined_value();
auto maybe = source->IsSeqOneByteString()
? i::JsonParser<true>::Parse(isolate, source, undefined)
: i::JsonParser<false>::Parse(isolate, source, undefined);
Local<Value> result;
has_pending_exception = !ToLocal<Value>(maybe, &result);
RETURN_ON_FAILED_EXECUTION(Value);
RETURN_ESCAPED(result);
}
MaybeLocal<Value> JSON::Parse(Local<Context> context,
Local<String> json_string) {
PREPARE_FOR_EXECUTION(context, JSON, Parse, Value);
......@@ -3106,10 +3092,6 @@ Maybe<bool> ValueSerializer::WriteValue(Local<Context> context,
return result;
}
std::vector<uint8_t> ValueSerializer::ReleaseBuffer() {
return private_->serializer.ReleaseBuffer();
}
std::pair<uint8_t*, size_t> ValueSerializer::Release() {
return private_->serializer.Release();
}
......@@ -3120,12 +3102,6 @@ void ValueSerializer::TransferArrayBuffer(uint32_t transfer_id,
Utils::OpenHandle(*array_buffer));
}
void ValueSerializer::TransferSharedArrayBuffer(
uint32_t transfer_id, Local<SharedArrayBuffer> shared_array_buffer) {
private_->serializer.TransferArrayBuffer(
transfer_id, Utils::OpenHandle(*shared_array_buffer));
}
void ValueSerializer::WriteUint32(uint32_t value) {
private_->serializer.WriteUint32(value);
}
......@@ -4490,11 +4466,6 @@ Maybe<bool> v8::Object::Delete(Local<Context> context, Local<Value> key) {
}
}
bool v8::Object::Delete(v8::Local<Value> key) {
auto context = ContextFromNeverReadOnlySpaceObject(Utils::OpenHandle(this));
return Delete(context, key).FromMaybe(false);
}
Maybe<bool> v8::Object::DeletePrivate(Local<Context> context,
Local<Private> key) {
auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
......@@ -4534,12 +4505,6 @@ Maybe<bool> v8::Object::Has(Local<Context> context, Local<Value> key) {
}
bool v8::Object::Has(v8::Local<Value> key) {
auto context = ContextFromNeverReadOnlySpaceObject(Utils::OpenHandle(this));
return Has(context, key).FromMaybe(false);
}
Maybe<bool> v8::Object::HasPrivate(Local<Context> context, Local<Private> key) {
return HasOwnProperty(context, Local<Name>(reinterpret_cast<Name*>(*key)));
}
......@@ -6894,12 +6859,6 @@ MaybeLocal<v8::Value> v8::Date::New(Local<Context> context, double time) {
}
Local<v8::Value> v8::Date::New(Isolate* isolate, double time) {
auto context = isolate->GetCurrentContext();
RETURN_TO_LOCAL_UNCHECKED(New(context, time), Value);
}
double v8::Date::ValueOf() const {
i::Handle<i::Object> obj = Utils::OpenHandle(this);
i::Handle<i::JSDate> jsdate = i::Handle<i::JSDate>::cast(obj);
......
......@@ -327,10 +327,6 @@ void ValueSerializer::WriteUint64(uint64_t value) {
WriteVarint<uint64_t>(value);
}
std::vector<uint8_t> ValueSerializer::ReleaseBuffer() {
return std::vector<uint8_t>(buffer_, buffer_ + buffer_size_);
}
std::pair<uint8_t*, size_t> ValueSerializer::Release() {
auto result = std::make_pair(buffer_, buffer_size_);
buffer_ = nullptr;
......
......@@ -60,12 +60,6 @@ class ValueSerializer {
*/
Maybe<bool> WriteObject(Handle<Object> object) V8_WARN_UNUSED_RESULT;
/*
* Returns the stored data. This serializer should not be used once the buffer
* is released. The contents are undefined if a previous write has failed.
*/
std::vector<uint8_t> ReleaseBuffer();
/*
* Returns the buffer, allocated via the delegate, and its size.
* Caller assumes ownership of the buffer.
......
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