Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2638883002: Document::shutdown(): remove unnecessary static_cast<>. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after
2480 for (Node& node : NodeTraversal::descendantsOf(*this)) { 2480 for (Node& node : NodeTraversal::descendantsOf(*this)) {
2481 cache->remove(&node); 2481 cache->remove(&node);
2482 } 2482 }
2483 } 2483 }
2484 } 2484 }
2485 2485
2486 styleEngine().didDetach(); 2486 styleEngine().didDetach();
2487 2487
2488 frameHost()->eventHandlerRegistry().documentDetached(*this); 2488 frameHost()->eventHandlerRegistry().documentDetached(*this);
2489 2489
2490 // Since |Document| class has multiple |LifecycleNotifier| as base class, 2490 // Signal destruction to mutation observers.
2491 // we need to have |static_cast<SynchronousMutationNotifier>| here. 2491 SynchronousMutationNotifier::notifyContextDestroyed();
2492 static_cast<SynchronousMutationNotifier*>(this)->notifyContextDestroyed();
2493 m_frame->selection().documentDetached(*this); 2492 m_frame->selection().documentDetached(*this);
2494 2493
2495 // If this Document is associated with a live DocumentLoader, the 2494 // If this Document is associated with a live DocumentLoader, the
2496 // DocumentLoader will take care of clearing the FetchContext. Deferring 2495 // DocumentLoader will take care of clearing the FetchContext. Deferring
2497 // to the DocumentLoader when possible also prevents prematurely clearing 2496 // to the DocumentLoader when possible also prevents prematurely clearing
2498 // the context in the case where multiple Documents end up associated with 2497 // the context in the case where multiple Documents end up associated with
2499 // a single DocumentLoader (e.g., navigating to a javascript: url). 2498 // a single DocumentLoader (e.g., navigating to a javascript: url).
2500 if (!loader()) 2499 if (!loader())
2501 m_fetcher->clearContext(); 2500 m_fetcher->clearContext();
2502 // If this document is the master for an HTMLImportsController, sever that 2501 // If this document is the master for an HTMLImportsController, sever that
(...skipping 4014 matching lines...) Expand 10 before | Expand all | Expand 10 after
6517 } 6516 }
6518 6517
6519 void showLiveDocumentInstances() { 6518 void showLiveDocumentInstances() {
6520 WeakDocumentSet& set = liveDocumentSet(); 6519 WeakDocumentSet& set = liveDocumentSet();
6521 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6520 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6522 for (Document* document : set) 6521 for (Document* document : set)
6523 fprintf(stderr, "- Document %p URL: %s\n", document, 6522 fprintf(stderr, "- Document %p URL: %s\n", document,
6524 document->url().getString().utf8().data()); 6523 document->url().getString().utf8().data());
6525 } 6524 }
6526 #endif 6525 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698