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

Side by Side Diff: Source/core/css/CSSGroupingRule.cpp

Issue 185673002: Oilpan: ~CSSGroupingRule should not touch its Member<>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above 9 * 1. Redistributions of source code must retain the above
10 * copyright notice, this list of conditions and the following 10 * copyright notice, this list of conditions and the following
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 CSSGroupingRule::CSSGroupingRule(StyleRuleGroup* groupRule, CSSStyleSheet* paren t) 44 CSSGroupingRule::CSSGroupingRule(StyleRuleGroup* groupRule, CSSStyleSheet* paren t)
45 : CSSRule(parent) 45 : CSSRule(parent)
46 , m_groupRule(groupRule) 46 , m_groupRule(groupRule)
47 , m_childRuleCSSOMWrappers(groupRule->childRules().size()) 47 , m_childRuleCSSOMWrappers(groupRule->childRules().size())
48 { 48 {
49 } 49 }
50 50
51 CSSGroupingRule::~CSSGroupingRule() 51 CSSGroupingRule::~CSSGroupingRule()
52 { 52 {
53 ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size()); 53 ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size());
54 #if !ENABLE(OILPAN)
54 for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) { 55 for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) {
55 if (m_childRuleCSSOMWrappers[i]) 56 if (m_childRuleCSSOMWrappers[i])
56 m_childRuleCSSOMWrappers[i]->setParentRule(0); 57 m_childRuleCSSOMWrappers[i]->setParentRule(0);
57 } 58 }
59 #endif
58 } 60 }
59 61
60 unsigned CSSGroupingRule::insertRule(const String& ruleString, unsigned index, E xceptionState& exceptionState) 62 unsigned CSSGroupingRule::insertRule(const String& ruleString, unsigned index, E xceptionState& exceptionState)
61 { 63 {
62 ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size()); 64 ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size());
63 65
64 if (index > m_groupRule->childRules().size()) { 66 if (index > m_groupRule->childRules().size()) {
65 exceptionState.throwDOMException(IndexSizeError, "the index " + String:: number(index) + " must be less than or equal to the length of the rule list."); 67 exceptionState.throwDOMException(IndexSizeError, "the index " + String:: number(index) + " must be less than or equal to the length of the rule list.");
66 return 0; 68 return 0;
67 } 69 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 155
154 void CSSGroupingRule::trace(Visitor* visitor) 156 void CSSGroupingRule::trace(Visitor* visitor)
155 { 157 {
156 CSSRule::trace(visitor); 158 CSSRule::trace(visitor);
157 #if ENABLE(OILPAN) 159 #if ENABLE(OILPAN)
158 visitor->trace(m_childRuleCSSOMWrappers); 160 visitor->trace(m_childRuleCSSOMWrappers);
159 #endif 161 #endif
160 } 162 }
161 163
162 } // namespace WebCore 164 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698