whatwg/dom — pull request #6 by domenic (2013-07-07 03:24:57+00:00)
Title: Move promise resolved flag checking/setting.

This moves the checking and subsequent setting of the resolved flag from `fulfill`, `reject`, and `resolve` to the internal fulfill, reject, and resolve algorithms. This is more resilient in the face of malicious thenables, which as currently specified can cause multiple fulfillment, multiple rejection, or any combination thereof.

Fixes http://lists.w3.org/Archives/Public/www-dom/2013AprJun/0283.html