Most callers of nsCSSValue::BufferFromString() null-check its return value, because it used to be fallible. However, bug 659963 changed it to be infallible -- in particular, it made us abort if nsStringBuffer::Alloc() fails. That bug's patch remove a null-check from one BufferFromString caller, but it left behind others. Filing this bug on removing null-checks from the other callers.  http://hg.mozilla.org/mozilla-central/rev/67673422f7d2#l6.40  http://hg.mozilla.org/mozilla-central/rev/67673422f7d2#l1.633
Created attachment 793326 [details] [diff] [review] fix v1
Attachment #793326 - Flags: review?(bzbarsky)
For reference, here's a link to the nsCSSValue::BufferFromString() impl: http://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSValue.cpp?rev=dbc04a661a1a&mark=627-629,635-637#622 ...with its internal null-checks highlighted, which show that there's no way for that function to return null.
Comment on attachment 793326 [details] [diff] [review] fix v1 r=me
Attachment #793326 - Flags: review?(bzbarsky) → review+
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.