RESOLVED DUPLICATE of bug 61014 66473
preventExtensions failing to prevent deleted property bounce back
https://bugs.webkit.org/show_bug.cgi?id=66473
Summary preventExtensions failing to prevent deleted property bounce back
Mark S. Miller
Reported 2011-08-18 08:48:33 PDT
On WebKit Nightly r93293: > 'compile' in RegExp.prototype true > Object.preventExtensions(RegExp.prototype) /(?:)/ > delete RegExp.prototype.compile true > 'compile' in RegExp.prototype true The fact that compile reappears is itself a spec violation. IIUC, at least it is intentional, as it is thought to be required to support some legacy behavior. (Note that this is unlikely to still be true, since RegExp.prototype.compile is deletable on other browsers.) In any case, since the above delete operation returns 'true', we might try to explain this as triggering some other hidden agent that immediately adds it back in after it gets deleted. With that explanation in mind, If RegExp.prototype has already been made non-extensible, as above, then this attempt to add it back in should fail. As shown above, it doesn't.
Attachments
Gavin Barraclough
Comment 1 2011-08-18 14:59:05 PDT
I believe we currently consider the reappearance of the original property to be purely a bug, which should be fixed. (tracked by Bug 61014). When this is fixed, I would expect this test to behave correctly - so I don't think there should be anything special to do here related to preventExtensions, we just need to find time to fix static property deletion. I think this is a useful bug to keep open & track separately, since this is a worthwhile test case to validate that we do get this right once we have the underlying bug fixed to make sure this does then behave correctly.
Mark S. Miller
Comment 2 2011-08-18 16:14:03 PDT
Hi Gavin, In light of your comment, I'm recording that this bug Depends on 61014.
Gavin Barraclough
Comment 3 2012-03-13 12:36:16 PDT
This is fixed in ToT, most likely by r61014 *** This bug has been marked as a duplicate of bug 61014 ***
Note You need to log in before you can comment on or make changes to this bug.