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

Unified Diff: Source/core/html/imports/HTMLImportLoader.cpp

Issue 1032293002: Oilpan: dispose an HTMLImportsController on document detach/removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No need to call dispose() when destructing HTMLImportsController Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/imports/HTMLImportLoader.h ('k') | Source/core/html/imports/HTMLImportTreeRoot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/imports/HTMLImportLoader.cpp
diff --git a/Source/core/html/imports/HTMLImportLoader.cpp b/Source/core/html/imports/HTMLImportLoader.cpp
index 84c8c7ffbb1848dc2b51a0747c4d0ed4aaf602f3..bb3c476fcf0d76070e8ab373a047c8ba18ca4b5c 100644
--- a/Source/core/html/imports/HTMLImportLoader.cpp
+++ b/Source/core/html/imports/HTMLImportLoader.cpp
@@ -54,26 +54,19 @@ HTMLImportLoader::HTMLImportLoader(HTMLImportsController* controller)
HTMLImportLoader::~HTMLImportLoader()
{
#if !ENABLE(OILPAN)
- clear();
+ dispose();
#endif
}
-#if !ENABLE(OILPAN)
-void HTMLImportLoader::importDestroyed()
-{
- clear();
-}
-
-void HTMLImportLoader::clear()
+void HTMLImportLoader::dispose()
{
m_controller = nullptr;
if (m_document) {
- m_document->setImportsController(0);
+ m_document->setImportsController(nullptr);
m_document->cancelParsing();
m_document.clear();
}
}
-#endif
void HTMLImportLoader::startLoading(const ResourcePtr<RawResource>& resource)
{
@@ -207,13 +200,11 @@ void HTMLImportLoader::addImport(HTMLImportChild* import)
import->didFinishLoading();
}
-#if !ENABLE(OILPAN)
void HTMLImportLoader::removeImport(HTMLImportChild* client)
{
ASSERT(kNotFound != m_imports.find(client));
m_imports.remove(m_imports.find(client));
}
-#endif
bool HTMLImportLoader::shouldBlockScriptExecution() const
{
« no previous file with comments | « Source/core/html/imports/HTMLImportLoader.h ('k') | Source/core/html/imports/HTMLImportTreeRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698