Closed Bug 1042396 Opened 10 years ago Closed 10 years ago

"ASSERTION: Wrong Document Channel" with iframe src swap, proxy settings

Categories

(Core :: Networking, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla36

People

(Reporter: jruderman, Assigned: mayhemer)

References

Details

(Keywords: assertion, testcase)

Attachments

(4 files, 1 obsolete file)

Attached file testcase
###!!! ASSERTION: Wrong Document Channel: 'request == mDocumentRequest', file uriloader/base/nsDocLoader.cpp, line 1443
Attached file proxy settings
One way to create a new profile using this prefs:

1. mkdir -p ~/px/a/
2. cp proxy-prefs.js ~/px/a/prefs.js
3. firefox -profile ~/px/a/ testcase.html
Attached file stack
Hmm.  When this redirect happens, is the old channel an FTP or HTTP channel?

Because nsAsyncRedirectVerifyHelper::IsOldChannelCanceled only treats as canceled things that QI to nsIHttpChannelInternal, and my best hypothesis given the testcase is that the fact that we cancel the first channel gets ignored and we get a redirect notification for it anyway.
Flags: needinfo?(honzab.moz)
And since when our FTP channel can start a redirect?  I'll try to reproduce with the test case (not sooner than the next week).
Assignee: nobody → honzab.moz
Flags: needinfo?(honzab.moz)
(In reply to Jesse Ruderman from comment #1)
> Created attachment 8460636 [details]
> proxy settings
> 
> One way to create a new profile using this prefs:
> 
> 1. mkdir -p ~/px/a/
> 2. cp proxy-prefs.js ~/px/a/prefs.js
> 3. firefox -profile ~/px/a/ testcase.html

I need more info on how to use the test case.  Does testcase.html have to be hosted?  Do I need a proxy?

Only thing I'm getting in the iframe is "The proxy server is refusing connections" any way I'm try to load it.

But I believe what Boris says is true (how else :)))  So the patch can be based on his comment and just given to you (Jesse) for testing.
Flags: needinfo?(jruderman)
Attached patch potential patch v1 (obsolete) — Splinter Review
- check if a non-http channel is canceled by checking its status
- based on bz's comment 3

 https://tbpl.mozilla.org/?tree=Try&rev=3e588114da68
Attachment #8503163 - Flags: review?(mcmanus)
Comment on attachment 8503163 [details] [diff] [review]
potential patch v1

Review of attachment 8503163 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/base/src/nsAsyncRedirectVerifyHelper.cpp
@@ +270,5 @@
> +        // indicates the channel has probably been canceled.
> +        nsresult status = NS_ERROR_FAILURE;
> +        mOldChan->GetStatus(&status);
> +        if (NS_FAILED(status)) {
> +            return false;

return true, right? (otherwise I can't see how this patch has any effect).
Attached patch v2Splinter Review
Yes!

https://tbpl.mozilla.org/?tree=Try&rev=cf0d84ad9bab
Attachment #8503163 - Attachment is obsolete: true
Attachment #8503163 - Flags: review?(mcmanus)
Attachment #8503246 - Flags: review?(mcmanus)
Attachment #8503246 - Flags: review?(mcmanus) → review+
https://hg.mozilla.org/mozilla-central/rev/ce2ed57db64e
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
> I need more info on how to use the test case.  Does testcase.html have to be
> hosted?  Do I need a proxy?

testcase.html should be a local file. You don't need a proxy, but you do need the "proxy settings" that tell Firefox to try to connect to localhost on a bogus port.

> Only thing I'm getting in the iframe is "The proxy server is refusing
> connections" any way I'm try to load it.

I think that's the expected behavior.

I'm no longer seeing the assertion with a new build, so V FIXED.
Status: RESOLVED → VERIFIED
Flags: needinfo?(jruderman)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: