зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1644009
- P14. Fallback to normal dispatch on release. r=bholley
We shouldn't ever get there, but just in case, better than a null deref. Differential Revision: https://phabricator.services.mozilla.com/D79097
This commit is contained in:
Родитель
a56b255f0f
Коммит
4e41c1b386
|
@ -478,7 +478,10 @@ class MozPromise : public MozPromiseBase {
|
|||
this);
|
||||
nsCOMPtr<nsIDirectTaskDispatcher> dispatcher =
|
||||
do_QueryInterface(mResponseTarget);
|
||||
if (!dispatcher) {
|
||||
if (dispatcher) {
|
||||
dispatcher->DispatchDirectTask(r.forget());
|
||||
return;
|
||||
}
|
||||
NS_WARNING(
|
||||
nsPrintfCString(
|
||||
"Direct Task dispatching not available for thread \"%s\"",
|
||||
|
@ -486,11 +489,8 @@ class MozPromise : public MozPromiseBase {
|
|||
.get());
|
||||
MOZ_DIAGNOSTIC_ASSERT(
|
||||
false,
|
||||
"mResponseTarget must implement nsIDirectTaskDispatcher for "
|
||||
"direct task dispatching");
|
||||
}
|
||||
dispatcher->DispatchDirectTask(r.forget());
|
||||
return;
|
||||
"mResponseTarget must implement nsIDirectTaskDispatcher for direct "
|
||||
"task dispatching");
|
||||
}
|
||||
|
||||
// Promise consumers are allowed to disconnect the Request object and
|
||||
|
|
Загрузка…
Ссылка в новой задаче