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

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

Issue 209433004: Do not zero-initialize RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix uses of RefPtrWillBeRawPtr 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
Index: Source/core/css/StylePropertySerializer.cpp
diff --git a/Source/core/css/StylePropertySerializer.cpp b/Source/core/css/StylePropertySerializer.cpp
index d1ab84000b4f953dcf2a7d5a6f44b2f588bd47b8..489527ff68ed9749d3c74d15df57866d0680d099 100644
--- a/Source/core/css/StylePropertySerializer.cpp
+++ b/Source/core/css/StylePropertySerializer.cpp
@@ -500,7 +500,7 @@ String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
bool useSingleWordShorthand = false;
bool foundPositionYCSSProperty = false;
for (unsigned j = 0; j < size; j++) {
- RefPtrWillBeRawPtr<CSSValue> value;
+ RefPtrWillBeRawPtr<CSSValue> value = nullptr;
if (values[j]) {
if (values[j]->isBaseValueList())
value = toCSSValueList(values[j].get())->item(i);
@@ -527,7 +527,7 @@ String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
// BUG 49055: make sure the value was not reset in the layer check just above.
if ((j < size - 1 && shorthand.properties()[j + 1] == CSSPropertyBackgroundRepeatY && value)
|| (j < size - 1 && shorthand.properties()[j + 1] == CSSPropertyWebkitMaskRepeatY && value)) {
- RefPtrWillBeRawPtr<CSSValue> yValue;
+ RefPtrWillBeRawPtr<CSSValue> yValue = nullptr;
RefPtrWillBeRawPtr<CSSValue> nextValue = values[j + 1];
if (nextValue->isValueList())
yValue = toCSSValueList(nextValue.get())->itemWithoutBoundsCheck(i);

Powered by Google App Engine
This is Rietveld 408576698