mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 10:30:04 +01:00
76a2a9bb8b
* @metamask/eslint-config@5.0.0 * Update eslintrc and prettierrc * yarn lint:fix
20 lines
654 B
JavaScript
20 lines
654 B
JavaScript
// Freezes all intrinsics
|
|
try {
|
|
// eslint-disable-next-line no-undef,import/unambiguous
|
|
lockdown({
|
|
consoleTaming: 'unsafe',
|
|
errorTaming: 'unsafe',
|
|
mathTaming: 'unsafe',
|
|
dateTaming: 'unsafe',
|
|
});
|
|
} catch (error) {
|
|
// If the `lockdown` call throws an exception, it interferes with the
|
|
// contentscript injection on some versions of Firefox. The error is
|
|
// caught and logged here so that the contentscript still gets injected.
|
|
// This affects Firefox v56 and Waterfox Classic
|
|
console.error('Lockdown failed:', error);
|
|
if (window.sentry && window.sentry.captureException) {
|
|
window.sentry.captureException(error);
|
|
}
|
|
}
|