[baseline] Fix cctest Flags when ConcurrentSP
The cctest enables concurrent-sparplug during startup, which creates a job_handler_, then disables the flag before destroying the isolate, which calls the destructor of ConcurrentBaselineCompiler. This does not call job_handle_->Cancel and fails in a DCHECK inside the default_job implementation. Bug: v8:12054 Change-Id: I8975e2ad2c0aafaa86aedb13018617a08f0fded9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3234718 Commit-Queue: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#77475}
This commit is contained in:
parent
ae4832e5cb
commit
a0482ec3ad
@ -187,7 +187,7 @@ class ConcurrentBaselineCompiler {
|
||||
}
|
||||
|
||||
~ConcurrentBaselineCompiler() {
|
||||
if (FLAG_concurrent_sparkplug && job_handle_->IsValid()) {
|
||||
if (job_handle_ && job_handle_->IsValid()) {
|
||||
// Wait for the job handle to complete, so that we know the queue
|
||||
// pointers are safe.
|
||||
job_handle_->Cancel();
|
||||
@ -212,7 +212,7 @@ class ConcurrentBaselineCompiler {
|
||||
|
||||
private:
|
||||
Isolate* isolate_;
|
||||
std::unique_ptr<JobHandle> job_handle_;
|
||||
std::unique_ptr<JobHandle> job_handle_ = nullptr;
|
||||
LockedQueue<std::unique_ptr<BaselineBatchCompilerJob>> incoming_queue_;
|
||||
LockedQueue<std::unique_ptr<BaselineBatchCompilerJob>> outgoing_queue_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user