Closed
Bug 32370
Opened 26 years ago
Closed 26 years ago
Variables used before they are set in nsJSXUL*
Categories
(Core :: Security, defect, P3)
Tracking
()
VERIFIED
WORKSFORME
M15
People
(Reporter: jim_nance, Assigned: norrisboyd)
Details
Attachments
(1 file)
|
4.40 KB,
patch
|
Details | Diff | Splinter Review |
My compiler discovered several places in the code where variables
were being used before they were set. I took a look at the code
and the compiler was right. These look like real bugs. I have
attached a patch that fixes these problems.
Comment 2•26 years ago
|
||
CVS log says all these belong to norris.
Assignee: cbegle → norris
Component: Browser-General → Security: General
QA Contact: asadotzler → junruh
Summary: Variables used before they are set → Variables used before they are set in nsJSXUL*
| Assignee | ||
Comment 3•26 years ago
|
||
The change in nsHTMLSelectElement.cpp appears already to have been made.
All the nsJSXUL* files are generated by the DOM idl compiler. I tweaked that
recently; thanks for catching the problems. I'll fix it by redoing the compiler.
Status: NEW → ASSIGNED
Target Milestone: M15
| Assignee | ||
Comment 4•26 years ago
|
||
actually, when I look at the latest version on the tip, all the declarations of
nsresult rv are now initialized to NS_OK. So there shouldn't be any reads of
uninitialized variables.
I don't think I'll try to actually remove the declarations and usages of rv from
the places you indicate. It's hard to detect those situations in the stub
generator (see mozilla/dom/tools/JSStubGen.cpp), and a halfway decent optimizing
compiler should do constant propagation and dead code elimination to produce the
same effect.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•