Closed Bug 288739 Opened 20 years ago Closed 20 years ago

crash in nsEventStateManager::NotifyMouseOut

Categories

(Core :: DOM: Events, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED WONTFIX

People

(Reporter: vlad, Unassigned)

Details

Attachments

(1 file)

Attached patch fixes a crash in nsEventStateManager::NotifyMouseOut when moving
out of an element that doesn't implement nsIFrameFrame.  Seeing it with my
<canvas> element in trunk from 4/1; initializing subdocFrame to nsnull makes the
crash go away -- not sure if it's something specific to my <canvas> impl, as I
wasn't able to reproduce with other elements.
CallQI is guaranteed to set the out param to null if the QI fails, iirc.  If it
does not, someone's QI impl is broken.
Is the impl in question in the tree somewhere?
But if the impl isn't "officially" broken then a better fix would be to check
the result of CallQueryInterface rather than the nullness of its out param.
I'm not sure what object it's calling QI on; will try to figure that out.  My
own stuff all uses the macros which guarantee nsnull-ness, but by XPCOM rules it
shouldn't touch that out param if it throws an exception (returns
NS_NO_INTERFACE), no?  It seems that depending on the particular behaviour of
our macros is bad.
It was my frame object, which had its own QueryInterface that didn't use the
macros.  Going to mark this bug as WONTFIX, as the assumes-return-set-to-nsnull
pattern is used in a bunch of other places, and will just fix my QI impl. :)
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
Attachment #179367 - Flags: review?(bzbarsky)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: