As above with `nextTick` and encapsulating exceptions:

```javascript
nextTick(function () {
    try {
        promise.reject(f(x));
    } catch (e) {
        promise.reject(e);
    }
});
```