Closed Bug 334233 Opened 19 years ago Closed 19 years ago

[FIX]NS_ScriptErrorReporter would use rv uninitialized if !message && !report

Categories

(Core :: DOM: Core & HTML, defect, P4)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: timeless, Assigned: bzbarsky)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity)

Attachments

(1 file)

I don't think this is supposed to happen. I believe coverity has ways that you can hint to it about conditions you want, so we could either use that hint, or just set rv to NS_ERROR_NOT_AVAILABLE or something so that the code doesn't trigger the case (which seems cheaper to me than adding a coverity specific marker).
Attached patch I think this is the way to go (deleted) — Splinter Review
Note that the assert is needed, imo. The other change is optional.
Assignee: general → bzbarsky
Status: UNCONFIRMED → ASSIGNED
Attachment #218599 - Flags: superreview?(jst)
Attachment #218599 - Flags: review?(jst)
Priority: -- → P4
Summary: NS_ScriptErrorReporter would use rv uninitialized if !message && !report → [FIX]NS_ScriptErrorReporter would use rv uninitialized if !message && !report
Target Milestone: --- → mozilla1.9alpha
Comment on attachment 218599 [details] [diff] [review] I think this is the way to go r+sr=jst
Attachment #218599 - Flags: superreview?(jst)
Attachment #218599 - Flags: superreview+
Attachment #218599 - Flags: review?(jst)
Attachment #218599 - Flags: review+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: