<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">```<br>  constructor(x) {<br>    super(x);</div><div class="gmail_quote">    Object.defineProperties(this, { then: { value: this.then }});<br>    Object.freeze(this);<br>    if (this.constructor==DefensivePromise && this.then === DefensivePromise.prototype.then) {<br>      goodPromises.add(this);<br>    }<br>  }<br><div><div class="gmail_extra"><div class="gmail_quote"><span class=""><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>```</div></div></div></div></span></div></div></div><div>Getting closer, I hope!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I also like the point implicit in your attack that I also need the invariant that<br></div></div></div></div></span><div><br></div><div>DefensivePromise.resolve(anything).then(anycallback)</div><div><br></div><div>should all callback at most once.</div></div></div></div></blockquote><div><br></div><div>I believe this is already taken care of by the ES6 spec once you make it into `NewPromiseCapability`.  At least I wrote tests for `es6-shim` once upon a time purporting to show this.</div><div>  --scott</div><div><br></div></div></div></div>