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

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

Issue 1529373002: Fix a crash by search event handler for <input type=search incremental>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 78231dff72825e02578b6097ec4dd55a79cd8355..e816a553b7e3dd837359aa60e1f02e99a8104d7a 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -37,6 +37,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"
@@ -1235,7 +1236,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