mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
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:
parent
a56b255f0f
commit
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
|
||||
|
Loading…
Reference in New Issue
Block a user