1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00
metamask-extension/app/scripts
Erik Marks 1175b4bfa7
Make all named intrinsics non-modifiable (#11953)
This PR makes ~all named intrinsics in all of our JavaScript processes non-modifiable. A named intrinsic is any property specified by the ECMAScript specification that exists on `globalThis` when the JavaScript process starts. We say that a property is non-modifiable if it is non-configurable and non-writable. We make exceptions for properties that meet any of the following criteria:

1. Properties that are non-configurable by the time `lockdown-run.js` is executed are not modified, because they can't be.
2. Properties that have accessor properties (`get` or `set`) are made non-configurable, but their writability cannot be modified, and is therefore left unchanged. It's unclear how many of the named intrinsics this applies to, if any, but it's good defensive programming, regardless.
2021-08-30 14:30:48 -07:00
..
account-import-strategies
constants
controllers Removing unnecessary console log from the preferences controller (#11828) 2021-08-17 01:56:18 -07:00
lib Fix issue with chainId comparison in sign typed message param validation (#11900) 2021-08-24 11:23:29 -05:00
migrations Improving handling for non-existent props in state migrations (#11829) 2021-08-17 19:18:53 -07:00
platforms
background.js
contentscript.js
disable-console.js
first-time-state.js
inpage.js
lockdown-run.js Make all named intrinsics non-modifiable (#11953) 2021-08-30 14:30:48 -07:00
metamask-controller.js
metamask-controller.test.js
phishing-detect.js
sentry-install.js
ui.js