Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 64597aca002b7bdb3bbda792e3284c9ffb02653f..109d197b4eb4053e6d5dd06cd6b16fc0552890d3 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -2495,8 +2495,10 @@ void Document::implicitClose() |
ASSERT(!inStyleRecalc()); |
if (processingLoadEvent() || !m_parser) |
return; |
- if (frame() && frame()->navigationScheduler().locationChangePending()) |
+ if (frame() && frame()->navigationScheduler().locationChangePending()) { |
+ suppressLoadEvent(); |
dcheng
2014/10/20 18:35:14
If I'm reading this correctly, this means we won't
dcheng
2014/10/20 18:35:14
If I'm reading this correctly, this means we won't
|
return; |
+ } |
// The call to dispatchWindowLoadEvent can detach the LocalDOMWindow and cause it (and its |
// attached Document) to be destroyed. |
@@ -4452,12 +4454,16 @@ void Document::applyXSLTransform(ProcessingInstruction* pi) |
String resultMIMEType; |
String newSource; |
String resultEncoding; |
- if (!processor->transformToString(this, resultMIMEType, newSource, resultEncoding)) |
+ setParsing(true); |
dcheng
2014/10/20 18:35:14
It would be kind of nice to use some sort of scope
|
+ 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) |