Bug 114036

Summary: JSC: Different behaviours when changing value of a readonly properties in a global object.
Product: WebKit Reporter: Stephane Cerveau <scerveau>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: allan.jensen, ararunprasad, arurajku, benjamin, cdumez, erights, fpizlo, ggaren, mburtin, oliver, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 88186    
Description Flags
sample html test
sample html test with log in document none

Description Stephane Cerveau 2013-04-05 08:29:36 PDT
Created attachment 196635 [details]
sample html test

Changing the value of a property's object such as width in window.screen is different in a function than in the main.
for( var prop in window.screen) {
window.screen[prop] =  0xABADCAFE;

In the main, the property value does not change if we assigned a new value but then using this object in a function, the property has been changed.
Please see attached example, index.html.

The bug can be reproduced with Safari 5.1.7 but not with Chromium.
Comment 1 Stephane Cerveau 2013-04-05 08:32:31 PDT
Created attachment 196636 [details]
sample html test with log in document
Comment 2 Arunprasad Rajkumar 2013-06-17 07:12:28 PDT
screen object's properties are readonly.

Refer Screen.idl !

Why you are trying to change that?
Comment 3 Chris Dumez 2013-06-17 07:24:48 PDT
(In reply to comment #2)
> screen object's properties are readonly.
> Refer Screen.idl !
> Why you are trying to change that?

Right, they are readonly so you shouldn't be able to change them, thus the bug :)

I am however unable to reproduce with the test case given and the EFL port (also using JSC).
Comment 4 Arunprasad Rajkumar 2013-06-17 07:28:46 PDT
I tried in Qt Port, it is not changing.

(If possible check the same in Slim Boat, it uses Qt WebKit)
Comment 5 Benjamin Poulain 2013-06-17 12:45:10 PDT
The test case does not return anything wrong on OS X. Closing.
Comment 6 Stephane Cerveau 2013-06-19 01:38:23 PDT

*** This bug has been marked as a duplicate of bug 113831 ***