From d0ae6031e76a56dc940695e7bd0890f5943b8104 Mon Sep 17 00:00:00 2001 From: Clemens Backes Date: Mon, 21 Oct 2019 13:43:14 +0200 Subject: [PATCH] [api] Prepare removal of deprecated tasks API Before we can remove the deprecated methods, we need to provide default implementations for them. Then, we can remove all overrides in embedders, and finally remove the methods from v8. R=ulan@chromium.org CC=ahaas@chromium.org Bug: v8:9810 Change-Id: If9286dc8ba441c226c9a1d524832ff203ac4bce6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1871915 Reviewed-by: Andreas Haas Reviewed-by: Ulan Degenbaev Commit-Queue: Clemens Backes Cr-Commit-Position: refs/heads/master@{#64419} --- include/v8-platform.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/v8-platform.h b/include/v8-platform.h index c6e78f2381..534d73e3f7 100644 --- a/include/v8-platform.h +++ b/include/v8-platform.h @@ -368,7 +368,7 @@ class Platform { * scheduling. The definition of "foreground" is opaque to V8. */ V8_DEPRECATED("Use a taskrunner acquired by GetForegroundTaskRunner instead.") - virtual void CallOnForegroundThread(Isolate* isolate, Task* task) = 0; + virtual void CallOnForegroundThread(Isolate* isolate, Task* task) { abort(); } /** * Schedules a task to be invoked on a foreground thread wrt a specific @@ -378,7 +378,9 @@ class Platform { */ V8_DEPRECATED("Use a taskrunner acquired by GetForegroundTaskRunner instead.") virtual void CallDelayedOnForegroundThread(Isolate* isolate, Task* task, - double delay_in_seconds) = 0; + double delay_in_seconds) { + abort(); + } /** * Schedules a task to be invoked on a foreground thread wrt a specific @@ -390,16 +392,13 @@ class Platform { */ V8_DEPRECATED("Use a taskrunner acquired by GetForegroundTaskRunner instead.") virtual void CallIdleOnForegroundThread(Isolate* isolate, IdleTask* task) { - // This must be overriden if |IdleTasksEnabled()|. abort(); } /** * Returns true if idle tasks are enabled for the given |isolate|. */ - virtual bool IdleTasksEnabled(Isolate* isolate) { - return false; - } + virtual bool IdleTasksEnabled(Isolate* isolate) { return false; } /** * Monotonically increasing time in seconds from an arbitrary fixed point in