Chromium Code Reviews| Index: Source/core/xml/parser/XMLDocumentParser.cpp |
| diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp |
| index e58fd82fd92ab6192f2e8a19f4883f1af5c0f599..d3c85bf5333fd41df8a1a1bc65e9aa9d22892785 100644 |
| --- a/Source/core/xml/parser/XMLDocumentParser.cpp |
| +++ b/Source/core/xml/parser/XMLDocumentParser.cpp |
| @@ -37,6 +37,7 @@ |
| #include <wtf/Vector.h> |
| #include "HTMLNames.h" |
| #include "XMLNSNames.h" |
| +#include "bindings/v8/ScriptController.h" |
| #include "bindings/v8/ScriptSourceCode.h" |
| #include "core/dom/CDATASection.h" |
| #include "core/dom/Comment.h" |
| @@ -335,8 +336,11 @@ void XMLDocumentParser::append(PassRefPtr<StringImpl> inputSource) |
| doWrite(source.toString()); |
| - // After parsing, go ahead and dispatch image beforeload events. |
| - ImageLoader::dispatchPendingBeforeLoadEvents(); |
| + if (isStopped()) |
| + return; |
|
abarth-chromium
2013/07/10 21:33:08
LGTM
|
| + |
| + if (document()->frame() && document()->frame()->script()->canExecuteScripts(NotAboutToExecuteScript)) |
| + ImageLoader::dispatchPendingBeforeLoadEvents(); |
| } |
| void XMLDocumentParser::handleError(XMLErrors::ErrorType type, const char* formattedMessage, TextPosition position) |