Loading toolkit/components/extensions/webrequest/WebRequest.jsm +8 −6 Original line number Diff line number Diff line Loading @@ -744,11 +744,12 @@ HttpObserverManager = { lastActivity && lastActivity !== this.GOOD_LAST_ACTIVITY ) { // Make a trip through the event loop to make sure errors have a // chance to be processed before we fall back to a generic error // string. Services.tm.dispatchToMainThread(() => { channel.errorCheck(); // Since the channel's security info is assigned in onStartRequest and // errorCheck is called in ChannelWrapper::onStartRequest, we should check // the errorString after onStartRequest to make sure errors have a chance // to be processed before we fall back to a generic error string. let onStart = function() { channel.removeEventListener("start", onStart); if (!channel.errorString) { this.runChannelListener(channel, "onErrorOccurred", { error: Loading @@ -756,7 +757,8 @@ HttpObserverManager = { `NS_ERROR_NET_UNKNOWN_${lastActivity}`, }); } }); }; channel.addEventListener("start", onStart); } else if ( lastActivity !== this.GOOD_LAST_ACTIVITY && lastActivity !== Loading Loading
toolkit/components/extensions/webrequest/WebRequest.jsm +8 −6 Original line number Diff line number Diff line Loading @@ -744,11 +744,12 @@ HttpObserverManager = { lastActivity && lastActivity !== this.GOOD_LAST_ACTIVITY ) { // Make a trip through the event loop to make sure errors have a // chance to be processed before we fall back to a generic error // string. Services.tm.dispatchToMainThread(() => { channel.errorCheck(); // Since the channel's security info is assigned in onStartRequest and // errorCheck is called in ChannelWrapper::onStartRequest, we should check // the errorString after onStartRequest to make sure errors have a chance // to be processed before we fall back to a generic error string. let onStart = function() { channel.removeEventListener("start", onStart); if (!channel.errorString) { this.runChannelListener(channel, "onErrorOccurred", { error: Loading @@ -756,7 +757,8 @@ HttpObserverManager = { `NS_ERROR_NET_UNKNOWN_${lastActivity}`, }); } }); }; channel.addEventListener("start", onStart); } else if ( lastActivity !== this.GOOD_LAST_ACTIVITY && lastActivity !== Loading