1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Deobfuscate error message (#10012)

The SES lockdown added in #9729 had the effect of obfuscating our error
messages. Any messages printed to the console would have the error
message replaced with the string "Error #" followed by a number. The
stack was also updated to point at `lockdown.cjs`, though the original
stack was preserved beneath the top stack frame.

Marking the `console` API as untamed seems to have fixed both issues.
The original error message is now printed to the console, along with
the original stack.
This commit is contained in:
Mark Stacey 2020-12-07 19:54:31 -03:30
parent 4ae911eb23
commit 01c0775486

View File

@ -1,6 +1,7 @@
// Freezes all intrinsics // Freezes all intrinsics
// eslint-disable-next-line no-undef,import/unambiguous // eslint-disable-next-line no-undef,import/unambiguous
lockdown({ lockdown({
consoleTaming: 'unsafe',
errorTaming: 'unsafe', errorTaming: 'unsafe',
mathTaming: 'unsafe', mathTaming: 'unsafe',
dateTaming: 'unsafe', dateTaming: 'unsafe',