lib/reflect.js
function() {
    var trap = this.getTrap("isSealed");
    if (trap === undefined) {
      // default forwarding behavior
      return Reflect.isSealed(this.target);
    }

    var result = trap.call(this.handler, this.target);
    result = !!result; // coerce to Boolean
    var state = Object_isSealed(this.target);
    if (result !== state) {
      if (result) {
        throw new TypeError("cannot report unsealed object as sealed: "+
                             this.target);
      } else {
        throw new TypeError("cannot report sealed object as unsealed: "+
                             this.target);
      }
    }
    return state;
  }
function() {
    var trap = this.getTrap("isSealed");
    if (trap === undefined) {
      // default forwarding behavior
      return Reflect.isSealed(this.target);
    }

    var result = trap.call(this.handler, this.target);
    result = !!result; // coerce to Boolean
    var state = Object_isSealed(this.target);
    if (result !== state) {
      if (result) {
        throw new TypeError("cannot report unsealed object as sealed: "+
                             this.target);
      } else {
        throw new TypeError("cannot report sealed object as unsealed: "+
                             this.target);
      }
    }
    return state;
  }
Checks whether the trap result is consistent with the state of the
wrapped target.