Closed Bug 581574 Opened 13 years ago Closed 13 years ago

remove xpconnect's dependence on the underlying type of a privatized jsval

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: luke, Assigned: luke)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

Before fatvals, there were JSVAL_IS_INT(v) checks in xpconnect (specifically GetMember in XPCDispObject.cpp and XPCNativeMember::GetCallInfo).  When the underlying type changed to be double, I introduced the temporary predicate JSVAL_IS_UNDERLYING_TYPE_OF_PRIVATE to replace the JSVAL_IS_INT check in effect and flag them so they were easy to find and remove later (now).

So, looking at the usage, it seems to guard values extract from JS_GetReservedSlot.  Is the only possibly here that the value is either (1) the private we want or (2) undefined?  That's my guess.  Brendan?  Blake?
You just want !val.isUndefined(), e.g.

/be
Attached patch fixSplinter Review
Attachment #459971 - Flags: review?(mrbkap)
Attachment #459971 - Flags: review?(mrbkap) → review+
http://hg.mozilla.org/tracemonkey/rev/dbd4067192f4
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/dbd4067192f4
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.