Skip to content

Commit

Permalink
fix: cleanup on webRequest.onErrorOccurred
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Jul 2, 2018
1 parent db1a5f4 commit 0f11332
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions add-on/src/lib/ipfs-companion.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ module.exports = async function init () {
browser.webRequest.onBeforeSendHeaders.addListener(onBeforeSendHeaders, {urls: ['<all_urls>']}, ['blocking', 'requestHeaders'])
browser.webRequest.onBeforeRequest.addListener(onBeforeRequest, {urls: ['<all_urls>']}, ['blocking'])
browser.webRequest.onHeadersReceived.addListener(onHeadersReceived, {urls: ['<all_urls>']}, ['blocking'])
browser.webRequest.onErrorOccurred.addListener(onErrorOccurred, {urls: ['<all_urls>']})
browser.storage.onChanged.addListener(onStorageChange)
browser.webNavigation.onCommitted.addListener(onNavigationCommitted)
browser.tabs.onUpdated.addListener(onUpdatedTab)
Expand Down Expand Up @@ -148,6 +149,10 @@ module.exports = async function init () {
return modifyRequest.onHeadersReceived(request)
}

function onErrorOccurred (request) {
return modifyRequest.onErrorOccurred(request)
}

// RUNTIME MESSAGES (one-off messaging)
// ===================================================================
// https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/sendMessage
Expand Down

0 comments on commit 0f11332

Please sign in to comment.