[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 <ahaas@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64419}
This commit is contained in:
Clemens Backes 2019-10-21 13:43:14 +02:00 committed by Commit Bot
parent 3e82c8df98
commit d0ae6031e7

View File

@ -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