зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1276272 - part 1 - add Promise::MaybeRejectWithVode() utility method; r=ehsan
MozReview-Commit-ID: 4bBGsUNKbQS --HG-- extra : rebase_source : 471c57479c41a0626a05df9aee5cb7027e352904
This commit is contained in:
Родитель
150a870af2
Коммит
487b3fb191
|
@ -940,6 +940,14 @@ Promise::MaybeRejectWithNull()
|
|||
MaybeSomething(JS::NullHandleValue, &Promise::MaybeReject);
|
||||
}
|
||||
|
||||
void
|
||||
Promise::MaybeRejectWithUndefined()
|
||||
{
|
||||
NS_ASSERT_OWNINGTHREAD(Promise);
|
||||
|
||||
MaybeSomething(JS::UndefinedHandleValue, &Promise::MaybeReject);
|
||||
}
|
||||
|
||||
|
||||
#ifdef SPIDERMONKEY_PROMISE
|
||||
void
|
||||
|
|
|
@ -153,6 +153,8 @@ public:
|
|||
|
||||
void MaybeRejectWithNull();
|
||||
|
||||
void MaybeRejectWithUndefined();
|
||||
|
||||
// DO NOT USE MaybeRejectBrokenly with in new code. Promises should be
|
||||
// rejected with Error instances.
|
||||
// Note: MaybeRejectBrokenly is a template so we can use it with DOMError
|
||||
|
|
Загрузка…
Ссылка в новой задаче