Closed Bug 1298723 Opened 3 years ago Closed 3 years ago

Remove unnecessary null check in ShouldClearPurple

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: njn, Assigned: njn)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: [CID 748767])

Attachments

(1 file)

ShouldClearPurple() checks if |aContent| is null and then dereferences it anyway (via the call to GetJSObjectChild()). Turns out the null check isn't needed because all call sites ensure the argument isn't null.
I considered using mozilla::NotNull here but decided it was overkill.
Attachment #8785754 - Flags: review?(continuation)
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Component: DOM → XPCOM
Component: XPCOM → DOM
Attachment #8785754 - Flags: review?(continuation) → review+
Pushed by philringnalda@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b938bb0e73af
followup, make it actually compile, on a CLOSED TREE
https://hg.mozilla.org/mozilla-central/rev/1c955143cc7b
https://hg.mozilla.org/mozilla-central/rev/b938bb0e73af
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.