Changeset 244002 in webkit
- Timestamp:
- Apr 8, 2019, 5:38:43 AM (7 years ago)
- Location:
- releases/WebKitGTK/webkit-2.24
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/forms/remove-associated-element-after-gc-expected.txt (added)
-
LayoutTests/fast/forms/remove-associated-element-after-gc.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/HTMLFormControlElement.cpp (modified) (2 diffs)
-
Source/WebCore/html/HTMLFormElement.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog
r243992 r244002 1 2019-03-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Fix an edge case where HTMLFormElement::removeFormElement is invoked twice with the same element 4 https://bugs.webkit.org/show_bug.cgi?id=195663 5 <rdar://problem/48576391> 6 7 Reviewed by Ryosuke Niwa. 8 9 Add a layout test to exercise the scenario described in the WebCore ChangeLog. 10 11 * fast/forms/remove-associated-element-after-gc-expected.txt: Added. 12 * fast/forms/remove-associated-element-after-gc.html: Added. 13 1 14 2019-04-03 Michael Catanzaro <mcatanzaro@igalia.com> 2 15 -
releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog
r243998 r244002 1 2019-03-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Fix an edge case where HTMLFormElement::removeFormElement is invoked twice with the same element 4 https://bugs.webkit.org/show_bug.cgi?id=195663 5 <rdar://problem/48576391> 6 7 Reviewed by Ryosuke Niwa. 8 9 Currently, it's possible for HTMLFormControlElement's destructor to be reentrant. This may happen if the form 10 control element is ref'd while carrying out its destructor's logic. This may happen in two places in 11 HTMLFormControlElement (didChangeForm and resetDefaultButton), both of which actually don't require ensuring a 12 protected reference to the form control element since they should never result in any script execution. 13 14 To fix the bug, convert these strong references into raw pointers, and add ScriptDisallowedScope to ensure that 15 we don't change these codepaths in the future, such that they trigger arbitrary script execution. 16 17 Test: fast/forms/remove-associated-element-after-gc.html 18 19 * html/HTMLFormControlElement.cpp: 20 (WebCore::HTMLFormControlElement::didChangeForm): 21 * html/HTMLFormElement.cpp: 22 (WebCore::HTMLFormElement::resetDefaultButton): 23 1 24 2019-04-04 Miguel Gomez <magomez@igalia.com> 2 25 -
releases/WebKitGTK/webkit-2.24/Source/WebCore/html/HTMLFormControlElement.cpp
r242535 r244002 41 41 #include "RenderBox.h" 42 42 #include "RenderTheme.h" 43 #include "ScriptDisallowedScope.h" 43 44 #include "Settings.h" 44 45 #include "StyleTreeResolver.h" … … 557 558 void HTMLFormControlElement::didChangeForm() 558 559 { 560 ScriptDisallowedScope::InMainThread scriptDisallowedScope; 561 559 562 FormAssociatedElement::didChangeForm(); 560 if ( RefPtr<HTMLFormElement>form = this->form()) {563 if (auto* form = this->form()) { 561 564 if (m_willValidateInitialized && m_willValidate && !isValidFormControlElement()) 562 565 form->registerInvalidAssociatedFormControl(*this); -
releases/WebKitGTK/webkit-2.24/Source/WebCore/html/HTMLFormElement.cpp
r242438 r244002 705 705 } 706 706 707 RefPtr<HTMLFormControlElement> oldDefault = m_defaultButton; 707 ScriptDisallowedScope::InMainThread scriptDisallowedScope; 708 709 auto* oldDefault = m_defaultButton; 708 710 m_defaultButton = nullptr; 709 711 defaultButton();
Note:
See TracChangeset
for help on using the changeset viewer.