Chromium Code Reviews| Index: Source/core/dom/Document.cpp |
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
| index b04d275363d206b513c9fd198602e3d8ca5e9b44..f4aed7c4d4d90e4f797e241b714fec11dfd4f08c 100644 |
| --- a/Source/core/dom/Document.cpp |
| +++ b/Source/core/dom/Document.cpp |
| @@ -2494,8 +2494,10 @@ void Document::implicitClose() |
| ASSERT(!inStyleRecalc()); |
| if (processingLoadEvent() || !m_parser) |
| return; |
| - if (frame() && frame()->navigationScheduler().locationChangePending()) |
| + if (frame() && frame()->navigationScheduler().locationChangePending()) { |
| + suppressLoadEvent(); |
| return; |
| + } |
| // The call to dispatchWindowLoadEvent can detach the LocalDOMWindow and cause it (and its |
| // attached Document) to be destroyed. |
| @@ -4427,12 +4429,16 @@ void Document::applyXSLTransform(ProcessingInstruction* pi) |
| String resultMIMEType; |
| String newSource; |
| String resultEncoding; |
| - if (!processor->transformToString(this, resultMIMEType, newSource, resultEncoding)) |
| + setParsing(true); |
|
Nate Chapin
2014/09/15 23:39:34
XSLT is processed after the main xml document has
|
| + if (!processor->transformToString(this, resultMIMEType, newSource, resultEncoding)) { |
| + setParsing(false); |
| return; |
| + } |
| // FIXME: If the transform failed we should probably report an error (like Mozilla does). |
| LocalFrame* ownerFrame = frame(); |
| processor->createDocumentFromSource(newSource, resultEncoding, resultMIMEType, this, ownerFrame); |
| InspectorInstrumentation::frameDocumentUpdated(ownerFrame); |
| + setParsing(false); |
| } |
| void Document::setTransformSource(PassOwnPtr<TransformSource> source) |