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

RESOLVED FIXED

Status

()

RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: luke, Assigned: luke)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
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
(Assignee)

Comment 1

9 years ago
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.
(Assignee)

Comment 2

9 years ago
Created attachment 427442 [details] [diff] [review]
fix
Assignee: general → lw
Status: NEW → ASSIGNED
Attachment #427442 - Flags: review?(dvander)
Attachment #427442 - Flags: review?(dvander) → review+
(Assignee)

Comment 3

9 years ago
http://hg.mozilla.org/tracemonkey/rev/787a93994be8
Whiteboard: fixed-in-tracemonkey

Comment 4

9 years ago
http://hg.mozilla.org/mozilla-central/rev/787a93994be8
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.