Open
Bug 2089950
Opened 13 days ago
Remove the dead !mEvent check in MouseEvent.cpp
Categories
(Core :: DOM: UI Events & Focus Handling, task)
Core
DOM: UI Events & Focus Handling
Tracking
()
NEW
People
(Reporter: Sylvestre, Unassigned, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=c++])
Filing as a good first bug to learn workflows.
mEvent can never be null in an Event subclass (the Event constructor always sets it). Drop the !mEvent || part of the condition below.
Current code:
if (!mEvent || !mEvent->AsGUIEvent()->mWidget ||
(mEvent->mMessage != eMouseMove && mEvent->mMessage != ePointerMove &&
Link to the code:
https://searchfox.org/firefox-main/source/dom/events/MouseEvent.cpp
To verify the fix:
./mach build
./mach test dom/events/test --headless
This was reported by Coverity Scan (CID 1636982). The analyzer will stop reporting it once the change lands.
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
You need to log in
before you can comment on or make changes to this bug.
Description
•