Bug 70207

Summary: After deleting __defineSetter__, it is absent but appears in name list
Product: WebKit Reporter: Mark S. Miller <erights>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, erights, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.5   
Attachments:
Description Flags
Fix darin: review+

Mark S. Miller
Reported 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
Attachments
Fix (3.53 KB, patch)
2011-10-17 14:35 PDT, Gavin Barraclough
darin: review+
Mark S. Miller
Comment 1 2011-10-16 18:21:26 PDT
This occurs on WebKit Nightly r97567.
Gavin Barraclough
Comment 2 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.
Gavin Barraclough
Comment 3 2011-10-17 14:35:26 PDT
WebKit Review Bot
Comment 4 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.
Gavin Barraclough
Comment 5 2011-10-17 14:50:28 PDT
Fixed in r97655
Note You need to log in before you can comment on or make changes to this bug.