summaryrefslogtreecommitdiffstats
path: root/dom/promise/Promise.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-04-19 12:08:25 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-04-19 12:08:25 +0200
commitd7df65954a585e97ccee21fa9cb50cb116efddcc (patch)
tree9ed9a1f46f5d2e8373dcab553bad55b54bb8103b /dom/promise/Promise.h
parentba71cc45fef6dfaecef8f5edf65ce1f1ff457624 (diff)
parent9135a11e8c8f0837738fd976b28d36a53fd1de27 (diff)
downloadUXP-d7df65954a585e97ccee21fa9cb50cb116efddcc.tar
UXP-d7df65954a585e97ccee21fa9cb50cb116efddcc.tar.gz
UXP-d7df65954a585e97ccee21fa9cb50cb116efddcc.tar.lz
UXP-d7df65954a585e97ccee21fa9cb50cb116efddcc.tar.xz
UXP-d7df65954a585e97ccee21fa9cb50cb116efddcc.zip
Merge branch 'ported-upstream'
Diffstat (limited to 'dom/promise/Promise.h')
-rw-r--r--dom/promise/Promise.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/dom/promise/Promise.h b/dom/promise/Promise.h
index f2ad3bd6c..642603a11 100644
--- a/dom/promise/Promise.h
+++ b/dom/promise/Promise.h
@@ -188,23 +188,26 @@ public:
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto,
JS::MutableHandle<JSObject*> aWrapper);
- // Do the equivalent of Promise.resolve in the current compartment of aCx.
- // Errorrs are reported on the ErrorResult; if aRv comes back !Failed(), this
- // function MUST return a non-null value.
+ // Do the equivalent of Promise.resolve in the compartment of aGlobal. The
+ // compartment of aCx is ignored. Errors are reported on the ErrorResult; if
+ // aRv comes back !Failed(), this function MUST return a non-null value.
static already_AddRefed<Promise>
Resolve(nsIGlobalObject* aGlobal, JSContext* aCx,
JS::Handle<JS::Value> aValue, ErrorResult& aRv);
- // Do the equivalent of Promise.reject in the current compartment of aCx.
- // Errorrs are reported on the ErrorResult; if aRv comes back !Failed(), this
- // function MUST return a non-null value.
+ // Do the equivalent of Promise.reject in the compartment of aGlobal. The
+ // compartment of aCx is ignored. Errors are reported on the ErrorResult; if
+ // aRv comes back !Failed(), this function MUST return a non-null value.
static already_AddRefed<Promise>
Reject(nsIGlobalObject* aGlobal, JSContext* aCx,
JS::Handle<JS::Value> aValue, ErrorResult& aRv);
+ // Do the equivalent of Promise.all in the current compartment of aCx. Errors
+ // are reported on the ErrorResult; if aRv comes back !Failed(), this function
+ // MUST return a non-null value.
static already_AddRefed<Promise>
- All(const GlobalObject& aGlobal,
- const nsTArray<RefPtr<Promise>>& aPromiseList, ErrorResult& aRv);
+ All(JSContext* aCx, const nsTArray<RefPtr<Promise>>& aPromiseList,
+ ErrorResult& aRv);
void
Then(JSContext* aCx,