Changeset 102639 in webkit
- Timestamp:
- Dec 12, 2011 4:48:36 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r102635 r102639 1 2011-12-12 Adam Klein <adamk@chromium.org> 2 3 Don't crash in StyleAttributeMutationScope if the style declaration's element has been GCed 4 https://bugs.webkit.org/show_bug.cgi?id=74321 5 6 Reviewed by Ryosuke Niwa. 7 8 * fast/dom/css-inline-style-declaration-crash-expected.txt: Added. 9 * fast/dom/css-inline-style-declaration-crash.html: Added. 10 1 11 2011-12-12 Brent Fulgham <bfulgham@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r102634 r102639 1 2011-12-12 Adam Klein <adamk@chromium.org> 2 3 Don't crash in StyleAttributeMutationScope if the style declaration's element has been GCed 4 https://bugs.webkit.org/show_bug.cgi?id=74321 5 6 Reviewed by Ryosuke Niwa. 7 8 In r101101, Rafael Weinstein added code to CSSMutableStyleDeclaration.cpp 9 which depended on isInlineStyleDeclaration returning true iff the 10 element it pointed to was non-null (it will be nulled-out if the 11 element is garbage collected). 12 13 Then, in r101172, Andreas Kling changed the semantics so that 14 isInlineStyleDeclaration only described the type of the declaration, 15 not the state of the related element. 16 17 This change updates Rafael's code with an explicit check that the 18 element is still alive. 19 20 Test: fast/dom/css-inline-style-declaration-crash.html 21 22 * css/CSSMutableStyleDeclaration.cpp: 23 1 24 2011-12-12 Chris Fleizach <cfleizach@apple.com> 2 25 -
trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp
r102543 r102639 68 68 69 69 CSSInlineStyleDeclaration* inlineDecl = toCSSInlineStyleDeclaration(s_currentDecl); 70 if (!inlineDecl->element()) 71 return; 72 70 73 m_mutationRecipients = MutationObserverInterestGroup::createForAttributesMutation(inlineDecl->element(), HTMLNames::styleAttr); 71 74 if (m_mutationRecipients->isEmpty()) { … … 99 102 s_currentDecl = 0; 100 103 s_shouldNotifyInspector = false; 101 if (inlineDecl->element() ->document())104 if (inlineDecl->element() && inlineDecl->element()->document()) 102 105 InspectorInstrumentation::didInvalidateStyleAttr(inlineDecl->element()->document(), inlineDecl->element()); 103 106 }
Note: See TracChangeset
for help on using the changeset viewer.