Chromium Code Reviews| Index: Source/core/html/HTMLObjectElement.cpp |
| diff --git a/Source/core/html/HTMLObjectElement.cpp b/Source/core/html/HTMLObjectElement.cpp |
| index 1d9a87adf4b710dde3c07f6c878c1e374f067b53..c6b8ed629df1c2a416b89e29e42b3cba526dc99c 100644 |
| --- a/Source/core/html/HTMLObjectElement.cpp |
| +++ b/Source/core/html/HTMLObjectElement.cpp |
| @@ -267,14 +267,18 @@ void HTMLObjectElement::updateWidget(PluginCreationOption pluginCreationOption) |
| ASSERT(needsWidgetUpdate()); |
| setNeedsWidgetUpdate(false); |
| // FIXME: This should ASSERT isFinishedParsingChildren() instead. |
| - if (!isFinishedParsingChildren()) |
| + if (!isFinishedParsingChildren()) { |
| + dispatchErrorEvent(); |
| return; |
| + } |
| // FIXME: I'm not sure it's ever possible to get into updateWidget during a |
| // removal, but just in case we should avoid loading the frame to prevent |
| // security bugs. |
| - if (!SubframeLoadingDisabler::canLoadFrame(*this)) |
| + if (!SubframeLoadingDisabler::canLoadFrame(*this)) { |
| + dispatchErrorEvent(); |
| return; |
| + } |
| String url = this->url(); |
| String serviceType = m_serviceType; |
| @@ -285,8 +289,10 @@ void HTMLObjectElement::updateWidget(PluginCreationOption pluginCreationOption) |
| parametersForPlugin(paramNames, paramValues, url, serviceType); |
| // Note: url is modified above by parametersForPlugin. |
| - if (!allowedToLoadFrameURL(url)) |
| + if (!allowedToLoadFrameURL(url)) { |
| + dispatchErrorEvent(); |
| return; |
| + } |
| bool fallbackContent = hasFallbackContent(); |
| renderEmbeddedObject()->setHasFallbackContent(fallbackContent); |
| @@ -306,8 +312,11 @@ void HTMLObjectElement::updateWidget(PluginCreationOption pluginCreationOption) |
| return; |
| bool success = beforeLoadAllowedLoad && hasValidClassId() && requestObject(url, serviceType, paramNames, paramValues); |
| - if (!success && fallbackContent) |
| - renderFallbackContent(); |
| + if (!success) { |
|
Tom Sepez
2013/11/19 17:54:22
nit: not sure having the local |success| buys us a
Mike West
2013/11/19 18:35:06
Yeah, not anymore. I'll fold those in.
|
| + dispatchErrorEvent(); |
| + if (fallbackContent) |
| + renderFallbackContent(); |
| + } |
| } |
| bool HTMLObjectElement::rendererIsNeeded(const RenderStyle& style) |