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

Unified Diff: third_party/WebKit/Source/core/html/imports/HTMLImportsController.cpp

Issue 1914183002: Simplify ownership handling of HTMLImportsController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: drop Finalized Created 4 years, 8 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
Index: third_party/WebKit/Source/core/html/imports/HTMLImportsController.cpp
diff --git a/third_party/WebKit/Source/core/html/imports/HTMLImportsController.cpp b/third_party/WebKit/Source/core/html/imports/HTMLImportsController.cpp
index 0337f262ae0893f9069e46b513466f1f67d8453e..0b0e915fd7abf8f6dbf9b06924a50368c85790bb 100644
--- a/third_party/WebKit/Source/core/html/imports/HTMLImportsController.cpp
+++ b/third_party/WebKit/Source/core/html/imports/HTMLImportsController.cpp
@@ -41,37 +41,12 @@
namespace blink {
-const char* HTMLImportsController::supplementName()
-{
- return "HTMLImportsController";
-}
-
-void HTMLImportsController::provideTo(Document& master)
-{
- HTMLImportsController* controller = new HTMLImportsController(master);
- master.setImportsController(controller);
- Supplement<Document>::provideTo(master, supplementName(), controller);
-}
-
-void HTMLImportsController::removeFrom(Document& master)
-{
- HTMLImportsController* controller = master.importsController();
- ASSERT(controller);
- controller->dispose();
- static_cast<Supplementable<Document>&>(master).removeSupplement(supplementName());
- master.setImportsController(nullptr);
-}
-
HTMLImportsController::HTMLImportsController(Document& master)
: m_root(HTMLImportTreeRoot::create(&master))
{
UseCounter::count(master, UseCounter::HTMLImports);
}
-HTMLImportsController::~HTMLImportsController()
-{
-}
-
void HTMLImportsController::dispose()
{
if (m_root) {
@@ -172,7 +147,6 @@ DEFINE_TRACE(HTMLImportsController)
{
visitor->trace(m_root);
visitor->trace(m_loaders);
- Supplement<Document>::trace(visitor);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698