On Tue, Apr 1, 2014 at 3:09 AM, Axel Rauschmayer <[email protected]> wrote:
> On 01 Apr 2014, at 4:47 , Mark S. Miller <[email protected]> wrote: > > > Unless the committee revisits the override mistake, which seems > unlikely, the only way to cope that I know of is to use tamperProof(obj) > where you would have used freeze(obj). > > What library does tamperProof() come from? I can’t seem to find it in Caja. > Once Caja (or just SES) is loaded, it is at cajaVM.tamperProof. It's defined at < https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/repairES5.js#338> and made available on the cajaVM object at < https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/startSES.js#1351>. See also < https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/repairES5.js#241> and < https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/startSES.js#468> to understand some of the intricacies of getting the initialization order of this right for SES purposes. Often, tamperProof is used indirectly by Caja or SES code via cajaVM.def(obj) < https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/startSES.js#1099> which applies tamperProof to obj, and to all objects reachable from obj via transitive reflective property and prototype traversal. > > Thanks! > > Axel > > -- > Dr. Axel Rauschmayer > [email protected] > > home: rauschma.de > twitter: twitter.com/rauschma > blog: 2ality.com > > > > -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

