Command Manager gets screwed over by inherited Object method (eval, watch, etc.)

RESOLVED FIXED

Status

defect
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: bugzilla-mozilla-20000923, Assigned: bugzilla-mozilla-20000923)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [cz-0.9.86])

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
This is a different problem caused by basically the same issue as bug 498178 - non-enumerable JavaScript properties are still "in" an object. I.e. doing if (foo in bar) will succeed if foo contains the string "eval" (in 1.8 and earlier) or "watch" (all versions), etc.

We'll need to use hasOwnProperty everywhere, sigh.
(Assignee)

Comment 1

10 years ago
Assignee: rginda → silver
Status: NEW → ASSIGNED
Attachment #384005 - Flags: review?(gijskruitbosch+bugs)

Updated

10 years ago
Attachment #384005 - Flags: review?(gijskruitbosch+bugs) → review+

Comment 2

10 years ago
Comment on attachment 384005 [details] [diff] [review]
Use explicit object-has-property checks instead of "in" operator

r=me (sorry for the delay, thought I already got to this...)
(Assignee)

Comment 3

10 years ago
Checked in --> FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.86]
You need to log in before you can comment on or make changes to this bug.