Commit 9f5b10b1 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[API] Advance API deprecation

Remove more deprecated APIs after upgrading uses in chrome.

Bug: v8:11165, v8:10641, v8:8124, chromium:1096017
Change-Id: If0379806d73c2dbc877f09603b15a5a68dc75d36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543926Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71252}
parent 63d883b0
......@@ -3133,14 +3133,6 @@ class V8_EXPORT String : public Name {
*/
V8_INLINE static Local<String> Empty(Isolate* isolate);
/**
* Returns true if the string is external two-byte.
*
*/
V8_DEPRECATED(
"Use String::IsExternalTwoByte() or String::IsExternalOneByte()")
bool IsExternal() const;
/**
* Returns true if the string is both external and two-byte.
*/
......@@ -7410,8 +7402,6 @@ class PromiseRejectMessage {
typedef void (*PromiseRejectCallback)(PromiseRejectMessage message);
// --- Microtasks Callbacks ---
V8_DEPRECATED("Use *WithData version.")
typedef void (*MicrotasksCompletedCallback)(Isolate*);
typedef void (*MicrotasksCompletedCallbackWithData)(Isolate*, void*);
typedef void (*MicrotaskCallback)(void* data);
......@@ -9205,16 +9195,12 @@ class V8_EXPORT Isolate {
* Executing scripts inside the callback will not re-trigger microtasks and
* the callback.
*/
V8_DEPRECATED("Use *WithData version.")
void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
void AddMicrotasksCompletedCallback(
MicrotasksCompletedCallbackWithData callback, void* data = nullptr);
/**
* Removes callback that was installed by AddMicrotasksCompletedCallback.
*/
V8_DEPRECATED("Use *WithData version.")
void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
void RemoveMicrotasksCompletedCallback(
MicrotasksCompletedCallbackWithData callback, void* data = nullptr);
......
......@@ -5456,10 +5456,6 @@ int String::Write(Isolate* isolate, uint16_t* buffer, int start, int length,
start, length, options);
}
bool v8::String::IsExternal() const {
return IsExternalTwoByte();
}
bool v8::String::IsExternalTwoByte() const {
i::Handle<i::String> str = Utils::OpenHandle(this);
return i::StringShape(*str).IsExternalTwoByte();
......@@ -8836,23 +8832,6 @@ MicrotasksPolicy Isolate::GetMicrotasksPolicy() const {
return isolate->default_microtask_queue()->microtasks_policy();
}
namespace {
void MicrotasksCompletedCallbackAdapter(v8::Isolate* isolate, void* data) {
auto callback = reinterpret_cast<void (*)(v8::Isolate*)>(data);
callback(isolate);
}
} // namespace
void Isolate::AddMicrotasksCompletedCallback(
MicrotasksCompletedCallback callback) {
DCHECK(callback);
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
isolate->default_microtask_queue()->AddMicrotasksCompletedCallback(
&MicrotasksCompletedCallbackAdapter, reinterpret_cast<void*>(callback));
}
void Isolate::AddMicrotasksCompletedCallback(
MicrotasksCompletedCallbackWithData callback, void* data) {
DCHECK(callback);
......@@ -8861,13 +8840,6 @@ void Isolate::AddMicrotasksCompletedCallback(
data);
}
void Isolate::RemoveMicrotasksCompletedCallback(
MicrotasksCompletedCallback callback) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
isolate->default_microtask_queue()->RemoveMicrotasksCompletedCallback(
&MicrotasksCompletedCallbackAdapter, reinterpret_cast<void*>(callback));
}
void Isolate::RemoveMicrotasksCompletedCallback(
MicrotasksCompletedCallbackWithData callback, void* data) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
......@@ -9066,9 +9038,6 @@ size_t Isolate::CopyCodePages(size_t capacity, MemoryRange* code_pages_out) {
CALLBACK_SETTER(FatalErrorHandler, FatalErrorCallback, exception_behavior)
CALLBACK_SETTER(OOMErrorHandler, OOMErrorCallback, oom_behavior)
CALLBACK_SETTER(ModifyCodeGenerationFromStringsCallback,
ModifyCodeGenerationFromStringsCallback,
modify_code_gen_callback)
CALLBACK_SETTER(ModifyCodeGenerationFromStringsCallback,
ModifyCodeGenerationFromStringsCallback2,
modify_code_gen_callback2)
......
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