Closed
Bug 804991
Opened 13 years ago
Closed 13 years ago
Make FromContent expect a non-null pointer and add FromContentOrNull
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: peterv, Assigned: peterv)
References
Details
Attachments
(1 file)
|
22.51 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
We have a couple of FromContent methods, and they're inconsistent about whether they accept a null pointer. I think we should make FromContent always expect a non-null pointer and add a FromContentOrNull for those cases where we expect null pointers too. I have a patch that implements this, I went through all the existing callers, where the existing FromContent implementation didn't deal with null I left the calls as is, where the existing FromContent implementation did deal with null I've either changed for FromContentOrNull or to FromContent if it was clear from the context that we never passed in null. We could make FromContent take a reference, to make it really obvious that it expects a non-null pointer, but I'm not sure it's that important.
Attachment #674638 -
Flags: review?(bzbarsky)
Comment 1•13 years ago
|
||
Comment on attachment 674638 [details] [diff] [review]
v1
aElement is never null in SurfaceFromElement. So you can use FromContent there.
r=me with that
Attachment #674638 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 2•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ee3ee9e659bd(In reply to
> aElement is never null in SurfaceFromElement. So you can use FromContent
> there.
This was actually not true, so also checked in a bustage fix:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0e0750c14c49
Comment 3•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ee3ee9e659bd
https://hg.mozilla.org/mozilla-central/rev/0e0750c14c49
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 4•13 years ago
|
||
> This was actually not true
Hrm. I wonder why not. Maybe one of the canvas callers is being silly? :(
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•