Closed
Bug 554203
Opened 16 years ago
Closed 16 years ago
dead code in JSOP_STOP
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: luke, Assigned: luke)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
|
821 bytes,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
JSOP_STOP contains the test:
if ((regs.f.p->flags & JSFRAME_CONSTRUCTING) &&
JSVAL_IS_PRIMITIVE(regs.f.p->rval)) {
if (!regs.f.p->fun) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
JSMSG_BAD_NEW_RESULT,
js_ValueToPrintableString(cx, rval));
goto error;
}
It doesn't seem to be possible to have a constructor call that has fp->fun == NULL, in which case the inner test can be removed. If, for some arcane reason, this is possible, then I think the use of 'rval' should be 'fp->rval'.
| Assignee | ||
Comment 1•16 years ago
|
||
Oh, I forgot, this code was introduced for bug 453462.
Comment 2•16 years ago
|
||
I did the hg archeology, and of course I'm blamed for the r+ on Andreas's patch for bug 453462. It seems the rval clamping (primitive trumped by |this| for a ctor) is good but not the if (!fp->fun) error return case. I should have caught that then.
/be
| Assignee | ||
Comment 3•16 years ago
|
||
Comment 4•16 years ago
|
||
Comment on attachment 434165 [details] [diff] [review]
remove
Looks like you can pull the if condition's overflow line up so it fits on one line and eliminate the braces.
/be
Attachment #434165 -
Flags: review?(brendan) → review+
| Assignee | ||
Comment 5•16 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Comment 6•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•