Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Issue 1381373002: Merge 3 CLs required to fix bug 536917: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2490
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/checkbox/checkbox-change-event-free-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
index bc831eae8850eae024eb2329425d8431d9476ad3..22bbf832533f5183b7c5cfe70e0b029ce7b79cd8 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -1179,6 +1179,8 @@ void HTMLInputElement::postDispatchEventHandler(Event* event, void* dataFromPreD
OwnPtrWillBeRawPtr<ClickHandlingState> state = adoptPtrWillBeNoop(static_cast<ClickHandlingState*>(dataFromPreDispatch));
if (!state)
return;
+ // m_inputTypeView could be freed if the type attribute is modified through a change event handler.
+ RefPtrWillBeRawPtr<InputTypeView> protect(m_inputTypeView.get());
m_inputTypeView->didDispatchClick(event, *state);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/checkbox/checkbox-change-event-free-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698