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

Unified Diff: Source/core/css/CSSStyleSheet.h

Issue 49093005: Fix memory error during selector matching due to getMatchedCSSRules. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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: Source/core/css/CSSStyleSheet.h
diff --git a/Source/core/css/CSSStyleSheet.h b/Source/core/css/CSSStyleSheet.h
index c0eeb6f0d1db2c5fafcc847e01f3dfe3fda6e742..5b096a5eac794c3ad5f910518d1665868e5e92cc 100644
--- a/Source/core/css/CSSStyleSheet.h
+++ b/Source/core/css/CSSStyleSheet.h
@@ -105,6 +105,8 @@ public:
void clearChildRuleCSSOMWrappers();
void reattachChildRuleCSSOMWrappers();
+ void registerExtraChildRuleCSSOMWrapper(PassRefPtr<CSSRule>);
+
StyleSheetContents* contents() const { return m_contents.get(); }
bool isInline() const { return m_isInlineStylesheet; }
@@ -132,6 +134,9 @@ private:
mutable RefPtr<MediaList> m_mediaCSSOMWrapper;
mutable Vector<RefPtr<CSSRule> > m_childRuleCSSOMWrappers;
+ // These are CSSOMWrappers that come from getMatchedCSSRules and thus don't map 1-1 to
+ // the StyleRules in the StyleSheetContents.
+ mutable Vector<RefPtr<CSSRule> > m_extraChildRuleCSSOMWrappers;
mutable OwnPtr<CSSRuleList> m_ruleListCSSOMWrapper;
};

Powered by Google App Engine
This is Rietveld 408576698