1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
metamask-extension/app
Mark Stacey a492a5b0d1 Use late-bound noop function when disabling console (#10110)
The `disable-console` script introduced in #10040 used an arrow-
function no-op function to replace `console.log` and `console.info`.
This replacement function was early-bound to the `this` context of the
`disable-console` script, because that's how arrow functions work.

This violates an assumption baked into Sentry, which also replaces the
`console` functions. It wraps them in a function it uses to track
console logs as breadcrumbs. This wrapper function blows up for some
reason if the "original" `console` function is early-bound to a `this`
value of `undefined`.

This resulted in various UI freezes. One example is during onboarding,
when using Firefox with Enhanced Tracking Protection set in "strict"
mode. After submitting a password in the 'Create wallet' flow, the
Sentry `console` wrapper would throw and leave the user stuck on the
loading screen.

By replacing the no-op arrow function with a no-op function
declaration, the problem has been resolved.

Relates to #10097
2020-12-23 14:04:00 -03:30
..
_locales Fix 9988 - Don't allow more than 15% slippage (#9991) 2020-12-09 12:19:16 -03:30
fonts Add euclid fontface (#9018) 2020-07-27 17:15:44 -05:00
images Add 48x48 icon (#9993) 2020-12-03 13:14:21 -08:00
manifest Version v8.1.9 2020-12-15 16:56:00 -03:30
scripts Use late-bound noop function when disabling console (#10110) 2020-12-23 14:04:00 -03:30
vendor/trezor Close window after opening fullscreen (#6966) 2019-08-08 11:50:32 -03:00
home.html Rename lockdown.cjs to lockdown.js (#10026) 2020-12-09 12:19:17 -03:30
loading.html refactor & change html pages 2019-05-04 18:57:19 +02:00
notification.html Rename lockdown.cjs to lockdown.js (#10026) 2020-12-09 12:19:17 -03:30
phishing.html Rename lockdown.cjs to lockdown.js (#10026) 2020-12-09 12:19:17 -03:30
popup.html Rename lockdown.cjs to lockdown.js (#10026) 2020-12-09 12:19:17 -03:30
trezor-usb-permissions.html trezor v5 working on firefox 2018-08-05 02:43:02 -04:00