Closed Bug 546545 Opened 12 years ago Closed 12 years ago

SynthesizeSlowNativeFrame needs to consider fun->u.n.extra when setting fp->argc

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)

SynthesizeSlowNativeFrame does:

  fp->argc = state.nativeVpLen - 2

However, nativeVpLen is given:

  2 + (number of arguments) + fun->u.n.extra

It seems like it should be set to

  fp->argc = state.nativeVpLen - 2 - fun->u.n.extra
I put JS_ASSERT(fun->u.n.extra == 0) in callNative and ran trace, ref, and xpcshell tests without hitting it.  This suggests that we just bail for natives with u.n.extra > 0.  This also simplifies bug 540706.
Attached patch fixSplinter Review
Assignee: general → lw
Status: NEW → ASSIGNED
Attachment #427442 - Flags: review?(dvander)
Attachment #427442 - Flags: review?(dvander) → review+
http://hg.mozilla.org/tracemonkey/rev/787a93994be8
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/787a93994be8
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.