1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00
metamask-extension/app
Mark Stacey 889ca62723
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-19 16:58:49 -03:30
..
_locales Add web3 shim usage notification (#10039) 2020-12-10 15:40:29 -08:00
fonts Add euclid fontface (#9018) 2020-07-27 17:15:44 -05:00
images Add web3 shim usage notification (#10039) 2020-12-10 15:40:29 -08:00
manifest Merge remote-tracking branch 'origin/develop' into sync-master 2020-12-15 19:40:19 -03:30
scripts Use late-bound noop function when disabling console (#10110) 2020-12-19 16:58:49 -03:30
vendor/trezor
home.html Rename lockdown.cjs to lockdown.js (#10026) 2020-12-09 12:19:17 -03:30
loading.html
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