Lecture series on SES and capability-based security by Mark Miller

Axel Rauschmayer axel at rauschma.de
Fri Nov 4 11:51:56 PDT 2011


Cool, didn’t know.

On Nov 4, 2011, at 19:22 , Allen Wirfs-Brock wrote:

> You can't "over-ride" an inherited read-only property by assignment. See ES5.1 8.12.4
> 
> You could do it via Object.defineProperty, but that requires direct access to the object.
> 
> Allen
> 
> On Nov 4, 2011, at 11:01 AM, Axel Rauschmayer wrote:
> 
>> But hackedPush is added to the instance, not Array.prototype.
>> 
>> On Nov 4, 2011, at 18:59 , Allen Wirfs-Brock wrote:
>> 
>>> 
>>> On Nov 4, 2011, at 10:33 AM, Axel Rauschmayer wrote:
>>> 
>>>> How about:
>>>> 
>>>>   function Bob(t) {
>>>>      var stolenArray;
>>>>      var hackedPush = function() {
>>>>          stolenArray = this;
>>>>      };
>>>>      t.store("push", hackedPush);
>>> 
>>> 
>>> If Array.prototype has been frozen (as the problem statement implied) then the above line should throw.
>>> 
>>> 
>>> Allen
>> 
>> -- 
>> Dr. Axel Rauschmayer
>> axel at rauschma.de
>> 
>> home: rauschma.de
>> twitter: twitter.com/rauschma
>> blog: 2ality.com
>> 
>> 
>> 
> 

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111104/9e8c14fd/attachment-0001.html>


More information about the es-discuss mailing list