Closed
Bug 321757
Opened 20 years ago
Closed 20 years ago
Compound assignment operators (+= etc.) prematurely bind LHS of assignment
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha1
People
(Reporter: brendan, Assigned: brendan)
References
(
URL
)
Details
(Keywords: verified1.8.1)
Attachments
(1 file)
|
9.34 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
Reported by Joaquin Cuenca Abela in news://news.mozilla.org/netscape.public.mozilla.jseng. Primordial bug.
/be
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Summary: assignment operators (+= etc.) prematurely bind LHS of assignment → Compound assignment operators (+= etc.) prematurely bind LHS of assignment
| Assignee | ||
Updated•20 years ago
|
Priority: -- → P1
To answer your question from the newsgroup post, Navigator versions 2.02, 3.01 and 4.04 all say "x is not defined", 4.08 says "NaN". See, this bug is not _that_ ancient. :-)
| Assignee | ||
Comment 2•20 years ago
|
||
Ok, primordial to the dawn of SpiderMonkey, then. SpiderMonkey was written by me in the fall of 1996, based on the Mocha runtime I'd written way too quickly (with Ken Smith transcribing the fatally flawed java.util.Date into the Date class's native implementation) in Spring 1995. So Netscape 2 and 3 used the Mocha runtime while Netscape 4 and of course the Mozilla-based 6 and 7 series used SpiderMonkey.
/be
Comment 3•20 years ago
|
||
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-321757.js,v <-- regress-321757.js
Flags: testcase+
| Assignee | ||
Comment 4•20 years ago
|
||
Straightforward fix, minimized by virtue of existing strict warning check in js_GetProperty.
Note that SpiderMonkey already requires the global object to be native (to satisfy OBJ_IS_NATIVE). This patch ups the ante slightly by requiring the global object's JSObjectOp.getProperty to be js_GetProperty or a wrapper around js_GetProperty, or else to contain this kind of extant property op check and error code.
/be
Attachment #210210 -
Flags: superreview?(shaver)
Attachment #210210 -
Flags: review?(mrbkap)
Comment 5•20 years ago
|
||
Comment on attachment 210210 [details] [diff] [review]
proposed fix
r=mrbkap
Attachment #210210 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 6•20 years ago
|
||
Fixed, with the extra "not" in the jsopcode.tbl comment removed.
/be
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 8•20 years ago
|
||
fixed by Bug 336373 on the 1.8.1 branch.
verified fixed 1.8.1 with windows/macppc/linux 20060707
Keywords: verified1.8.1
Updated•19 years ago
|
Attachment #210210 -
Flags: superreview?(shaver)
You need to log in
before you can comment on or make changes to this bug.
Description
•