Closed Bug 954897 Opened 11 years ago Closed 11 years ago

this._proxyCancel is null error from socket.jsm

Categories

(Chat Core :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 file)

*** Original post on bio 1464 at 2012-05-24 14:10:00 UTC *** *** Due to BzAPI limitations, the initial description is in comment 1 ***
Attached patch PatchSplinter Review
*** Original post on bio 1464 as attmnt 1523 at 2012-05-24 14:10:00 UTC *** See bug 954888 (bio 1455) for the steps to reproduce. After debugging, it turns out nsProtocolProxyService::AsyncResolve doesn't strictly respect XPCOM conventions and can return NS_OK and null at http://dxr.lanedo.com/mozilla-central/netwerk/base/src/nsProtocolProxyService.cpp.html#l887 This happens when the proxy can be resolved immediately (typically because there's no proxy configured, or at least no pac file). In this case, the callback with the onProxyAvailable method will just be put at the end of the current thread's even queue. This is a bit annoying because it becomes non cancellable, and if we have .disconnect() called on the socket immediately (before the next spin of the event loop), onProxyAvailable is called after disconnect() and calls _createTransport... The attached patch should avoid errors when the return value of asyncResolve is null, and return early in onProxyAvailable if the socket has already received a disconnect() call.
Attachment #8353276 - Flags: review?(clokep)
Comment on attachment 8353276 [details] [diff] [review] Patch *** Original change on bio 1464 attmnt 1523 at 2012-05-24 14:16:08 UTC *** This looks fine. (In reply to comment #0) > After debugging, it turns out nsProtocolProxyService::AsyncResolve doesn't > strictly respect XPCOM conventions and can return NS_OK and null at > http://dxr.lanedo.com/mozilla-central/netwerk/base/src/nsProtocolProxyService.cpp.html#l887 Should a bug be filed on this with Mozilla? (Or are they just not following "convention"?)
Attachment #8353276 - Flags: review?(clokep) → review+
Depends on: 954888
*** Original post on bio 1464 at 2012-05-24 14:29:38 UTC *** I filed https://bugzilla.mozilla.org/show_bug.cgi?id=758219 but it's not really a critical issue, so I don't expect any quick reaction.
*** Original post on bio 1464 at 2012-05-24 17:42:24 UTC *** Committed as http://hg.instantbird.org/instantbird/rev/a6b5bedeef6d Thanks for fixing this!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: