[webkit-reviews] review granted: [Bug 117617] CSSParser::parseImageSet() doesn't need a parameter. : [Attachment 204653] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 13 17:57:56 PDT 2013
Darin Adler <darin at apple.com> has granted Jaehun Lim
<ljaehun.lim at samsung.com>'s request for review:
Bug 117617: CSSParser::parseImageSet() doesn't need a parameter.
https://bugs.webkit.org/show_bug.cgi?id=117617
Attachment 204653: Patch
https://bugs.webkit.org/attachment.cgi?id=204653&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=204653&action=review
> Source/WebCore/css/CSSParser.cpp:8028
> + ASSERT(value->unit == CSSParserValue::Function && value->function);
We never use && in an ASSERT. Instead use two separate assertions so you can
see which failed.
ASSERT(value->unit == CSSParserValue::Function);
ASSERT(value->function);
But also, I don’t think that ASSERT(value->function) is all that useful. We’ll
see the null dereference right after this, it won’t be hard to debug. And
there’s no reason to expect a null here.
> Source/WebCore/css/CSSParser.cpp:8042
> RefPtr<CSSImageValue> image =
CSSImageValue::create(completeURL(arg->string));
> - imageSet->append(image);
> + imageSet->append(image.release());
Why use a local variable at all? I think this is better in a single line.
More information about the webkit-reviews
mailing list