If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Function prototype properties leak through to narcissus objects

RESOLVED INVALID

Status

Other Applications
Narcissus
RESOLVED INVALID
7 years ago
7 years ago

People

(Reporter: shu, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
njs> Array.apply
function apply() {
    [native code]
}

I imagine this is due to how these are reflected, i.e. jsexec.js:

 127         Array: function (dummy) {
 128             // Array when called as a function acts as a constructor.
 129             return Array.apply(this, arguments);
 130         }

Since they're functions, they get everything in Function's prototype.
I don't understand what's wrong with this. Try it at the SpiderMonkey shell:

    js> Array.apply
    function apply() {[native code]}

Dave
(Reporter)

Comment 2

7 years ago
Ah, was not aware this is intended behavior. Closing this bug as invalid.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.