mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1414549
: Correctly handle GetDeliveryTarget failure. r=mixedpuppy
getter_AddRefs nulls its parameter before passing it to the getter function, which means that on failure, we wind up with a null IO thread, rather than its original main thread value. MozReview-Commit-ID: 1SSIeNtiBq9 --HG-- extra : rebase_source : 05e4437e86ab4036e93e2577f46ff0cfd0a3d329
This commit is contained in:
parent
3699fb8ded
commit
e32e9e2376
@ -418,8 +418,11 @@ StreamFilterParent::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext)
|
||||
// Important: Do this only *after* running the next listener in the chain, so
|
||||
// that we get the final delivery target after any retargeting that it may do.
|
||||
if (nsCOMPtr<nsIThreadRetargetableRequest> req = do_QueryInterface(aRequest)) {
|
||||
Unused << req->GetDeliveryTarget(getter_AddRefs(mIOThread));
|
||||
MOZ_ASSERT(mIOThread);
|
||||
nsCOMPtr<nsIEventTarget> thread;
|
||||
Unused << req->GetDeliveryTarget(getter_AddRefs(thread));
|
||||
if (thread) {
|
||||
mIOThread = Move(thread);
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
Loading…
Reference in New Issue
Block a user