dom/workers/WorkerPrivate.cpp: [-Wsometimes-uninitialized] variable 'preventDefaultCalled' is used uninitialized whenever 'if' condition is false

RESOLVED FIXED in Firefox 28

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

(Blocks 1 bug, {csectype-uninitialized, regression})

Trunk
mozilla29
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox27 unaffected, firefox28 fixed, firefox29 fixed)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

Fix warning:

dom/workers/WorkerPrivate.cpp: [-Wsometimes-uninitialized] variable 'preventDefaultCalled' is used uninitialized whenever 'if' condition is false
Attachment #8346408 - Flags: review?(khuey)
Also, should the LOAD_ERROR InternalScriptErrorEvent at [1] have its typeString set to "error" like the LOAD_ERROR InternalScriptErrorEvent above at [2]?

[1] https://hg.mozilla.org/mozilla-central/annotate/1ad9af3a2ab8/dom/workers/WorkerPrivate.cpp#l1237

[2] https://hg.mozilla.org/mozilla-central/annotate/1ad9af3a2ab8/dom/workers/WorkerPrivate.cpp#l1219
Flags: needinfo?(khuey)
Blocks: 935692
(In reply to Chris Peterson (:cpeterson) from comment #1)
> Also, should the LOAD_ERROR InternalScriptErrorEvent at [1] have its
> typeString set to "error" like the LOAD_ERROR InternalScriptErrorEvent above
> at [2]?
> 
> [1]
> https://hg.mozilla.org/mozilla-central/annotate/1ad9af3a2ab8/dom/workers/
> WorkerPrivate.cpp#l1237
> 
> [2]
> https://hg.mozilla.org/mozilla-central/annotate/1ad9af3a2ab8/dom/workers/
> WorkerPrivate.cpp#l1219

That's intentional.  Although I don't think it hurts to set it in the other case.
Flags: needinfo?(khuey)
mccr8: should this warning fix be uplifted with your fix for bug 935692? I don't think this bug is sec-sensitive, but the uninitialized value of preventDefaultCalled is likely non-zero, preventing some worker events from running their default actions. We may want this fix for Gecko 28 because it will be the basis of FxOS 1.3.
Flags: needinfo?(continuation)
Yes, this should be uplifted.  mccr8 didn't fix bug 935692 though ;-)
Flags: needinfo?(continuation)
I just like setting flags.
Comment on attachment 8346408 [details] [diff] [review]
Wsometimes-uninitialized_preventDefaultCalled.patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 935692 (regression in Firefox 28)
User impact if declined: Some JS event processing may intermittently fail to run.
Testing completed (on m-c, etc.): Locally.
Risk to taking this patch (and alternatives if risky): Low risk
String or IDL/UUID changes made by this patch: None
Attachment #8346408 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/00e3d27f01da
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Attachment #8346408 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.