Closed
Bug 1057688
Opened 10 years ago
Closed 10 years ago
per-app-offline: figure out why DNS sometimes still causes network traffic when offline
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: jduell.mcbugs, Assigned: valentin)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
mcmanus
:
review+
|
Details | Diff | Splinter Review |
Valentin also observed this. Not critical because it's so little traffic, but it will cause the phone's network throbber to go off if nothing else, which is confusing (and also possible wake up the radio). So this is something to fix soon.
Assignee | ||
Comment 1•10 years ago
|
||
http://pastebin.mozilla.org/6266330
The issue seems to be that in nsHttpChannel::BeginConnect, we do a prefetch, regardless of the LOAD_NO_NETWORK_IO or LOAD_ONLY_FROM_CACHE flags being set. (nsHttpChannel.cpp:4613)
I'm looking into a way to fix this.
Assignee | ||
Comment 2•10 years ago
|
||
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8483201 [details] [diff] [review]
nsHttpChannels still do DNSPrefetch when LOAD_NO_NETWORK_IO flag is present
This seems to get rid of the extra DNS request, but I'm not sure this is correct. Comments?
Attachment #8483201 -
Flags: feedback?(mcmanus)
Attachment #8483201 -
Flags: feedback?(honzab.moz)
Comment 4•10 years ago
|
||
Comment on attachment 8483201 [details] [diff] [review]
nsHttpChannels still do DNSPrefetch when LOAD_NO_NETWORK_IO flag is present
Review of attachment 8483201 [details] [diff] [review]:
-----------------------------------------------------------------
::: netwerk/protocol/http/nsHttpChannel.cpp
@@ +4595,5 @@
> if (mLoadFlags & VALIDATE_ALWAYS || BYPASS_LOCAL_CACHE(mLoadFlags))
> mCaps |= NS_HTTP_REFRESH_DNS;
>
> + if (!mConnectionInfo->UsingHttpProxy() &&
> + !(mLoadFlags & LOAD_NO_NETWORK_IO)) {
yes.. might as well make it mLoadFlags & (NO_NETWORK_IO | ONLY_FROM_CACHE)
@@ +4614,5 @@
> mDNSPrefetch->PrefetchHigh(mCaps & NS_HTTP_REFRESH_DNS);
> }
>
> + if (mLoadFlags & LOAD_NO_NETWORK_IO) {
> + OnLookupComplete(nullptr, nullptr, NS_ERROR_NOT_CONNECTED);
I'm trying to figure out why you did this, and why it's not just the else() clause?
I think all it will accomplish is ~=NS_HTTP_REFRESH_DNS which shouldn't impact the NO_NETWORK_IO case anyhow after your patch...
Attachment #8483201 -
Flags: feedback?(mcmanus) → feedback+
Comment 5•10 years ago
|
||
Comment on attachment 8483201 [details] [diff] [review]
nsHttpChannels still do DNSPrefetch when LOAD_NO_NETWORK_IO flag is present
Review of attachment 8483201 [details] [diff] [review]:
-----------------------------------------------------------------
Yep and I please honor Patrick's comments, I agree with them and don't see a purpose of manual call to OnLookupComplete.
Attachment #8483201 -
Flags: feedback?(honzab.moz) → feedback+
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8504306 -
Flags: review?(mcmanus)
Assignee | ||
Updated•10 years ago
|
Attachment #8483201 -
Attachment is obsolete: true
Updated•10 years ago
|
Attachment #8504306 -
Flags: review?(mcmanus) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•