Skip to content

Commit

Permalink
deps: make V8 9.1 abi-compatible with 9.0
Browse files Browse the repository at this point in the history
Revert "[api] Avoid handles for const API functions"

This reverts commit aee471b2ff5b1a9e622426454885b748d226535b.

Revert "[api] Remove deprecated [Shared]ArrayBuffer API"

This reverts commit 578f6be77fc5d8af975005c2baf918e7225abb62.

Revert "[Jobs]: Cleanup in v8 platform."

This reverts commit baf2b088dd9f585aa597459f30d71431171666e2.

Revert "Skip global registration of [Shared]ArrayBuffer backing stores"

This reverts commit fcdf35e6d70d51699ece063e25dc705e80673308.

PR-URL: #38991
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
targos committed Jun 14, 2021
1 parent 6111671 commit 864fe99
Show file tree
Hide file tree
Showing 12 changed files with 1,030 additions and 239 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.13',
'v8_embedder_string': '-node.14',

##### V8 defaults for Node.js #####

Expand Down
18 changes: 16 additions & 2 deletions deps/v8/include/v8-platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ class JobDelegate {
/**
* Returns true if the current task is called from the thread currently
* running JobHandle::Join().
* TODO(etiennep): Make pure virtual once custom embedders implement it.
*/
virtual bool IsJoiningThread() const = 0;
virtual bool IsJoiningThread() const { return false; }
};

/**
Expand Down Expand Up @@ -219,21 +220,30 @@ class JobHandle {
* 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
* to state which may be deleted after this call.
* TODO(etiennep): Cleanup once implemented by all embedders.
*/
virtual void CancelAndDetach() = 0;
virtual void CancelAndDetach() { Cancel(); }

/**
* Returns true if there's any work pending or any worker running.
*/
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 false after Join() or Cancel() was called. This may return true
* even if no workers are running and IsCompleted() returns true
*/
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.
*/
Expand Down Expand Up @@ -262,6 +272,10 @@ class JobTask {
* it must not call back any JobHandle methods.
*/
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; }
};

/**
Expand Down
Loading

0 comments on commit 864fe99

Please sign in to comment.