Destroy paint fragment tree before destroying descendant layout objects
This patch introduces |LayoutNGMixin::WillBeDestroyed()| and changes |LayoutBlockFlow::DeleteLineBoxTree()| to destroy paint fragment tree before destroying descendant layout objects to allow |NGPaintFragment| destructor can access its associated |LayoutObject|. Before this patch, |NGAbstrctInlineTextBox::WillDestroy()|, which is called from |NGPaintFragment| destructor, uses dead |LayoutText| == |NGPaintFragment| lives longer than |LayoutText|. After this patch, |LayoutText| lives longer than |NGPaintFragment|. Bug: 874588 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: Iade5c8a51a57da2e855a194caa098e90222a7804 Reviewed-on: https://chromium-review.googlesource.com/1180828Reviewed-by:Koji Ishii <kojii@chromium.org> Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#584385}
Showing
Please register or sign in to comment