Index: third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp |
diff --git a/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp b/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp |
index 88cae61ce48c759a844bafe5a82910b0f8a098a8..f80fd37122b70ae8a87f947f367f92cfbab00d6a 100644 |
--- a/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp |
+++ b/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp |
@@ -173,8 +173,12 @@ CSSKeyframeRule* CSSKeyframesRule::item(unsigned index) const { |
CSSKeyframeRule* CSSKeyframesRule::anonymousIndexedGetter( |
unsigned index) const { |
- if (UseCounter* useCounter = UseCounter::getFrom(parentStyleSheet())) |
- useCounter->count(UseCounter::CSSKeyframesRuleAnonymousIndexedGetter); |
+ const Document* parentDocument = |
+ CSSStyleSheet::singleOwnerDocument(parentStyleSheet()); |
+ if (parentDocument) { |
+ UseCounter::count(*parentDocument, |
+ UseCounter::CSSKeyframesRuleAnonymousIndexedGetter); |
+ } |
return item(index); |
} |