Commit 7dcaaadd authored by Keishi Hattori's avatar Keishi Hattori Committed by Commit Bot

Try forbidding GC to investigate MutationObserver crash

The iterator seems to break while iterating MutationObserverInterestGroup::observers_.
To figure out if this is conservative GC related, this CL adds a GC forbidden scope.

Bug: 1003733
Change-Id: I6511e1fef12771c5ed2d6891e547807151e89aa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1883460Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710298}
parent ef26c80d
...@@ -71,6 +71,11 @@ bool MutationObserverInterestGroup::IsOldValueRequested() { ...@@ -71,6 +71,11 @@ bool MutationObserverInterestGroup::IsOldValueRequested() {
void MutationObserverInterestGroup::EnqueueMutationRecord( void MutationObserverInterestGroup::EnqueueMutationRecord(
MutationRecord* mutation) { MutationRecord* mutation) {
MutationRecord* mutation_with_null_old_value = nullptr; MutationRecord* mutation_with_null_old_value = nullptr;
// For investigation of crbug.com/1003733.
// If the crashes stop it means there is a GC related issue.
ThreadState::GCForbiddenScope gc_forbidden(ThreadState::Current());
for (auto& iter : observers_) { for (auto& iter : observers_) {
MutationObserver* observer = iter.key.Get(); MutationObserver* observer = iter.key.Get();
if (HasOldValue(iter.value)) { if (HasOldValue(iter.value)) {
......
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