Closed Bug 557969 Opened 14 years ago Closed 14 years ago

built-in functions should all link directly to their globals via the parent slot

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
mozilla1.9.3a5

People

(Reporter: brendan, Assigned: brendan)

References

Details

Attachments

(1 file, 1 obsolete file)

js> String.prototype.__parent__ == this
true
js> String.prototype.split.__parent__ == this
false
js> String.prototype.split.__parent__ == String
false
js> String.prototype.split.__parent__ == String.prototype
true
js> String.prototype.split.__parent__.__parent__ == this  
true

This has come up before in connection with PICs (bug 518487 previously, and now in bug 557963).

/be
No longer blocks: 557963
Attached patch fix (obsolete) — Splinter Review
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #437728 - Flags: review?(mrbkap)
Attached patch fix, v2Splinter Review
Can't blame LiveConnect alone for JSFUN_BOUND_METHOD, alas. Thanks to mrbkap for raising this on irc.

/be
Attachment #437728 - Attachment is obsolete: true
Attachment #437896 - Flags: review?(mrbkap)
Attachment #437728 - Flags: review?(mrbkap)
Attachment #437896 - Flags: review?(mrbkap) → review+
http://hg.mozilla.org/tracemonkey/rev/56424f619225

/be
Whiteboard: fixed-in-tracemonkey
Blocks: 557963
Backed out to see if that cures the orange:

http://hg.mozilla.org/tracemonkey/rev/323ae9b11c0e

/be
Whiteboard: fixed-in-tracemonkey
This breaks API, in particular XPConnect, which without using JSFUN_BOUND_METHOD nevertheless expects the obj parameter to JS_DefineFunction, etc., to be taken as the parent of the function object.

Not sure we need another slot for the global, but that would be a different bug.

/be
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: