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

Side by Side Diff: Source/core/css/CSSCalculationValue.h

Issue 189543014: Ensure proper finalization of garbage-collected types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: finalize HashTable 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 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 enum CalculationCategory { 50 enum CalculationCategory {
51 CalcNumber = 0, 51 CalcNumber = 0,
52 CalcLength, 52 CalcLength,
53 CalcPercent, 53 CalcPercent,
54 CalcPercentNumber, 54 CalcPercentNumber,
55 CalcPercentLength, 55 CalcPercentLength,
56 CalcOther 56 CalcOther
57 }; 57 };
58 58
59 class CSSCalcExpressionNode : public RefCountedWillBeGarbageCollected<CSSCalcExp ressionNode> { 59 class CSSCalcExpressionNode : public RefCountedWillBeGarbageCollectedFinalized<C SSCalcExpressionNode> {
haraken 2014/03/11 10:26:37 Why does this class need to be GarbageCollectedFin
zerny-chromium 2014/03/11 11:05:25 Because it has a virtual destructor.
Mads Ager (chromium) 2014/03/11 13:34:41 The virtual destructor is definitely needed when !
zerny-chromium 2014/03/11 13:54:12 Will do.
60 public: 60 public:
61 enum Type { 61 enum Type {
62 CssCalcPrimitiveValue = 1, 62 CssCalcPrimitiveValue = 1,
63 CssCalcBinaryOperation 63 CssCalcBinaryOperation
64 }; 64 };
65 65
66 virtual ~CSSCalcExpressionNode() = 0; 66 virtual ~CSSCalcExpressionNode() = 0;
67 virtual bool isZero() const = 0; 67 virtual bool isZero() const = 0;
68 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const CSSToLengthConversi onData&) const = 0; 68 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const CSSToLengthConversi onData&) const = 0;
69 virtual double doubleValue() const = 0; 69 virtual double doubleValue() const = 0;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 const RefPtrWillBeMember<CSSCalcExpressionNode> m_expression; 136 const RefPtrWillBeMember<CSSCalcExpressionNode> m_expression;
137 const bool m_nonNegative; 137 const bool m_nonNegative;
138 }; 138 };
139 139
140 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue()); 140 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue());
141 141
142 } // namespace WebCore 142 } // namespace WebCore
143 143
144 144
145 #endif // CSSCalculationValue_h 145 #endif // CSSCalculationValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698