Bug 70207 - After deleting __defineSetter__, it is absent but appears in name list
Summary: After deleting __defineSetter__, it is absent but appears in name list
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh Intel OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-16 18:20 PDT by Mark S. Miller
Modified: 2011-10-17 14:50 PDT (History)
3 users (show)

See Also:


Attachments
Fix (3.53 KB, patch)
2011-10-17 14:35 PDT, Gavin Barraclough
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark S. Miller 2011-10-16 18:20:29 PDT
Below I delete __defineSetter__ on Object.prototype. Afterwards, it reappears on the end of the list returned by Object.getOwnPropertyNames but otherwise appears to be truly deleted.

This is a new problem, in that Safari Version 5.0.6 (5533.22.3) instead has the problem described by issue 61014, namely that delete reports that it successfully deleted __defineSetter__, but it seems to still be there in all the ways tested below. So is this a new bug introduced in trying to fix issue 61014 ?



> var gopn = Object.getOwnPropertyNames
> var gopd = Object.getOwnPropertyDescriptor
> gopn(Object.prototype)
constructor,__defineSetter__,valueOf,__lookupGetter__,toLocaleString,__defineGetter__,hasOwnProperty,propertyIsEnumerable,toString,__lookupSetter__,isPrototypeOf

> var desc = gopd(Object.prototype, '__defineSetter__')
> JSON.stringify(desc)
{"writable":true,"enumerable":false,"configurable":true}

> desc.value
function __defineSetter__() {
    [native code]
}

> delete Object.prototype.__defineSetter__;
true

> gopn(Object.prototype)
constructor,toString,valueOf,__lookupGetter__,toLocaleString,__defineGetter__,hasOwnProperty,propertyIsEnumerable,__lookupSetter__,isPrototypeOf,__defineSetter__

> var desc = gopd(Object.prototype, '__defineSetter__')
> desc === undefined
true

> Object.prototype.__defineSetter__ === undefined
true

> '__defineSetter__' in Object.prototype
false
Comment 1 Mark S. Miller 2011-10-16 18:21:26 PDT
This occurs on WebKit Nightly r97567.
Comment 2 Gavin Barraclough 2011-10-16 23:04:15 PDT
Ah, good catch, thank you Mark.
This will be related to r61014, the fix to that should be expanded to cover Object.getOwnPropertyNames - this should be easy to resolve.  I'll look into this.
Comment 3 Gavin Barraclough 2011-10-17 14:35:26 PDT
Created attachment 111322 [details]
Fix
Comment 4 WebKit Review Bot 2011-10-17 14:38:00 PDT
Attachment 111322 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/update-webkit', '--chromium']" exit_code: 2

Updating OpenSource
Current branch master is up to date.
Updating chromium port dependencies using gclient...
Error: Can't switch the checkout to http://v8.googlecode.com/svn/branches/3.6@9637; UUID don't match and there is local changes in /mnt/git/webkit-style-queue/Source/WebKit/chromium/v8. Delete the directory and try again.
Re-trying 'depot_tools/gclient sync'
Error: Can't switch the checkout to http://v8.googlecode.com/svn/branches/3.6@9637; UUID don't match and there is local changes in /mnt/git/webkit-style-queue/Source/WebKit/chromium/v8. Delete the directory and try again.
Re-trying 'depot_tools/gclient sync'
Error: Can't switch the checkout to http://v8.googlecode.com/svn/branches/3.6@9637; UUID don't match and there is local changes in /mnt/git/webkit-style-queue/Source/WebKit/chromium/v8. Delete the directory and try again.
Error: 'depot_tools/gclient sync' failed 3 tries and returned 256 at Tools/Scripts/update-webkit-chromium line 107.
Re-trying 'depot_tools/gclient sync'
No such file or directory at Tools/Scripts/update-webkit line 104.


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Gavin Barraclough 2011-10-17 14:50:28 PDT
Fixed in r97655