mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 10:57:34 +09:00
Bug 1453339 - Make it harder to mess up Promise::All. r=peterv, a=RyanVM
MozReview-Commit-ID: UO4wssYHj7
This commit is contained in:
parent
f350fa8432
commit
72c04aea04
5 changed files with 29 additions and 35 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue