Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: evilpie, Assigned: evilpie)

Tracking

({dev-doc-complete})

unspecified
mozilla7
dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

6 years ago
Both IE and Chrome don't have it.
(Assignee)

Updated

6 years ago
Assignee: general → evilpies

Comment 1

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

Updated

6 years ago
OS: Windows Vista → All
Hardware: x86 → All
(Assignee)

Comment 2

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

Comment 3

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

Updated

6 years ago
Attachment #535916 - Flags: review?(jwalden+bmo)

Updated

6 years ago
Keywords: dev-doc-needed
(Assignee)

Updated

6 years ago
Attachment #535916 - Flags: review?(jwalden+bmo)
(Assignee)

Comment 4

6 years ago
Created attachment 536287 [details] [diff] [review]
v2

updated to pass test suite
Attachment #535916 - Attachment is obsolete: true
(Assignee)

Updated

6 years ago
Attachment #536287 - Flags: review?(jorendorff)
Comment on attachment 536287 [details] [diff] [review]
v2

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

Typo!
Attachment #536287 - Flags: review?(jorendorff) → review+
(Assignee)

Comment 6

6 years ago
http://hg.mozilla.org/tracemonkey/rev/84b333a052ad
Whiteboard: fixed-in-tracemonkey
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/9ced98ee3aa9
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Documentation updated by evilpie:

https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/arity
https://developer.mozilla.org/en/JavaScript/Reference/Deprecated_Features

And mentioned on Firefox 7 for developers.
Keywords: dev-doc-needed → dev-doc-complete
(Assignee)

Comment 9

6 years ago
This was http://hg.mozilla.org/tracemonkey/rev/9ced98ee3aa9
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
(Assignee)

Updated

6 years ago
Duplicate of this bug: 569172

Updated

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