Commit a05c7d51 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Fix data race on failed_ field

R=ahaas@chromium.org

Bug: chromium:831989, chromium:824681
Change-Id: I0a8b2cc9f80af5f954bd358c30a3c6d84b6adeae
Reviewed-on: https://chromium-review.googlesource.com/1009603Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52561}
parent c68f863d
......@@ -126,9 +126,12 @@ class CompilationState {
void Abort();
Isolate* isolate() { return isolate_; }
Isolate* isolate() const { return isolate_; }
bool failed() { return failed_; }
bool failed() const {
base::LockGuard<base::Mutex> guard(&mutex_);
return failed_;
}
private:
void NotifyOnEvent(CompilationEvent event, Handle<Object> error);
......@@ -3151,7 +3154,7 @@ CompilationState::~CompilationState() {
}
void CompilationState::SetNumberOfFunctionsToCompile(size_t num_functions) {
DCHECK(!failed_);
DCHECK(!failed());
outstanding_units_ = num_functions;
}
......
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