Title: [246182] trunk/Source/WebCore
- Revision
- 246182
- Author
- bfulg...@apple.com
- Date
- 2019-06-06 17:23:12 -0700 (Thu, 06 Jun 2019)
Log Message
Avoid generating new XSLT-based document when already changing the document.
https://bugs.webkit.org/show_bug.cgi?id=198525
<rdar://problem/51393787>
Reviewed by Ryosuke Niwa.
We should not allow a pending XSLT transform to change the current document when
that current document is int he process of being replaced.
* dom/Document.cpp:
(WebCore::Document::applyPendingXSLTransformsTimerFired):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (246181 => 246182)
--- trunk/Source/WebCore/ChangeLog 2019-06-07 00:14:22 UTC (rev 246181)
+++ trunk/Source/WebCore/ChangeLog 2019-06-07 00:23:12 UTC (rev 246182)
@@ -1,3 +1,17 @@
+2019-06-06 Brent Fulgham <bfulg...@apple.com>
+
+ Avoid generating new XSLT-based document when already changing the document.
+ https://bugs.webkit.org/show_bug.cgi?id=198525
+ <rdar://problem/51393787>
+
+ Reviewed by Ryosuke Niwa.
+
+ We should not allow a pending XSLT transform to change the current document when
+ that current document is int he process of being replaced.
+
+ * dom/Document.cpp:
+ (WebCore::Document::applyPendingXSLTransformsTimerFired):
+
2019-06-06 Devin Rousso <drou...@apple.com>
Web Inspector: create CommandLineAPIHost lazily like the other agents
Modified: trunk/Source/WebCore/dom/Document.cpp (246181 => 246182)
--- trunk/Source/WebCore/dom/Document.cpp 2019-06-07 00:14:22 UTC (rev 246181)
+++ trunk/Source/WebCore/dom/Document.cpp 2019-06-07 00:23:12 UTC (rev 246182)
@@ -5482,6 +5482,11 @@
if (transformSourceDocument() || !processingInstruction->sheet())
return;
+ // If the Document has already been detached from the frame, or the frame is currently in the process of
+ // changing to a new document, don't attempt to create a new Document from the XSLT.
+ if (!frame() || frame()->documentIsBeingReplaced())
+ return;
+
auto processor = XSLTProcessor::create();
processor->setXSLStyleSheet(downcast<XSLStyleSheet>(processingInstruction->sheet()));
String resultMIMEType;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes