OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2629 cache->Remove(&node); | 2629 cache->Remove(&node); |
2630 } | 2630 } |
2631 } | 2631 } |
2632 } | 2632 } |
2633 | 2633 |
2634 GetStyleEngine().DidDetach(); | 2634 GetStyleEngine().DidDetach(); |
2635 | 2635 |
2636 GetPage()->GetEventHandlerRegistry().DocumentDetached(*this); | 2636 GetPage()->GetEventHandlerRegistry().DocumentDetached(*this); |
2637 | 2637 |
2638 // Signal destruction to mutation observers. | 2638 // Signal destruction to mutation observers. |
| 2639 DocumentShutdownNotifier::NotifyContextDestroyed(); |
2639 SynchronousMutationNotifier::NotifyContextDestroyed(); | 2640 SynchronousMutationNotifier::NotifyContextDestroyed(); |
2640 | 2641 |
2641 // If this Document is associated with a live DocumentLoader, the | 2642 // If this Document is associated with a live DocumentLoader, the |
2642 // DocumentLoader will take care of clearing the FetchContext. Deferring | 2643 // DocumentLoader will take care of clearing the FetchContext. Deferring |
2643 // to the DocumentLoader when possible also prevents prematurely clearing | 2644 // to the DocumentLoader when possible also prevents prematurely clearing |
2644 // the context in the case where multiple Documents end up associated with | 2645 // the context in the case where multiple Documents end up associated with |
2645 // a single DocumentLoader (e.g., navigating to a javascript: url). | 2646 // a single DocumentLoader (e.g., navigating to a javascript: url). |
2646 if (!Loader()) | 2647 if (!Loader()) |
2647 fetcher_->ClearContext(); | 2648 fetcher_->ClearContext(); |
2648 // If this document is the master for an HTMLImportsController, sever that | 2649 // If this document is the master for an HTMLImportsController, sever that |
(...skipping 4199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6848 visitor->Trace(intersection_observer_controller_); | 6849 visitor->Trace(intersection_observer_controller_); |
6849 visitor->Trace(snap_coordinator_); | 6850 visitor->Trace(snap_coordinator_); |
6850 visitor->Trace(resize_observer_controller_); | 6851 visitor->Trace(resize_observer_controller_); |
6851 visitor->Trace(property_registry_); | 6852 visitor->Trace(property_registry_); |
6852 visitor->Trace(network_state_observer_); | 6853 visitor->Trace(network_state_observer_); |
6853 Supplementable<Document>::Trace(visitor); | 6854 Supplementable<Document>::Trace(visitor); |
6854 TreeScope::Trace(visitor); | 6855 TreeScope::Trace(visitor); |
6855 ContainerNode::Trace(visitor); | 6856 ContainerNode::Trace(visitor); |
6856 ExecutionContext::Trace(visitor); | 6857 ExecutionContext::Trace(visitor); |
6857 SecurityContext::Trace(visitor); | 6858 SecurityContext::Trace(visitor); |
| 6859 DocumentShutdownNotifier::Trace(visitor); |
6858 SynchronousMutationNotifier::Trace(visitor); | 6860 SynchronousMutationNotifier::Trace(visitor); |
6859 } | 6861 } |
6860 | 6862 |
6861 void Document::RecordDeferredLoadReason(WouldLoadReason reason) { | 6863 void Document::RecordDeferredLoadReason(WouldLoadReason reason) { |
6862 DCHECK(would_load_reason_ == WouldLoadReason::kInvalid || | 6864 DCHECK(would_load_reason_ == WouldLoadReason::kInvalid || |
6863 reason != WouldLoadReason::kCreated); | 6865 reason != WouldLoadReason::kCreated); |
6864 DCHECK(reason != WouldLoadReason::kInvalid); | 6866 DCHECK(reason != WouldLoadReason::kInvalid); |
6865 DCHECK(GetFrame()); | 6867 DCHECK(GetFrame()); |
6866 DCHECK(GetFrame()->IsCrossOriginSubframe()); | 6868 DCHECK(GetFrame()->IsCrossOriginSubframe()); |
6867 if (reason <= would_load_reason_ || | 6869 if (reason <= would_load_reason_ || |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6900 } | 6902 } |
6901 | 6903 |
6902 void showLiveDocumentInstances() { | 6904 void showLiveDocumentInstances() { |
6903 WeakDocumentSet& set = liveDocumentSet(); | 6905 WeakDocumentSet& set = liveDocumentSet(); |
6904 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6906 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6905 for (blink::Document* document : set) | 6907 for (blink::Document* document : set) |
6906 fprintf(stderr, "- Document %p URL: %s\n", document, | 6908 fprintf(stderr, "- Document %p URL: %s\n", document, |
6907 document->Url().GetString().Utf8().data()); | 6909 document->Url().GetString().Utf8().data()); |
6908 } | 6910 } |
6909 #endif | 6911 #endif |
OLD | NEW |