Object.defineProperty() allows to overwrite frozen Object properties

RESOLVED WORKSFORME

Status

()

defect
RESOLVED WORKSFORME
9 years ago
5 years ago

People

(Reporter: mario, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:2.0b4pre) Gecko/20100816 Minefield/4.0b4pre
Build Identifier: 

Object.defineProperty() allows to overwrite frozen Object properties - which should not be possible. Example 

{{{
Object.defineProperty(window, 'alert', {value:prompt,configurable:false});
alert(1);
Object.defineProperty(window, 'alert', {value:confirm,configurable:false});
alert(1);
}}}

Reproducible: Always

Steps to Reproduce:
1. Execute the example code

Actual Results:  
the first alert(1) will execute prompt(1) - the second alert(1) will execute confirm(1)

Expected Results:  
Both alerts should execute prompt(1)
Tested on: Mozilla/5.0 (X11; Linux i686; rv:2.0b4pre) Gecko/20100816 Minefield/4.0b4pre
Status: UNCONFIRMED → NEW
Ever confirmed: true
This appears to be a browser-only.
Assignee: general → nobody
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.