Closed Bug 804991 Opened 7 years ago Closed 7 years ago
Content expect a non-null pointer and add From Content Or Null
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 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+
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
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
> This was actually not true Hrm. I wonder why not. Maybe one of the canvas callers is being silly? :(
You need to log in before you can comment on or make changes to this bug.