Closed
Bug 586053
Opened 14 years ago
Closed 9 months ago
Function constructor misses opp'ty to (lazily create and then) share Function.prototype's emptyScope
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: brendan, Unassigned)
Details
This is all under js_InitClass: fun = js_NewFunction(cx, NULL, constructor, nargs, 0, obj, atom); if (!fun) goto bad; AutoValueRooter tvr2(cx, ObjectValue(*fun)); if (!DefineStandardSlot(cx, obj, key, atom, tvr2.value(), 0, named)) goto bad; For the case of the Function class, the js_NewFunction call and functions it calls will not find proto in the reserved (standard) slot of the global (obj here) and therefore it will make an empty scope for Function, the constructor object. Then when we define the toSource method, we'll lazily create and share Function.prototype.emptyScope. Might be fixable by reordering the two paragraphs shown above, with rooting removed (we don't need that any longer). /be
Reporter | ||
Comment 1•14 years ago
|
||
If we do what bug 584648 comment 5 wants, though, this bug is moot (I hope). /be
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Severity: normal → S3
Updated•9 months ago
|
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•