Changeset 244971 in webkit
- Timestamp:
- May 6, 2019 1:25:27 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r244961 r244971 1 2019-05-06 Chris Dumez <cdumez@apple.com> 2 3 Add assertions to CachedFrame to help figure out crash in CachedFrame constructor 4 https://bugs.webkit.org/show_bug.cgi?id=197621 5 6 Reviewed by Geoffrey Garen. 7 8 Add release assertions to try and figure out who is sometimes detaching the document from its 9 frame while constructing CachedFrames for its descendants. 10 11 * dom/Document.cpp: 12 (WebCore::Document::detachFromFrame): 13 * dom/Document.h: 14 (WebCore::Document::setMayBeDetachedFromFrame): 15 * history/CachedFrame.cpp: 16 (WebCore::CachedFrame::CachedFrame): 17 1 18 2019-05-06 Zan Dobersek <zdobersek@igalia.com> 2 19 -
trunk/Source/WebCore/dom/Document.cpp
r244860 r244971 8131 8131 void Document::detachFromFrame() 8132 8132 { 8133 // Assertion to help pinpint rdar://problem/49877867. If this hits, the crash trace should tell us 8134 // which piece of code is detaching the document from its frame while constructing the CachedFrames. 8135 RELEASE_ASSERT(m_mayBeDetachedFromFrame); 8136 8133 8137 observeFrame(nullptr); 8134 8138 } -
trunk/Source/WebCore/dom/Document.h
r244853 r244971 1463 1463 #endif 1464 1464 1465 // For debugging rdar://problem/49877867. 1466 void setMayBeDetachedFromFrame(bool mayBeDetachedFromFrame) { m_mayBeDetachedFromFrame = mayBeDetachedFromFrame; } 1467 1465 1468 Logger& logger(); 1466 1469 … … 2060 2063 bool m_hasEvaluatedUserAgentScripts { false }; 2061 2064 bool m_isRunningUserScripts { false }; 2065 bool m_mayBeDetachedFromFrame { true }; 2062 2066 #if ENABLE(APPLE_PAY) 2063 2067 bool m_hasStartedApplePaySession { false }; -
trunk/Source/WebCore/history/CachedFrame.cpp
r242797 r244971 144 144 ASSERT(m_document->pageCacheState() == Document::InPageCache); 145 145 146 RELEASE_ASSERT(m_document->domWindow()); 147 RELEASE_ASSERT(m_document->frame()); 148 RELEASE_ASSERT(m_document->domWindow()->frame()); 149 150 // FIXME: We have evidence that constructing CachedFrames for descendant frames may detach the document from its frame (rdar://problem/49877867). 151 // This sets the flag to help find the guilty code. 152 m_document->setMayBeDetachedFromFrame(false); 153 146 154 // Create the CachedFrames for all Frames in the FrameTree. 147 155 for (Frame* child = frame.tree().firstChild(); child; child = child->tree().nextSibling()) 148 156 m_childFrames.append(std::make_unique<CachedFrame>(*child)); 149 157 158 RELEASE_ASSERT(m_document->domWindow()); 159 RELEASE_ASSERT(m_document->frame()); 150 160 RELEASE_ASSERT(m_document->domWindow()->frame()); 151 161 … … 194 204 #endif 195 205 206 m_document->setMayBeDetachedFromFrame(true); 196 207 m_document->detachFromCachedFrame(*this); 197 208
Note: See TracChangeset
for help on using the changeset viewer.