Chromium Code Reviews| 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 r ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2218 frameHost()->eventHandlerRegistry().documentDetached(*this); | 2218 frameHost()->eventHandlerRegistry().documentDetached(*this); |
| 2219 | 2219 |
| 2220 m_frame->selection().documentDetached(*this); | 2220 m_frame->selection().documentDetached(*this); |
| 2221 m_frame->inputMethodController().documentDetached(); | 2221 m_frame->inputMethodController().documentDetached(); |
| 2222 | 2222 |
| 2223 // If this Document is associated with a live DocumentLoader, the | 2223 // If this Document is associated with a live DocumentLoader, the |
| 2224 // DocumentLoader will take care of clearing the FetchContext. Deferring | 2224 // DocumentLoader will take care of clearing the FetchContext. Deferring |
| 2225 // to the DocumentLoader when possible also prevents prematurely clearing | 2225 // to the DocumentLoader when possible also prevents prematurely clearing |
| 2226 // the context in the case where multiple Documents end up associated with | 2226 // the context in the case where multiple Documents end up associated with |
| 2227 // a single DocumentLoader (e.g., navigating to a javascript: url). | 2227 // a single DocumentLoader (e.g., navigating to a javascript: url). |
| 2228 if (!loader()) | 2228 if (!loader()) { |
| 2229 m_fetcher->clearPreloads(ResourceFetcher::ClearAllPreloads); | |
|
Charlie Harrison
2016/08/04 18:10:26
tentative: can we do this in clearContext()?
Yoav Weiss
2016/08/04 20:26:14
sure. moved
| |
| 2229 m_fetcher->clearContext(); | 2230 m_fetcher->clearContext(); |
| 2231 } | |
| 2230 // If this document is the master for an HTMLImportsController, sever that | 2232 // If this document is the master for an HTMLImportsController, sever that |
| 2231 // relationship. This ensures that we don't leave import loads in flight, | 2233 // relationship. This ensures that we don't leave import loads in flight, |
| 2232 // thinking they should have access to a valid frame when they don't. | 2234 // thinking they should have access to a valid frame when they don't. |
| 2233 if (m_importsController) { | 2235 if (m_importsController) { |
| 2234 m_importsController->dispose(); | 2236 m_importsController->dispose(); |
| 2235 setImportsController(nullptr); | 2237 setImportsController(nullptr); |
| 2236 } | 2238 } |
| 2237 | 2239 |
| 2238 m_timers.setTimerTaskRunner( | 2240 m_timers.setTimerTaskRunner( |
| 2239 Platform::current()->currentThread()->scheduler()->timerTaskRunner()->cl one()); | 2241 Platform::current()->currentThread()->scheduler()->timerTaskRunner()->cl one()); |
| (...skipping 3794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6034 } | 6036 } |
| 6035 | 6037 |
| 6036 void showLiveDocumentInstances() | 6038 void showLiveDocumentInstances() |
| 6037 { | 6039 { |
| 6038 WeakDocumentSet& set = liveDocumentSet(); | 6040 WeakDocumentSet& set = liveDocumentSet(); |
| 6039 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6041 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6040 for (Document* document : set) | 6042 for (Document* document : set) |
| 6041 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); | 6043 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); |
| 6042 } | 6044 } |
| 6043 #endif | 6045 #endif |
| OLD | NEW |