| Index: third_party/WebKit/Source/core/layout/LayoutTable.h
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.h b/third_party/WebKit/Source/core/layout/LayoutTable.h
|
| index 6b68432118cd1658fbedf42c5c95750b3033574f..ee1281ca0d5fc438db9f6946a423d80ca75dc293 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTable.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTable.h
|
| @@ -252,9 +252,18 @@ class CORE_EXPORT LayoutTable final : public LayoutBlock {
|
| m_effectiveColumnPositions[index] = position;
|
| }
|
|
|
| - LayoutTableSection* header() const { return m_head; }
|
| - LayoutTableSection* footer() const { return m_foot; }
|
| - LayoutTableSection* firstBody() const { return m_firstBody; }
|
| + LayoutTableSection* header() const {
|
| + DCHECK(!needsSectionRecalc());
|
| + return m_head;
|
| + }
|
| + LayoutTableSection* footer() const {
|
| + DCHECK(!needsSectionRecalc());
|
| + return m_foot;
|
| + }
|
| + LayoutTableSection* firstBody() const {
|
| + DCHECK(!needsSectionRecalc());
|
| + return m_firstBody;
|
| + }
|
|
|
| void setRowOffsetFromRepeatingHeader(LayoutUnit offset) {
|
| m_rowOffsetFromRepeatingHeader = offset;
|
| @@ -367,6 +376,12 @@ class CORE_EXPORT LayoutTable final : public LayoutBlock {
|
| void setNeedsSectionRecalc() {
|
| if (documentBeingDestroyed())
|
| return;
|
| + // For all we know, sections may have been deleted at this point. Don't
|
| + // keep pointers dangling around.
|
| + m_head = nullptr;
|
| + m_foot = nullptr;
|
| + m_firstBody = nullptr;
|
| +
|
| m_needsSectionRecalc = true;
|
| setNeedsLayoutAndFullPaintInvalidation(
|
| LayoutInvalidationReason::TableChanged);
|
| @@ -387,7 +402,7 @@ class CORE_EXPORT LayoutTable final : public LayoutBlock {
|
| typedef Vector<CollapsedBorderValue> CollapsedBorderValues;
|
| void invalidateCollapsedBorders();
|
|
|
| - bool hasSections() const { return m_head || m_foot || m_firstBody; }
|
| + bool hasSections() const { return header() || footer() || firstBody(); }
|
|
|
| void recalcSectionsIfNeeded() const {
|
| if (m_needsSectionRecalc)
|
|
|