mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-10 02:29:43 +00:00
#418: M1333106 M1337672
This commit is contained in:
parent
fb72079d00
commit
b1cfd7830c
|
@ -14,6 +14,7 @@
|
||||||
#include "nsIHttpChannel.h"
|
#include "nsIHttpChannel.h"
|
||||||
#include "nsIURL.h"
|
#include "nsIURL.h"
|
||||||
#include "nsISimpleEnumerator.h"
|
#include "nsISimpleEnumerator.h"
|
||||||
|
#include "nsISupportsPriority.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
|
@ -134,7 +135,19 @@ nsPrefetchNode::OpenChannel()
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return mChannel->AsyncOpen2(this);
|
// Reduce the priority of prefetch network requests.
|
||||||
|
nsCOMPtr<nsISupportsPriority> priorityChannel = do_QueryInterface(mChannel);
|
||||||
|
if (priorityChannel) {
|
||||||
|
priorityChannel->AdjustPriority(nsISupportsPriority::PRIORITY_LOWEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
rv = mChannel->AsyncOpen2(this);
|
||||||
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
// Drop the ref to the channel, because we don't want to end up with
|
||||||
|
// cycles through it.
|
||||||
|
mChannel = nullptr;
|
||||||
|
}
|
||||||
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
|
Loading…
Reference in New Issue
Block a user