Closed Bug 346767 Opened 18 years ago Closed 18 years ago

valgrind warning reading uninitialized memory due to nsBoxFrame::FireDOMEventSynch

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Unassigned)

References

Details

(Keywords: valgrind)

Attachments

(2 files)

In a Firefox trunk build, when I hover the mouse pointer over the search box in the browser window (not sure which part), I see a valgrind warning, which I'll attached.  I'm pretty sure the cause is this code in nsBoxFrame::FireDOMEventSynch :

      nsEventStatus eventStatusUnused;
      nsEventDispatcher::DispatchDOMEvent(content, nsnull, event,
                                          presContext, &eventStatusUnused);

The fifth parameter to nsEventDispatcher::DispatchDOMEvent is an **optionally null** (I think, although it's not documented!) ****in-out**** (I'm pretty sure of that, but it's also not documented!) parameter.

This seems like a mistake in the tweak in bug 339237 comment 47.
Attached file valgrind warnings
These happen when I move the mouse rightward from the main area of the search box to over the magnifying glass icon.
Attached patch possible patchSplinter Review
This shuts up the warnings, but I'm not sure whether it's really the right thing to do.  Smaug?
Attachment #231523 - Flags: review?(Olli.Pettay)
Flags: blocking1.9a2+
Flags: blocking1.9a1?
Comment on attachment 231523 [details] [diff] [review]
possible patch

yep, this works. I have to document the nsEventStatus parameter.
Attachment #231523 - Flags: review?(Olli.Pettay) → review+
Attachment #231523 - Flags: superreview?(bzbarsky)
Attachment #231523 - Flags: superreview?(bzbarsky) → superreview+
And maybe file a followup on documenting this better?
Documentation bug is bug 346853.
Checked in to trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Flags: blocking1.9a1?
Keywords: valgrind
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: