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

Unified Diff: Source/core/loader/ImageLoader.cpp

Issue 14741011: Error event was fired synchronously blowing away the input element from underneath. Remove the FIXM… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | « LayoutTests/fast/forms/image/image-error-event-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/ImageLoader.cpp
diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp
index bceddd1d1c0312a1cf3d64f4b5c989d805e2dbdd..dd3f34aa274a60c23614d41f5d7a822598c5ac95 100644
--- a/Source/core/loader/ImageLoader.cpp
+++ b/Source/core/loader/ImageLoader.cpp
@@ -211,8 +211,8 @@ void ImageLoader::updateFromElement()
clearFailedLoadURL();
} else if (!attr.isNull()) {
// Fire an error event if the url is empty.
- // FIXME: Should we fire this event asynchronoulsy via errorEventSender()?
- m_element->dispatchEvent(Event::create(eventNames().errorEvent, false, false));
+ m_hasPendingErrorEvent = true;
+ errorEventSender().dispatchEventSoon(this);
}
CachedImage* oldImage = m_image.get();
« no previous file with comments | « LayoutTests/fast/forms/image/image-error-event-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698