зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1437188 - Part 2: Only try to retarget if the listener is retargetable. r=bkelly
MutableBlobStreamListener isn't retargetable, in order to avoid warning about it we don't try retarget it at all. This should remove about 4,000 warnings during testing. --HG-- extra : rebase_source : 9ff00b9c5e818c5eba813915b4118749da1ecad6
This commit is contained in:
Родитель
9f798eecf1
Коммит
00725e9047
|
@ -584,10 +584,12 @@ FetchBodyConsumer<Derived>::BeginConsumeBodyMainThread()
|
|||
|
||||
// Try to retarget, otherwise fall back to main thread.
|
||||
nsCOMPtr<nsIThreadRetargetableRequest> rr = do_QueryInterface(pump);
|
||||
if (rr) {
|
||||
nsCOMPtr<nsIThreadRetargetableStreamListener> rl =
|
||||
do_QueryInterface(listener);
|
||||
if (rr && rl) {
|
||||
nsCOMPtr<nsIEventTarget> sts = do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID);
|
||||
rv = rr->RetargetDeliveryTo(sts);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Retargeting failed");
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче