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

Unified Diff: third_party/WebKit/Source/core/html/imports/LinkImport.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
« no previous file with comments | « third_party/WebKit/Source/core/html/imports/HTMLImportsController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/imports/LinkImport.cpp
diff --git a/third_party/WebKit/Source/core/html/imports/LinkImport.cpp b/third_party/WebKit/Source/core/html/imports/LinkImport.cpp
index 82609c7969feb8457fdea89591f172d3a571c506..ca8fcb4f0c40e9dea10491779b67252d6dc2afd3 100644
--- a/third_party/WebKit/Source/core/html/imports/LinkImport.cpp
+++ b/third_party/WebKit/Source/core/html/imports/LinkImport.cpp
@@ -73,8 +73,10 @@ void LinkImport::process()
return;
if (!m_owner->document().importsController()) {
- ASSERT(m_owner->document().frame()); // The document should be the master.
- HTMLImportsController::provideTo(m_owner->document());
+ // The document should be the master.
+ Document& master = m_owner->document();
+ ASSERT(master.frame());
+ master.setImportsController(HTMLImportsController::create(master));
}
LinkRequestBuilder builder(m_owner);
« no previous file with comments | « third_party/WebKit/Source/core/html/imports/HTMLImportsController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698