> Does the stack unwind as with normal error handling? Does "after bar" get
>> logged? (FF18 answers yes to the first and no to the second question.)
>>
> I agree with FF18 here.
>
OK. Consider this:
class Purse {
private balance;
constructor() {
balance = 0;
Object.freeze(this);
}
getBalance() { return balance; }
somethingInocuous() {}
deposit(amount, srcPurse) {
private(srcPurse).balance -= amount;
this.somethingInocuous();
balance += amount;
}
}
A proxy for a Purse instance could throw on access to "somethingInocuous",
leaving the high-integrity object in an inconsistent state. It would seem
that a high-integrity object would need to assume that any access to a
public property might throw, in case the object is being proxied.
Am I thinking about this correctly?
{ Kevin }
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss