promises-aplus/promises-spec — pull request #103 by domenic (2013-04-20 20:45:01+00:00)
Title: Tweaks to [[Resolve]] for self-fulfillment and vicious cycles

The first commit fixes assimilation for thenables that fulfill with themselves, e.g. Q far references or Ember.js entity-promises.

The second commit allows, but does not require, detection of vicious cycles.

Practically, they mean the following. Given:

```js
var a = {
then(onFulfilled) { onFulfilled(a); }
};

var x = {
then(onFulfilled) { onFulfilled(y); }
};

var y = {
then(onFulfilled) { onFulfilled(x); }
};
```

Then:

- `[[Resolve]](p, a)` now results in `p` being fulfilled with `a`.
- `[[Resolve]](p, x)` is now allowed to result in `p` being rejected with an error, although this is not mandated and so infinite-looping is also allowed.