Add polyfill for AbortController (#7157)

The AbortController is used in both the background and the UI. Support
for AbortController was added to Chrome in version 66, which is above
our minimum supported version.

I did consider increasing the minimum Chrome version to 66, but we have
a decent number of users still on Chrome 65 unfortunately.
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent a00493fdbd
commit 50e9c4e5ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/scripts/background.js
  2. 3
      app/scripts/ui.js
  3. 2
      package.json

@ -5,6 +5,9 @@
// this needs to run before anything else // this needs to run before anything else
require('./lib/setupFetchDebugging')() require('./lib/setupFetchDebugging')()
// polyfills
import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'
const urlUtil = require('url') const urlUtil = require('url')
const endOfStream = require('end-of-stream') const endOfStream = require('end-of-stream')
const pump = require('pump') const pump = require('pump')

@ -1,3 +1,6 @@
// polyfills
import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'
const PortStream = require('extension-port-stream') const PortStream = require('extension-port-stream')
const { getEnvironmentType } = require('./lib/util') const { getEnvironmentType } = require('./lib/util')
const { ENVIRONMENT_TYPE_NOTIFICATION, ENVIRONMENT_TYPE_FULLSCREEN, ENVIRONMENT_TYPE_POPUP } = require('./lib/enums') const { ENVIRONMENT_TYPE_NOTIFICATION, ENVIRONMENT_TYPE_FULLSCREEN, ENVIRONMENT_TYPE_POPUP } = require('./lib/enums')

@ -53,6 +53,7 @@
"@sentry/browser": "^4.1.1", "@sentry/browser": "^4.1.1",
"@zxing/library": "^0.8.0", "@zxing/library": "^0.8.0",
"abi-decoder": "^1.2.0", "abi-decoder": "^1.2.0",
"abortcontroller-polyfill": "^1.3.0",
"asmcrypto.js": "^2.3.2", "asmcrypto.js": "^2.3.2",
"await-semaphore": "^0.1.1", "await-semaphore": "^0.1.1",
"bignumber.js": "^4.1.0", "bignumber.js": "^4.1.0",
@ -180,7 +181,6 @@
"@storybook/addon-info": "^5.1.1", "@storybook/addon-info": "^5.1.1",
"@storybook/addon-knobs": "^3.4.2", "@storybook/addon-knobs": "^3.4.2",
"@storybook/react": "^5.1.1", "@storybook/react": "^5.1.1",
"abortcontroller-polyfill": "^1.3.0",
"addons-linter": "^1.10.0", "addons-linter": "^1.10.0",
"babel-eslint": "^10.0.2", "babel-eslint": "^10.0.2",
"babelify": "^10.0.0", "babelify": "^10.0.0",

Loading…
Cancel
Save