Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 044b9e6fb7a142d8f317180a2b57e8ab403c5a93..e256be280f7e48100a90397193093385acecb6f0 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -2496,8 +2496,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. |
@@ -4445,12 +4447,16 @@ void Document::applyXSLTransform(ProcessingInstruction* pi) |
String resultMIMEType; |
String newSource; |
String resultEncoding; |
- if (!processor->transformToString(this, resultMIMEType, newSource, resultEncoding)) |
+ setParsing(true); |
+ 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) |