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

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

Issue 1537313002: Fix a crash by search event handler for <input type=search incremental>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years 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
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 49cacf9af360f7bfd48001671085b6633139b863..bfef0dbbe187d6d015df7be09a37644e78edb571 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -38,6 +38,7 @@
#include "core/InputTypeNames.h"
#include "core/dom/AXObjectCache.h"
#include "core/dom/Document.h"
+#include "core/dom/ExecutionContextTask.h"
#include "core/dom/IdTargetObserver.h"
#include "core/dom/shadow/InsertionPoint.h"
#include "core/dom/shadow/ShadowRoot.h"
@@ -1251,7 +1252,7 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
if (m_inputTypeView->shouldSubmitImplicitly(evt)) {
// FIXME: Remove type check.
if (type() == InputTypeNames::search)
- onSearch();
+ document().postTask(BLINK_FROM_HERE, createSameThreadTask(&HTMLInputElement::onSearch, PassRefPtrWillBeRawPtr<HTMLInputElement>(this)));
// Form submission finishes editing, just as loss of focus does.
// If there was a change, send the event now.
if (wasChangedSinceLastFormControlChangeEvent())

Powered by Google App Engine
This is Rietveld 408576698