Closed Bug 577984 Opened 15 years ago Closed 7 years ago

Array.indexOf and XPCNativeWrapper could work together a little more cleanly

Categories

(Core :: XPConnect, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: WeirdAl, Unassigned)

Details

Scenario: var x = [elem, elem2, elem3, elem4] where all are DOM elements x.indexOf(foo) == -1, where foo is a XPCNativeWrapper of elem4 This was causing a Mochitest of mine to fail.
Why would you expect that to work? If you have: var x = [1, 2, 3]; var y = x.indexOf("1"); would you expect anything other than -1? The XPCNativeWrapper situation is no different....
My opinion is that XPCNativeWrapper is a special case. For instance, if I said (following up on comment 0): var y = x[3]; (foo == y) resulted in true in my Mochitest.
Yes, and |1 == "1"| is also true. I did pick my example pretty carefully. What's special about XPCNativeWrapper here?
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.