Commit 767fff40 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Avoid updating the shared worklist twice in per-context mode

MarkingWorklistHolder has two references to the shared marking worklist:
1) as a standalone worklist for general marking,
2) as a context worklist for per-context mode marking.

Because of that the shared worklist gets updated twice and breaks
the invariants of UpdateMarkingWorklistAfterScavenge.

Bug: chromium:1046791, chromium:973627
Change-Id: I61a8423f8b4d355adb5e8004bf200c67453c1e27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2029411Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66045}
parent b5c917ee
......@@ -81,6 +81,10 @@ class V8_EXPORT_PRIVATE MarkingWorklistsHolder {
on_hold_.Update(callback);
embedder_.Update(callback);
for (auto cw : context_worklists_) {
if (cw.context == kSharedContext) {
// The shared context was updated above.
continue;
}
cw.worklist->Update(callback);
}
}
......
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