зеркало из 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,19 +478,19 @@ class MozPromise : public MozPromiseBase {
|
|||
this);
|
||||
nsCOMPtr<nsIDirectTaskDispatcher> dispatcher =
|
||||
do_QueryInterface(mResponseTarget);
|
||||
if (!dispatcher) {
|
||||
NS_WARNING(
|
||||
nsPrintfCString(
|
||||
"Direct Task dispatching not available for thread \"%s\"",
|
||||
PR_GetThreadName(PR_GetCurrentThread()))
|
||||
.get());
|
||||
MOZ_DIAGNOSTIC_ASSERT(
|
||||
false,
|
||||
"mResponseTarget must implement nsIDirectTaskDispatcher for "
|
||||
"direct task dispatching");
|
||||
if (dispatcher) {
|
||||
dispatcher->DispatchDirectTask(r.forget());
|
||||
return;
|
||||
}
|
||||
dispatcher->DispatchDirectTask(r.forget());
|
||||
return;
|
||||
NS_WARNING(
|
||||
nsPrintfCString(
|
||||
"Direct Task dispatching not available for thread \"%s\"",
|
||||
PR_GetThreadName(PR_GetCurrentThread()))
|
||||
.get());
|
||||
MOZ_DIAGNOSTIC_ASSERT(
|
||||
false,
|
||||
"mResponseTarget must implement nsIDirectTaskDispatcher for direct "
|
||||
"task dispatching");
|
||||
}
|
||||
|
||||
// Promise consumers are allowed to disconnect the Request object and
|
||||
|
|
Загрузка…
Ссылка в новой задаче