From ef08c1794f587d746d2755494c5c2c4cfe35fc27 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 19 Aug 2015 15:49:34 -0700 Subject: [PATCH] Bug 1188976 - Improve MozPromise.h comment. r=me DONTBUILD --- xpcom/threads/MozPromise.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xpcom/threads/MozPromise.h b/xpcom/threads/MozPromise.h index fe899844243a..7962c0acbe28 100644 --- a/xpcom/threads/MozPromise.h +++ b/xpcom/threads/MozPromise.h @@ -74,6 +74,9 @@ struct ReturnTypeIs { * fulfilled immediately. When an API returns a promise, the consumer may attach * callbacks to be invoked (asynchronously, on a specified thread) when the * request is either completed (resolved) or cannot be completed (rejected). + * Whereas JS promise callbacks are dispatched from Microtask checkpoints, + * MozPromises resolution/rejection make a normal round-trip through the event + * loop, which simplifies their ordering semantics relative to other native code. * * MozPromises attempt to mirror the spirit of JS Promises to the extent that * is possible (and desirable) in C++. While the intent is that MozPromises