diff options
Diffstat (limited to 'devtools/server/actors/webconsole/eager-ecma-allowlist.js')
-rw-r--r-- | devtools/server/actors/webconsole/eager-ecma-allowlist.js | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/devtools/server/actors/webconsole/eager-ecma-allowlist.js b/devtools/server/actors/webconsole/eager-ecma-allowlist.js index defe98ad8b..041a4c4194 100644 --- a/devtools/server/actors/webconsole/eager-ecma-allowlist.js +++ b/devtools/server/actors/webconsole/eager-ecma-allowlist.js @@ -46,7 +46,11 @@ const functionAllowList = [ Array.prototype.reduceRight, Array.prototype.slice, Array.prototype.some, + Array.prototype.toReversed, + Array.prototype.toSorted, + Array.prototype.toSpliced, Array.prototype.values, + Array.prototype.with, ArrayBuffer, ArrayBuffer.isView, ArrayBuffer.prototype.slice, @@ -94,7 +98,10 @@ const functionAllowList = [ TypedArray.prototype.slice, TypedArray.prototype.some, TypedArray.prototype.subarray, + TypedArray.prototype.toReversed, + TypedArray.prototype.toSorted, TypedArray.prototype.values, + TypedArray.prototype.with, ...allProperties(JSON), Map, Map.prototype.forEach, @@ -230,20 +237,4 @@ const getterAllowList = [ getter(TypedArray, Symbol.species), ]; -// TODO: Integrate in main list when changes array by copy ships by default -const changesArrayByCopy = [ - Array.prototype.toReversed, - Array.prototype.toSorted, - Array.prototype.toSpliced, - Array.prototype.with, - TypedArray.prototype.toReversed, - TypedArray.prototype.toSorted, - TypedArray.prototype.with, -]; -for (const fn of changesArrayByCopy) { - if (typeof fn == "function") { - functionAllowList.push(fn); - } -} - module.exports = { functions: functionAllowList, getters: getterAllowList }; |