Closed Bug 907489 Opened 11 years ago Closed 11 years ago

PresShell::HandleEvent() never initializes its "flags" variable

Categories

(Core :: Layout, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: dholbert, Assigned: billm)

References

Details

Attachments

(1 file)

Newish build warning, with GCC 4.8 on Linux: { layout/base/nsPresShell.cpp:6185:48: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized] } This is from this change: > + uint32_t flags; > if (aEvent->message == NS_TOUCH_START) { > + flags |= INPUT_IGNORE_ROOT_SCROLL_FRAME; http://hg.mozilla.org/mozilla-central/rev/8a68e032ca51#l1.12 from bug 901962 , which kats landed last week. And the warning is very right, AFAICT -- we're declaring "flags", uninitialized, and then we start orring in some bits. Presumably we should be declaring it as "uint32_t flags = 0;" right?
Blocks: 904158
Attached patch uninit-flagsSplinter Review
Oddly, this causes scrollbars not to work in e10s.
Assignee: nobody → wmccloskey
Status: NEW → ASSIGNED
Attachment #793241 - Flags: review?(matt.woodrow)
Blocks: 901962
No longer blocks: 904158
Attachment #793241 - Flags: review?(matt.woodrow) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Good catch, thanks for the fix!
Uplift?
Comment on attachment 793241 [details] [diff] [review] uninit-flags [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 901962 User impact if declined: possibly random behaviour from an uninitialized variable Testing completed (on m-c, etc.): on m-c Risk to taking this patch (and alternatives if risky): very low risk String or IDL/UUID changes made by this patch: none
Attachment #793241 - Flags: approval-mozilla-beta?
Comment on attachment 793241 [details] [diff] [review] uninit-flags We didn't end up approving bug 901962
Attachment #793241 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: