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

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

Issue 183883004: Let ContentSecurityPolicy shared between imports and the master. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adding guardRef()/guardDeref() Created 6 years, 10 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/HTMLImportChild.h ('k') | Source/core/html/imports/HTMLImportLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/imports/HTMLImportChild.cpp
diff --git a/Source/core/html/imports/HTMLImportChild.cpp b/Source/core/html/imports/HTMLImportChild.cpp
index f89b3e59f8f8725e109f228cf8d1edf5b830a2c5..7143a0b5be6d484d92a7ea7677d6f9007ccaf2af 100644
--- a/Source/core/html/imports/HTMLImportChild.cpp
+++ b/Source/core/html/imports/HTMLImportChild.cpp
@@ -39,12 +39,14 @@
namespace WebCore {
-HTMLImportChild::HTMLImportChild(const KURL& url, bool createdByParser)
+HTMLImportChild::HTMLImportChild(Document& master, const KURL& url, bool createdByParser)
: HTMLImport(createdByParser)
+ , m_master(master)
, m_url(url)
, m_customElementMicrotaskStep(0)
, m_client(0)
{
+ m_master.guardRef();
}
HTMLImportChild::~HTMLImportChild()
@@ -60,6 +62,8 @@ HTMLImportChild::~HTMLImportChild()
if (m_client)
m_client->importChildWasDestroyed(this);
+
+ m_master.guardDeref();
}
void HTMLImportChild::wasAlreadyLoaded()
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.h ('k') | Source/core/html/imports/HTMLImportLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698