Closed
Bug 315990
Opened 20 years ago
Closed 20 years ago
"this.statement.causes.an.error" is ignored instead of throwing
Categories
(Core :: JavaScript Engine, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha1
People
(Reporter: jruderman, Assigned: brendan)
Details
(Keywords: regression, verified1.8.1)
Attachments
(2 files)
|
158 bytes,
text/html
|
Details | |
|
1.20 KB,
patch
|
mrbkap
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
The statement "this.statement.causes.an.error" is ignored instead of throwing an exception. It seems like the statement is being optimized away. This regressed on the MOZILLA_1_8_BRANCH between 2005-09-22 and 2005-09-23.
Gecko/20050923 Firefox/1.4
FAIL (does not throw an error)
"Warning: useless expression"
Gecko/20050922 Firefox/1.4
PASS (throws an error)
"Warning: reference to undefined property this.statement"
| Reporter | ||
Comment 1•20 years ago
|
||
| Reporter | ||
Comment 2•20 years ago
|
||
I hit this bug because I had used "this.line.causes.an.error" as an example for the http://www.squarefree.com/jsenv/. I changed the example to "this.statement.causes(an.error)" to work around this bug.
Comment 3•20 years ago
|
||
| Assignee | ||
Comment 4•20 years ago
|
||
Useless useless expression eliminator!
/be
| Assignee | ||
Comment 5•20 years ago
|
||
The fix for bug 308085 exposed a very old latent logic bug. Patch should be easy to follow: any foo.bar expression (it doesn't matter whether foo is an identifier, this, true, false, null, or a more complex expression) might call a getters, so it must be presumed useful.
The pn2->pn_type == TOK_NAME condition was in the wrong place, alas -- it should not prevent a dotted expression in pn from being handled by the then clause of the outer if, but it should guard the call to LookupArgOrVar.
/be
Attachment #202630 -
Flags: review?(mrbkap)
Comment 6•20 years ago
|
||
Comment on attachment 202630 [details] [diff] [review]
fix
r=mrbkap
Attachment #202630 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 7•20 years ago
|
||
Fixed on trunk.
/be
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 8•20 years ago
|
||
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-315990.js,v <-- regress-315990.js
initial revision: 1.1
Flags: testcase+
Updated•20 years ago
|
Flags: blocking1.8.1?
Updated•20 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Updated•20 years ago
|
Attachment #202630 -
Flags: approval1.8.1+
Updated•20 years ago
|
Whiteboard: [checkin needed]
| Assignee | ||
Updated•20 years ago
|
Keywords: fixed1.8.1
| Assignee | ||
Updated•20 years ago
|
Whiteboard: [checkin needed]
Comment 10•20 years ago
|
||
verified fixed 1.8.1 20060707 win/macppc/linux
Keywords: fixed1.8.1 → verified1.8.1
Comment 11•19 years ago
|
||
not fixed on 1.8.0, not making js16
You need to log in
before you can comment on or make changes to this bug.
Description
•