Closed
Bug 65553
Opened 25 years ago
Closed 25 years ago
var x = 0 and x = 0 may set x differently due to JS API bug
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla0.8
People
(Reporter: brendan, Assigned: brendan)
References
()
Details
(Keywords: js1.5)
Attachments
(4 files)
|
867 bytes,
patch
|
Details | Diff | Splinter Review | |
|
5.40 KB,
patch
|
Details | Diff | Splinter Review | |
|
7.17 KB,
patch
|
Details | Diff | Splinter Review | |
|
9.42 KB,
patch
|
Details | Diff | Splinter Review |
JS_Evaluate*Script* and JS_ExecuteScript all call js_Execute, passing the "obj"
API param as the "chain" formal param. js_Execute uses that chain object for
the scope chain of the new execution context, and also as the variables object
(ECMA parlance) of the new frame when called from these API entry points (not
when called from eval or eval-like entry points).
That's wrong: the variables object should be the global object, which is the
last object on the scope chain that starts at "obj" (API param) or "chain"
(js_Execute param). Trivial patch in a minute, please review and approve ASAP.
Thanks,
/be
| Assignee | ||
Updated•25 years ago
|
| Assignee | ||
Comment 1•25 years ago
|
||
| Assignee | ||
Comment 2•25 years ago
|
||
Comment 3•25 years ago
|
||
r=mccabe.
I also ran the testsuite and saw no new failures with this bug. (Good to be
careful with scoping changes.)
Comment 4•25 years ago
|
||
sr=jband
| Assignee | ||
Comment 5•25 years ago
|
||
Fix checked in -- thanks all!
/be
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 6•25 years ago
|
||
This fix caused bugs 65860 and 65828. We're going to back it out.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Changes backed out ... r=attinasi@netscape.com (sheriff)
mozilla/js/src/jsapi.c revision 3.83
mozilla/js/src/jsdbgapi.c revision 3.22
mozilla/js/src/jsemit.c revision 3.44
mozilla/js/src/jsinterp.c revision 3.68
mozilla/js/src/jsinterp.h revision 3.18
mozilla/js/src/jsobj.c revision 3.76
mozilla/js/src/jsscript.c revision 3.26
| Assignee | ||
Comment 8•25 years ago
|
||
Curses -- prefs and xpinstall count on an API bug. I'll do a patch that cleans
up the internals, adds a better API, and keeps the old APIs working as before.
/be
Status: REOPENED → ASSIGNED
| Assignee | ||
Comment 9•25 years ago
|
||
Comment 10•25 years ago
|
||
Seems like an obscure flag to tweak for those not in the know; I'd add a verbose
comment.
| Assignee | ||
Comment 11•25 years ago
|
||
Comment 12•25 years ago
|
||
sr=jband
Comment 13•25 years ago
|
||
r=mccabe.
Wow, big comment! Maybe 'Use of this option recommended' in it's own paragraph
early, for lazy readers.
Bye. See me soon at mike+mozilla@meer.net, or bang on Dawn if it doesn't
change.
| Assignee | ||
Comment 14•25 years ago
|
||
This time for sure!
/be
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Comment 15•25 years ago
|
||
*Sorry for the SPAM*
Mid Air collision / bugzilla cleanup
Current bug state Resolved and NO Resolution.
Status: RESOLVED → REOPENED
Comment 16•25 years ago
|
||
marking Resolved / fixed
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Updated•25 years ago
|
Keywords: mozilla0.8
You need to log in
before you can comment on or make changes to this bug.
Description
•