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

RESOLVED FIXED in Firefox 28

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

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

Trunk
mozilla29
csectype-uninitialized, regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox27 unaffected, firefox28 fixed, firefox29 fixed)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 8346408 [details] [diff] [review]
Wsometimes-uninitialized_preventDefaultCalled.patch

Fix warning:

dom/workers/WorkerPrivate.cpp: [-Wsometimes-uninitialized] variable 'preventDefaultCalled' is used uninitialized whenever 'if' condition is false
Attachment #8346408 - Flags: review?(khuey)
(Assignee)

Comment 1

5 years ago
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)
Duplicate of this bug: 949800
(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)
Keywords: csectype-uninitialized, regression
(Assignee)

Comment 4

5 years ago
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.
(Assignee)

Comment 7

5 years ago
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?
(Assignee)

Updated

5 years ago
status-firefox27: --- → unaffected
status-firefox28: --- → affected
status-firefox29: --- → affected
https://hg.mozilla.org/mozilla-central/rev/00e3d27f01da
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Attachment #8346408 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/c89197c22c25
status-firefox28: affected → fixed
status-firefox29: affected → fixed
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.