Changeset 183052 in webkit
- Timestamp:
- Apr 20, 2015 11:22:57 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r183035 r183052 1 2015-04-20 Chris Dumez <cdumez@apple.com> 2 3 Crash when showing Web Inspector on page with 'multipart/x-mixed-replace' main resource 4 https://bugs.webkit.org/show_bug.cgi?id=143979 5 <rdar://problem/20594948> 6 7 Reviewed by Timothy Hatcher. 8 9 InspectorDOMAgent::m_document was updated only once per load, from 10 FrameLoader::dispatchDidCommitLoad(). However, dispatchDidCommitLoad() 11 is not called for follow-up multipart replacing loads. You can see this 12 from the following check in DocumentLoader::commitData(): 13 if (!isMultipartReplacingLoad()) 14 frameLoader()->receivedFirstData(); 15 16 As a result, in the case of a 'multipart/x-mixed-replace' main resource 17 InspectorDOMAgent::m_document would quickly get outdated as we create 18 a new Document for each replacing load. This would lead to Web Inspector 19 code using a Document without frame and causing crashes. 20 21 This patch calls InspectorInstrumentation::frameDocumentUpdated() from 22 Frame::setDocument() so that InspectorDOMAgent::m_document is always up 23 to date. 24 25 No new tests, not easily testable as the main resource needs to be 26 'multipart/x-mixed-replace'. 27 28 * dom/Document.cpp: 29 (WebCore::Document::applyXSLTransform): 30 Stop calling InspectorInstrumentation::frameDocumentUpdated() here as 31 XSLTProcessor::createDocumentFromSource() will call Frame::setDocument() 32 and frameDocumentUpdated() will be called there. 33 34 * page/Frame.cpp: 35 (WebCore::Frame::setDocument): 36 Call InspectorInstrumentation::frameDocumentUpdated() to make sure 37 InspectorDOMAgent::m_document gets updated. 38 1 39 2015-04-20 Alex Christensen <achristensen@webkit.org> 2 40 -
trunk/Source/WebCore/dom/Document.cpp
r183021 r183052 4585 4585 Frame* ownerFrame = frame(); 4586 4586 processor->createDocumentFromSource(newSource, resultEncoding, resultMIMEType, this, ownerFrame); 4587 InspectorInstrumentation::frameDocumentUpdated(ownerFrame);4588 4587 } 4589 4588 -
trunk/Source/WebCore/page/Frame.cpp
r182132 r183052 285 285 if (newDocument) 286 286 newDocument->didBecomeCurrentDocumentInFrame(); 287 288 InspectorInstrumentation::frameDocumentUpdated(this); 287 289 } 288 290
Note: See TracChangeset
for help on using the changeset viewer.