Object.defineProperty() allows to overwrite frozen Object properties

RESOLVED WORKSFORME

Status

()

Core
JavaScript Engine
RESOLVED WORKSFORME
7 years ago
2 years ago

People

(Reporter: Mario Heiderich, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
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)
(Reporter)

Comment 1

7 years ago
Tested on: Mozilla/5.0 (X11; Linux i686; rv:2.0b4pre) Gecko/20100816 Minefield/4.0b4pre

Updated

7 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
This appears to be a browser-only.
(Assignee)

Updated

3 years ago
Assignee: general → nobody
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.