Security Demands Simplicity (was: Private Slots)

Kevin Smith khs4473 at
Sun Jan 20 07:49:36 PST 2013

Got it.  And one more (thanks for bearing with me):  what affect does
throwing an error have within a trap?

    var target = {
      foo: function() {; console.log("after bar"); },
      bar: 0

    var proxy = new Proxy(target, {
      get: function(obj, name) {
        if (name === "bar") throw new Error("boom");
        return obj[name];

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.)

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list