JavaScript Engine
7 years ago
6 years ago


(Reporter: evilpie, Assigned: evilpie)



Dependency tree / graph

Firefox Tracking Flags

(Not tracked)


(Whiteboard: fixed-in-tracemonkey)


(1 attachment, 2 obsolete attachments)

Both IE and Chrome don't have it.
Assignee: general → evilpies

Comment 1

6 years ago
And it's not standard and fun.length is the standard replacement for that.


6 years ago
OS: Windows Vista → All
Hardware: x86 → All
Created attachment 535915 [details] [diff] [review]
remove fun.arity and other cleanup related to function props

So took my chances here.
- Removed lazyDataProps and defined name the same way as length in resolve
- Stop using tinyids (i would like to remove those at some point)
- Made arguments/caller behave as expected, previously they wouldn't be resolved from the proto chain
Attachment #535915 - Flags: review?(jwalden+bmo)
Created attachment 535916 [details] [diff] [review]
removed tabs, same patch as above

thanks Ms2ger
Attachment #535915 - Attachment is obsolete: true
Attachment #535915 - Flags: review?(jwalden+bmo)
Attachment #535916 - Flags: review?(jwalden+bmo)


6 years ago
Keywords: dev-doc-needed
Attachment #535916 - Flags: review?(jwalden+bmo)
Created attachment 536287 [details] [diff] [review]

updated to pass test suite
Attachment #535916 - Attachment is obsolete: true
Attachment #536287 - Flags: review?(jorendorff)
Comment on attachment 536287 [details] [diff] [review]

Review of attachment 536287 [details] [diff] [review]:

Love it. r=me with the two changes below.

For future reference -- hg mv is better for renaming a file, since it keeps the file's history intact, and the patch would actually show the diffs for review instead of a whole file being removed and a whole new file being added.

::: js/src/jsfun.cpp
@@ +1604,3 @@
>  struct PoisonPillProp {
>      uint16       atomOffset;

Go ahead and get rid of this struct. Make poisonPillProps an array of uint16. Feel free to get rid of it entirely and turn the loop in fun_resolve into a single if-statement, like the length||name one you added.

@@ +2834,5 @@
>       * parameter, and so binds fun's parent to obj using JSObject::setParent,
>       * under js_NewFunction (in JSObject::init, called from NewObject -- see
>       * jsobjinlines.h).
>       *
> +     * But JSObject::setParent sets the DELEGATE object flag on its receiver,z

Attachment #536287 - Flags: review?(jorendorff) → review+
Whiteboard: fixed-in-tracemonkey
cdleary-bot mozilla-central merge info:
Last Resolved: 6 years ago
Resolution: --- → FIXED
Documentation updated by evilpie:

And mentioned on Firefox 7 for developers.
Keywords: dev-doc-needed → dev-doc-complete
This was
Blocks: 666587
Target Milestone: --- → mozilla7
No longer blocks: 666587
Depends on: 666587
Blocks: 666733
Depends on: 666095
So what did this patch change other than removing .arity?  At least one of the bugs that this change caused appears on a web page that doesn't appear to use .arity....

Comment 11

6 years ago
See comment 2

Comment 12

6 years ago
Massive use of arguments in the dropbox zip from bug 666587
Depends on: 667538
Duplicate of this bug: 569172


6 years ago
Depends on: 696342
You need to log in before you can comment on or make changes to this bug.