FYI,

---------- Forwarded message ----------
From: Yutaka Hirano <yhir...@chromium.org>
Date: Fri, Feb 14, 2014 at 3:51 PM
Subject: [blink-dev] Promise API is changing
To: blink-dev <blink-...@chromium.org>


Hi,

As you may know, there is a long thread[1] in es-discuss discussing
Promises specification. In fact, Promise API changed at the last TC39
meeting[2].
>
> #### Conclusion/Resolution
> - Promise.cast is renamed to Promise.resolve (remove old Promise.resolve)
> - Keep then, reject chain (NOT DEFER, reject!)
> - Renaming .cast thus removes over-wrapping (always-wrap)
> deoptimization in old Promise.resolve

The change itself is small, but I'm not sure if it is the last change or not.
We had a discussion of Promise API stability at the intent-to-ship thread[3].
At that time Domenic, the spec author, said it was stable, but it
looks no longer true now.

We have several options to deal with this situation:
 1. Unship Promise: make Promise behind the flag. This is the safest
way but it blocks shipping DOM APIs[4] using Promise.
 2. Change the API: If this is the last change, just changing the API
seems reasonable. We can keep Promise.cast for a while with a warning
message.
 3. Unship Promise object: If Promise.prototype methods are finalized,
we can unship Promise global object. The good point is we don't have
to unship Font Load Events if we choose this option.

If this is the last change (I hope so but I'm not sure), we should
choose the second option I think.

abarth@,
>
> In particular, I wonder if we should push back on TC39 not to change the API.

Is it possible? If so, it's the best way of course.

As the first step, I'm adding use counters for Promise constructors
(Promise, resolve, reject, cast) [5].

Thanks,

[1]: https://mail.mozilla.org/pipermail/es-discuss/2014-January/036015.html
[2]: https://mail.mozilla.org/pipermail/es-discuss/2014-February/036193.html
[3]: 
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/0Fs5P6Xgg9g
[4]: 
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/kWkdUACnPn4
[5]: https://codereview.chromium.org/166173002/

To unsubscribe from this group and stop receiving emails from it, send
an email to blink-dev+unsubscr...@chromium.org.


-- 
Kenneth Rohde Christiansen
Web Platform Architect, Intel Corporation.
Phone  +45 4294 9458 ﹆﹆﹆
_______________________________________________
Crosswalk-dev mailing list
Crosswalk-dev@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev

Reply via email to