Skip to content

Commit

Permalink
src: override CreateJob instead of PostJob
Browse files Browse the repository at this point in the history
PostJob will call out to CreateJob in its default implementation, so
it's sufficient to only override CreateJob.

PR-URL: #44741
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
backes authored and targos committed Oct 11, 2022
1 parent 2e49b99 commit 19a70c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/node_platform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ bool NodePlatform::FlushForegroundTasks(Isolate* isolate) {
return per_isolate->FlushForegroundTasksInternal();
}

std::unique_ptr<v8::JobHandle> NodePlatform::PostJob(v8::TaskPriority priority,
std::unique_ptr<v8::JobTask> job_task) {
std::unique_ptr<v8::JobHandle> NodePlatform::CreateJob(
v8::TaskPriority priority, std::unique_ptr<v8::JobTask> job_task) {
return v8::platform::NewDefaultJobHandle(
this, priority, std::move(job_task), NumberOfWorkerThreads());
}
Expand Down
2 changes: 1 addition & 1 deletion src/node_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class NodePlatform : public MultiIsolatePlatform {
double CurrentClockTimeMillis() override;
v8::TracingController* GetTracingController() override;
bool FlushForegroundTasks(v8::Isolate* isolate) override;
std::unique_ptr<v8::JobHandle> PostJob(
std::unique_ptr<v8::JobHandle> CreateJob(
v8::TaskPriority priority,
std::unique_ptr<v8::JobTask> job_task) override;

Expand Down

0 comments on commit 19a70c1

Please sign in to comment.