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

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

Issue 170283019: Change various helper classes to transition types to get CSSValue entirely onto the gc heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed incorrect persistent found by the clang oilpan plugin 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
OLDNEW
1 /** 1 /**
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2002, 2005, 2006, 2012 Apple Computer, Inc. 4 * Copyright (C) 2002, 2005, 2006, 2012 Apple Computer, Inc.
5 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) 5 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org)
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 17 matching lines...) Expand all
28 28
29 namespace WebCore { 29 namespace WebCore {
30 30
31 CSSMediaRule::CSSMediaRule(StyleRuleMedia* mediaRule, CSSStyleSheet* parent) 31 CSSMediaRule::CSSMediaRule(StyleRuleMedia* mediaRule, CSSStyleSheet* parent)
32 : CSSGroupingRule(mediaRule, parent) 32 : CSSGroupingRule(mediaRule, parent)
33 { 33 {
34 } 34 }
35 35
36 CSSMediaRule::~CSSMediaRule() 36 CSSMediaRule::~CSSMediaRule()
37 { 37 {
38 if (m_mediaCSSOMWrapper) 38 if (m_mediaCSSOMWrapper)
Mads Ager (chromium) 2014/03/03 10:38:45 This is unsafe. They are both in the heap now. Do
wibling-chromium 2014/03/03 10:45:08 Thanks for catching this. I have added the ifdef.
39 m_mediaCSSOMWrapper->clearParentRule(); 39 m_mediaCSSOMWrapper->clearParentRule();
40 } 40 }
41 41
42 MediaQuerySet* CSSMediaRule::mediaQueries() const 42 MediaQuerySet* CSSMediaRule::mediaQueries() const
43 { 43 {
44 return toStyleRuleMedia(m_groupRule.get())->mediaQueries(); 44 return toStyleRuleMedia(m_groupRule.get())->mediaQueries();
45 } 45 }
46 46
47 String CSSMediaRule::cssText() const 47 String CSSMediaRule::cssText() const
48 { 48 {
(...skipping 18 matching lines...) Expand all
67 return m_mediaCSSOMWrapper.get(); 67 return m_mediaCSSOMWrapper.get();
68 } 68 }
69 69
70 void CSSMediaRule::reattach(StyleRuleBase* rule) 70 void CSSMediaRule::reattach(StyleRuleBase* rule)
71 { 71 {
72 CSSGroupingRule::reattach(rule); 72 CSSGroupingRule::reattach(rule);
73 if (m_mediaCSSOMWrapper && mediaQueries()) 73 if (m_mediaCSSOMWrapper && mediaQueries())
74 m_mediaCSSOMWrapper->reattach(mediaQueries()); 74 m_mediaCSSOMWrapper->reattach(mediaQueries());
75 } 75 }
76 76
77 void CSSMediaRule::trace(Visitor* visitor)
78 {
79 visitor->trace(m_mediaCSSOMWrapper);
80 CSSGroupingRule::trace(visitor);
81 }
77 } // namespace WebCore 82 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698