Commit a0482ec3 authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

[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: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77475}
parent ae4832e5
......@@ -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_;
};
......
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