Index: third_party/WebKit/Source/core/css/StyleRuleImport.cpp |
diff --git a/third_party/WebKit/Source/core/css/StyleRuleImport.cpp b/third_party/WebKit/Source/core/css/StyleRuleImport.cpp |
index 2bafa099f0efe3e97a819a5ba9595515e2f9d650..fce49e8554ac9b031461327acb7728c48786cd13 100644 |
--- a/third_party/WebKit/Source/core/css/StyleRuleImport.cpp |
+++ b/third_party/WebKit/Source/core/css/StyleRuleImport.cpp |
@@ -38,7 +38,7 @@ StyleRuleImport* StyleRuleImport::create(const String& href, MediaQuerySet* medi |
StyleRuleImport::StyleRuleImport(const String& href, MediaQuerySet* media) |
: StyleRuleBase(Import) |
, m_parentStyleSheet(nullptr) |
- , m_styleSheetClient(this) |
+ , m_styleSheetClient(new ImportedStyleSheetClient(this)) |
, m_strHref(href) |
, m_mediaQueries(media) |
, m_loading(false) |
@@ -56,7 +56,7 @@ StyleRuleImport::~StyleRuleImport() |
void StyleRuleImport::dispose() |
{ |
if (m_resource) |
- m_resource->removeClient(&m_styleSheetClient); |
+ m_resource->removeClient(m_styleSheetClient); |
haraken
2016/05/20 09:21:10
Can you move this to a pre-finalizer of ImportedSt
yhirano
2016/05/23 11:29:05
In this case StyleRuleImport has the resource and
|
m_resource = nullptr; |
} |
@@ -140,7 +140,7 @@ void StyleRuleImport::requestStyleSheet() |
if (m_parentStyleSheet && m_parentStyleSheet->loadCompleted() && rootSheet == m_parentStyleSheet) |
m_parentStyleSheet->startLoadingDynamicSheet(); |
m_loading = true; |
- m_resource->addClient(&m_styleSheetClient); |
+ m_resource->addClient(m_styleSheetClient); |
} |
} |