From 51acc286e03705b85eaf373057ce0f87e8377dfb Mon Sep 17 00:00:00 2001 From: Clemens Backes Date: Wed, 24 Aug 2022 17:46:34 +0200 Subject: [PATCH] [wasm][API] Remove deprecated API The API was deprecated in v10.6 (https://crrev.com/c/3789510). Remove now, in v10.7. R=mlippautz@chromium.org Bug: v8:12899 Change-Id: I21d79cdd357315daf9684d9cdd6c1f1be088ad6b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3852490 Reviewed-by: Michael Lippautz Commit-Queue: Clemens Backes Cr-Commit-Position: refs/heads/main@{#82768} --- include/v8-callbacks.h | 5 ----- include/v8-isolate.h | 4 ---- include/v8-metrics.h | 14 -------------- include/v8-wasm.h | 21 --------------------- src/api/api.cc | 2 -- src/wasm/wasm-js.cc | 17 ----------------- 6 files changed, 63 deletions(-) diff --git a/include/v8-callbacks.h b/include/v8-callbacks.h index 520aa7cb51..c02059a589 100644 --- a/include/v8-callbacks.h +++ b/include/v8-callbacks.h @@ -327,11 +327,6 @@ using WasmSimdEnabledCallback = bool (*)(Local context); // --- Callback for checking if WebAssembly exceptions are enabled --- using WasmExceptionsEnabledCallback = bool (*)(Local context); -// --- Callback for checking if WebAssembly dynamic tiering is enabled --- -using WasmDynamicTieringEnabledCallback V8_DEPRECATED( - "Dynamic tiering is now enabled by default") = - bool (*)(Local context); - // --- Callback for checking if the SharedArrayBuffer constructor is enabled --- using SharedArrayBufferConstructorEnabledCallback = bool (*)(Local context); diff --git a/include/v8-isolate.h b/include/v8-isolate.h index 3390757487..e1335d53ff 100644 --- a/include/v8-isolate.h +++ b/include/v8-isolate.h @@ -1528,10 +1528,6 @@ class V8_EXPORT Isolate { void SetWasmExceptionsEnabledCallback(WasmExceptionsEnabledCallback callback); - V8_DEPRECATED("Dynamic tiering is now enabled by default") - void SetWasmDynamicTieringEnabledCallback(WasmDynamicTieringEnabledCallback) { - } - void SetSharedArrayBufferConstructorEnabledCallback( SharedArrayBufferConstructorEnabledCallback callback); diff --git a/include/v8-metrics.h b/include/v8-metrics.h index a25b21bf88..887012ac8c 100644 --- a/include/v8-metrics.h +++ b/include/v8-metrics.h @@ -125,15 +125,6 @@ struct WasmModuleInstantiated { int64_t wall_clock_duration_in_us = -1; }; -struct V8_DEPRECATED( - "With dynamic tiering, there is no point any more where the module is " - "fully tiered up") WasmModuleTieredUp { - bool lazy = false; - size_t code_size_in_bytes = 0; - int64_t wall_clock_duration_in_us = -1; - int64_t cpu_duration_in_us = -1; -}; - struct WasmModulesPerIsolate { size_t count = 0; }; @@ -190,11 +181,6 @@ class V8_EXPORT Recorder { ADD_MAIN_THREAD_EVENT(WasmModuleDecoded) ADD_MAIN_THREAD_EVENT(WasmModuleCompiled) ADD_MAIN_THREAD_EVENT(WasmModuleInstantiated) - - V8_DEPRECATED( - "With dynamic tiering, there is no point any more where the module is " - "fully tiered up") - ADD_MAIN_THREAD_EVENT(WasmModuleTieredUp) #undef ADD_MAIN_THREAD_EVENT // Thread-safe events are not allowed to access the context and therefore do diff --git a/include/v8-wasm.h b/include/v8-wasm.h index 0afff65ba1..05acd2e86d 100644 --- a/include/v8-wasm.h +++ b/include/v8-wasm.h @@ -131,20 +131,6 @@ class V8_EXPORT WasmStreaming final { public: class WasmStreamingImpl; - /** - * Client to receive streaming event notifications. - */ - class V8_DEPRECATED("Use SetMoreFunctionsCanBeSerializedCallback") Client { - public: - virtual ~Client() = default; - - /** - * Passes the fully compiled module to the client. This can be used to - * implement code caching. - */ - virtual void OnModuleCompiled(CompiledWasmModule) = 0; - }; - explicit WasmStreaming(std::unique_ptr impl); ~WasmStreaming(); @@ -184,13 +170,6 @@ class V8_EXPORT WasmStreaming final { */ bool SetCompiledModuleBytes(const uint8_t* bytes, size_t size); - /** - * Sets the client object that will receive streaming event notifications. - * This must be called before {OnBytesReceived}, {Finish}, or {Abort}. - */ - V8_DEPRECATED("Use SetMoreFunctionsCanBeSerializedCallback") - void SetClient(std::shared_ptr client); - /** * Sets a callback which is called whenever a significant number of new * functions are ready for serialization. diff --git a/src/api/api.cc b/src/api/api.cc index d1c870e0d1..6413aaa4da 100644 --- a/src/api/api.cc +++ b/src/api/api.cc @@ -10482,8 +10482,6 @@ bool WasmStreaming::SetCompiledModuleBytes(const uint8_t* bytes, size_t size) { UNREACHABLE(); } -void WasmStreaming::SetClient(std::shared_ptr client) { UNREACHABLE(); } - void WasmStreaming::SetMoreFunctionsCanBeSerializedCallback( std::function) { UNREACHABLE(); diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc index befa25fb4d..d4d2279820 100644 --- a/src/wasm/wasm-js.cc +++ b/src/wasm/wasm-js.cc @@ -80,18 +80,6 @@ class WasmStreaming::WasmStreamingImpl { return true; } - START_ALLOW_USE_DEPRECATED() - void SetClient(std::shared_ptr client) { - streaming_decoder_->SetMoreFunctionsCanBeSerializedCallback( - [client, streaming_decoder = streaming_decoder_]( - const std::shared_ptr& native_module) { - base::Vector url = streaming_decoder->url(); - client->OnModuleCompiled( - CompiledWasmModule{native_module, url.begin(), url.size()}); - }); - } - END_ALLOW_USE_DEPRECATED() - void SetMoreFunctionsCanBeSerializedCallback( std::function callback) { streaming_decoder_->SetMoreFunctionsCanBeSerializedCallback( @@ -140,11 +128,6 @@ bool WasmStreaming::SetCompiledModuleBytes(const uint8_t* bytes, size_t size) { return impl_->SetCompiledModuleBytes(base::VectorOf(bytes, size)); } -void WasmStreaming::SetClient(std::shared_ptr client) { - TRACE_EVENT0("v8.wasm", "wasm.WasmStreaming.SetClient"); - impl_->SetClient(client); -} - void WasmStreaming::SetMoreFunctionsCanBeSerializedCallback( std::function callback) { impl_->SetMoreFunctionsCanBeSerializedCallback(std::move(callback));