Commit e02cfac6 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Make a DCHECK stricter

The message on the DCHECK says that no compilation should have started
when adding js-to-wasm units, but the check itself then also allows for
situations where the job was created but is already done. This is
unnecessarily permissive.
This CL fixes the DCHECK to check what the comment says.

R=ahaas@chromium.org

Change-Id: I6de8af33869fd11ae91ce2009c360b8d4ed54e9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529142Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71111}
parent b0329614
...@@ -2930,7 +2930,7 @@ void CompilationStateImpl::AddCompilationUnits( ...@@ -2930,7 +2930,7 @@ void CompilationStateImpl::AddCompilationUnits(
if (!js_to_wasm_wrapper_units.empty()) { if (!js_to_wasm_wrapper_units.empty()) {
// |js_to_wasm_wrapper_units_| can only be modified before background // |js_to_wasm_wrapper_units_| can only be modified before background
// compilation started. // compilation started.
DCHECK(!current_compile_job_ || !current_compile_job_->IsRunning()); DCHECK(!current_compile_job_);
js_to_wasm_wrapper_units_.insert(js_to_wasm_wrapper_units_.end(), js_to_wasm_wrapper_units_.insert(js_to_wasm_wrapper_units_.end(),
js_to_wasm_wrapper_units.begin(), js_to_wasm_wrapper_units.begin(),
js_to_wasm_wrapper_units.end()); js_to_wasm_wrapper_units.end());
......
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