Closed
Bug 907547
Opened 12 years ago
Closed 12 years ago
Remove unnecessary null-checks of nsCSSValue::BufferFromString()'s return value
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: dholbert, Assigned: dholbert)
References
()
Details
Attachments
(1 file)
3.53 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
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.[1]
That bug's patch remove a null-check from one BufferFromString caller[2], but it left behind others. Filing this bug on removing null-checks from the other callers.
[1] http://hg.mozilla.org/mozilla-central/rev/67673422f7d2#l6.40
[2] http://hg.mozilla.org/mozilla-central/rev/67673422f7d2#l1.633
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #793326 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 2•12 years ago
|
||
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 3•12 years ago
|
||
Comment on attachment 793326 [details] [diff] [review]
fix v1
r=me
Attachment #793326 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Flags: in-testsuite-
Comment 5•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•