Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index a9c656ed72c1ac3960c78eb0e3a5f64d1af69bda..11e189145493183a59364ed4a9d6a8fcd43d3550 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -2229,6 +2229,8 @@ void Document::detach(const AttachContext& context) |
// created by DOMImplementation::createDocument(). |
DocumentLifecycleNotifier::notifyContextDestroyed(); |
ExecutionContext::notifyContextDestroyed(); |
+ |
+ m_fetcher.clear(); |
} |
void Document::removeAllEventListeners() |
@@ -2654,7 +2656,7 @@ void Document::dispatchUnloadEvents() |
// The DocumentLoader (and thus its DocumentLoadTiming) might get destroyed |
// while dispatching the event, so protect it to prevent writing the end |
// time into freed memory. |
- RefPtr<DocumentLoader> documentLoader = m_frame->loader().provisionalDocumentLoader(); |
+ RefPtrWillBeRawPtr<DocumentLoader> documentLoader = m_frame->loader().provisionalDocumentLoader(); |
m_loadEventProgress = UnloadEventInProgress; |
RefPtrWillBeRawPtr<Event> unloadEvent(Event::create(EventTypeNames::unload)); |
if (documentLoader && !documentLoader->timing().unloadEventStart() && !documentLoader->timing().unloadEventEnd()) { |
@@ -5261,7 +5263,7 @@ Node* eventTargetNodeForDocument(Document* doc) |
Node* node = doc->focusedElement(); |
if (!node && doc->isPluginDocument()) { |
PluginDocument* pluginDocument = toPluginDocument(doc); |
- node = pluginDocument->pluginNode(); |
+ node = pluginDocument->pluginNode(); |
} |
if (!node && doc->isHTMLDocument()) |
node = doc->body(); |