Commit 0acdd5f4 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Check NGPaintFragment::AssociateWithLayoutObject() to handle valid next for same layout object list

This patch introduces |DCHECK()|s to |AssociateWithLayoutObject()| to help
identify root cause of issue 1039470.

Bug: 1039470
Change-Id: I29aeb05eb7015c62f9908d9ce538460d72742aa2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2004176
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732315}
parent 58f3dbfd
......@@ -506,12 +506,15 @@ void NGPaintFragment::AssociateWithLayoutObject(
return;
}
// This |layout_object| was fragmented across multiple blocks.
DCHECK_EQ(layout_object, first_fragment->GetLayoutObject());
NGPaintFragment* last_fragment = first_fragment->LastForSameLayoutObject();
last_fragment->next_for_same_layout_object_ = this;
return;
}
DCHECK(add_result.stored_value->value);
add_result.stored_value->value->next_for_same_layout_object_ = this;
NGPaintFragment* last_fragment = add_result.stored_value->value;
DCHECK(last_fragment) << layout_object;
DCHECK_EQ(layout_object, last_fragment->GetLayoutObject());
last_fragment->next_for_same_layout_object_ = this;
add_result.stored_value->value = this;
}
......
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