Commit baf2b088 authored by Etienne Pierre-doray's avatar Etienne Pierre-doray Committed by Commit Bot

[Jobs]: Cleanup in v8 platform.

This CL completes Jobs cleanup for deprecated and pure virtual functions in
v8 platform.

Bug: chromium:1196703
Change-Id: I823ab06b56077181e92eee5a6468096a355634fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2810155Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73839}
parent 2df876ce
...@@ -181,9 +181,8 @@ class JobDelegate { ...@@ -181,9 +181,8 @@ class JobDelegate {
/** /**
* Returns true if the current task is called from the thread currently * Returns true if the current task is called from the thread currently
* running JobHandle::Join(). * running JobHandle::Join().
* TODO(etiennep): Make pure virtual once custom embedders implement it.
*/ */
virtual bool IsJoiningThread() const { return false; } virtual bool IsJoiningThread() const = 0;
}; };
/** /**
...@@ -220,19 +219,14 @@ class JobHandle { ...@@ -220,19 +219,14 @@ class JobHandle {
* Forces all existing workers to yield ASAP but doesn’t wait for them. * Forces all existing workers to yield ASAP but doesn’t wait for them.
* Warning, this is dangerous if the Job's callback is bound to or has access * Warning, this is dangerous if the Job's callback is bound to or has access
* to state which may be deleted after this call. * to state which may be deleted after this call.
* TODO(etiennep): Cleanup once implemented by all embedders.
*/ */
virtual void CancelAndDetach() { Cancel(); } virtual void CancelAndDetach() = 0;
/** /**
* Returns true if there's any work pending or any worker running. * Returns true if there's any work pending or any worker running.
*/ */
virtual bool IsActive() = 0; virtual bool IsActive() = 0;
// TODO(etiennep): Clean up once all overrides are removed.
V8_DEPRECATED("Use !IsActive() instead.")
virtual bool IsCompleted() { return !IsActive(); }
/** /**
* Returns true if associated with a Job and other methods may be called. * Returns true if associated with a Job and other methods may be called.
* Returns false after Join() or Cancel() was called. This may return true * Returns false after Join() or Cancel() was called. This may return true
...@@ -240,10 +234,6 @@ class JobHandle { ...@@ -240,10 +234,6 @@ class JobHandle {
*/ */
virtual bool IsValid() = 0; virtual bool IsValid() = 0;
// TODO(etiennep): Clean up once all overrides are removed.
V8_DEPRECATED("Use IsValid() instead.")
virtual bool IsRunning() { return IsValid(); }
/** /**
* Returns true if job priority can be changed. * Returns true if job priority can be changed.
*/ */
...@@ -272,10 +262,6 @@ class JobTask { ...@@ -272,10 +262,6 @@ class JobTask {
* it must not call back any JobHandle methods. * it must not call back any JobHandle methods.
*/ */
virtual size_t GetMaxConcurrency(size_t worker_count) const = 0; virtual size_t GetMaxConcurrency(size_t worker_count) const = 0;
// TODO(1114823): Clean up once all overrides are removed.
V8_DEPRECATED("Use the version that takes |worker_count|.")
virtual size_t GetMaxConcurrency() const { return 0; }
}; };
/** /**
......
...@@ -3342,6 +3342,8 @@ void CompilationStateImpl::WaitForCompilationEvent( ...@@ -3342,6 +3342,8 @@ void CompilationStateImpl::WaitForCompilationEvent(
return done_->load(std::memory_order_relaxed); return done_->load(std::memory_order_relaxed);
} }
bool IsJoiningThread() const override { return true; }
void NotifyConcurrencyIncrease() override { UNIMPLEMENTED(); } void NotifyConcurrencyIncrease() override { UNIMPLEMENTED(); }
uint8_t GetTaskId() override { return kMainTaskId; } uint8_t GetTaskId() override { return kMainTaskId; }
......
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