1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 10:30:04 +01:00
metamask-extension/app/scripts
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
..
account-import-strategies
controllers @metamask/obs-store@5.0.0 (#10092) 2020-12-16 13:14:49 -08:00
lib @metamask/obs-store@5.0.0 (#10092) 2020-12-16 13:14:49 -08:00
migrations Migration to remove legacy local storage keys from localStorage (#9986) 2020-12-03 20:25:23 -03:30
platforms
background.js Skip reporting of successive persistence failures (#10099) 2020-12-17 15:39:01 -03:30
chromereload.js
contentscript.js Disable console in contentscript (#10040) 2020-12-14 11:17:13 -08:00
disable-console.js Use late-bound noop function when disabling console (#10110) 2020-12-19 16:58:49 -03:30
first-time-state.js
initSentry.js Add SES lockdown to extension webapp (#9729) 2020-11-24 11:26:43 +08:00
inpage.js @metamask/inpage-provider@^8.0.0 (#8640) 2020-12-08 11:48:47 -08:00
metamask-controller.js Update @metamask/controllers to v5.1.0 (#10096) 2020-12-17 12:06:29 -03:30
phishing-detect.js
runLockdown.js Fix contentscript injection failure on Firefox 56 (#10034) 2020-12-10 14:03:04 -03:30
ui.js Add SES lockdown to extension webapp (#9729) 2020-11-24 11:26:43 +08:00