Closed Bug 680541 Opened 14 years ago Closed 7 years ago

[optional_argc] should set arguments.length

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: mark.yen, Unassigned)

Details

Attachments

(1 file)

When an interface method is marked as [optional_argc], any implementations written in JavaScript should be able to figure out how many arguments it got. Currently, xpconnect fakes out all the arguments to the default values. Attached file is JavaScript to be run in Scratchpad under chrome scope; it simply alerts the number of arguments (line 8). It reports arguments.length as 4 instead of 3. The last (optional) argument also appears to be |false| instead of |undefined|. This means I can't figure out that the optional argument was not supplied.
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: