Closed Bug 743924 Opened 12 years ago Closed 10 years ago

Object.defineProperty replaces existing properties on the window object with undefined

Categories

(Firefox :: Untriaged, defect)

11 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: amjad.masad, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19

Steps to reproduce:

window.FOO = {};
Object.defineProperty(window, 'FOO', {});
window.FOO;


Actual results:

Replaces FOO with undefined value.


Expected results:

Not alter FOO.

This will only happen on the *window* object. It doesn't happen on the self object of the worker.
Thanks for your report and sorry it took so long for someone to look at it.

This works for me in the current Nightly, executing this code in the console returns
> Object {  }

Is this still a problem?
Flags: needinfo?(amjad.masad)
Don't remember opening this :) If it works then feel free to close
Flags: needinfo?(amjad.masad)
OK, thanks for the follow up!
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.