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

Unified Diff: Source/core/css/CSSCalculationValue.cpp

Issue 209433004: Do not zero-initialize RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compilation on gcc and msvc 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSBasicShapes.cpp ('k') | Source/core/css/CSSCalculationValueTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSCalculationValue.cpp
diff --git a/Source/core/css/CSSCalculationValue.cpp b/Source/core/css/CSSCalculationValue.cpp
index 03eefe953d70671b4986e3b9f11b08caeb4c4b4b..6f6cc957e4740839995384d570f9544754be50c3 100644
--- a/Source/core/css/CSSCalculationValue.cpp
+++ b/Source/core/css/CSSCalculationValue.cpp
@@ -542,7 +542,7 @@ static ParseState checkDepthAndIndex(int* depth, unsigned index, CSSParserValueL
}
class CSSCalcExpressionNodeParser {
- DISALLOW_ALLOCATION(); // Is only ever stack allocated.
+ STACK_ALLOCATED();
public:
PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> parseCalc(CSSParserValueList* tokens)
{
@@ -557,9 +557,9 @@ public:
private:
struct Value {
- DISALLOW_ALLOCATION(); // Is only ever stack allocated.
+ STACK_ALLOCATED();
public:
- RefPtrWillBeRawPtr<CSSCalcExpressionNode> value;
+ RefPtrWillBeMember<CSSCalcExpressionNode> value;
};
char operatorValue(CSSParserValueList* tokens, unsigned index)
@@ -744,7 +744,7 @@ PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> CSSCalcValue::createExpressionNode
PassRefPtrWillBeRawPtr<CSSCalcValue> CSSCalcValue::create(CSSParserString name, CSSParserValueList* parserValueList, ValueRange range)
{
CSSCalcExpressionNodeParser parser;
- RefPtrWillBeRawPtr<CSSCalcExpressionNode> expression;
+ RefPtrWillBeRawPtr<CSSCalcExpressionNode> expression = nullptr;
if (equalIgnoringCase(name, "calc(") || equalIgnoringCase(name, "-webkit-calc("))
expression = parser.parseCalc(parserValueList);
« no previous file with comments | « Source/core/css/CSSBasicShapes.cpp ('k') | Source/core/css/CSSCalculationValueTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698