CSSValueList should assert that no null values are added to it.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2014 04:31:47 +0000 (04:31 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2014 04:31:47 +0000 (04:31 +0000)
commit309c32d5482a10aa63d25d2718f39916b2cf20b4
tree797ac90b707aae9995fac8335500991903d139f1
parent36378aef2be167cd34b362fbb6b1dbe4693eaa13
CSSValueList should assert that no null values are added to it.
<https://webkit.org/b/130315>

Add assertions in CSSValueList's append() and prepend() that we are
not adding a null value. This caught a single place in CSSParser
that was appending an alread-released RefPtr to a CSSValueList.
That list was eventually discarded anyway (due to "foundClip" now
being true), so the fix is simply to remove the adding.

Eventually we should use Ref and PassRef all over for CSSValueList,
this is just a first step on the way.

Reviewed by Darin Adler.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillShorthand):
* css/CSSValueList.h:
(WebCore::CSSValueList::append):
(WebCore::CSSValueList::prepend):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSValueList.h