Changeset 84899 in webkit
- Timestamp:
- Apr 26, 2011 2:57:11 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r84897 r84899 1 2011-04-26 Leo Yang <leo.yang@torchmobile.com.cn> 2 3 Reviewed by Nikolas Zimmermann. 4 5 ASSERT failure in SVGUseElement 6 https://bugs.webkit.org/show_bug.cgi?id=59313 7 8 Test case to verify webkit doesn't crash when a <use> element 9 is pending on resource and the document is not well-formed. 10 Test passes if no crash occurs in debug mode. 11 12 * svg/custom/use-crash-in-non-wellformed-document-expected.txt: Added. 13 * svg/custom/use-crash-in-non-wellformed-document.svg: Added. 14 1 15 2011-04-26 Chang Shu <cshu@webkit.org> 2 16 -
trunk/Source/WebCore/ChangeLog
r84898 r84899 1 2011-04-26 Leo Yang <leo.yang@torchmobile.com.cn> 2 3 Reviewed by Nikolas Zimmermann. 4 5 ASSERT failure in SVGUseElement 6 https://bugs.webkit.org/show_bug.cgi?id=59313 7 8 In SVGUseElement::insertedIntoDocument(), ASSERT(!m_isPendingResource) 9 was wrong because the document may not be well-formed. 10 11 This patch asserts the element is not pending on resource or the 12 document is not well-formed. 13 14 Test: svg/custom/use-crash-in-non-wellformed-document.svg 15 16 * svg/SVGUseElement.cpp: 17 (WebCore::isWellFormedDocument): 18 (WebCore::SVGUseElement::insertedIntoDocument): 19 1 20 2011-04-26 Mikhail Naganov <mnaganov@chromium.org> 2 21 -
trunk/Source/WebCore/svg/SVGUseElement.cpp
r84871 r84899 128 128 } 129 129 130 static inline bool isWellFormedDocument(Document* document) 131 { 132 if (document->isSVGDocument() || document->isXHTMLDocument()) 133 return static_cast<XMLDocumentParser*>(document->parser())->wellFormed(); 134 return true; 135 } 136 130 137 void SVGUseElement::insertedIntoDocument() 131 138 { 132 139 // This functions exists to assure assumptions made in the code regarding SVGElementInstance creation/destruction are satisfied. 133 140 SVGStyledTransformableElement::insertedIntoDocument(); 134 ASSERT(!m_targetElementInstance || ((document()->isSVGDocument() || document()->isXHTMLDocument()) && !static_cast<XMLDocumentParser*>(document()->parser())->wellFormed()));135 ASSERT(!m_isPendingResource );141 ASSERT(!m_targetElementInstance || !isWellFormedDocument(document())); 142 ASSERT(!m_isPendingResource || !isWellFormedDocument(document())); 136 143 } 137 144
Note: See TracChangeset
for help on using the changeset viewer.