1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-21 17:37:01 +01:00

Prevent controller events from crashing (#19963)

* Prevent controller events from crashing

The package `@metamask/base-controller` has been updated to v3.1, which
includes a change to how event subscriber errors are handled. Errors
thrown in event subscribers will no longer interrupt event publishing.

Subscriber errors are caught and thrown in a timeout handler, ensuring
that they are logged and captured by Sentry. We can find any subscriber
errors by looking at the background console, or at the Sentry
dashboard.

Fixes #19801

* Update LavaMoat policies

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
This commit is contained in:
Mark Stacey 2023-07-12 20:05:27 -02:30 committed by GitHub
parent 7ef2730c9a
commit 70dd9a0254
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 6 deletions

View File

@ -858,6 +858,9 @@
}
},
"@metamask/base-controller": {
"globals": {
"setTimeout": true
},
"packages": {
"immer": true
}

View File

@ -858,6 +858,9 @@
}
},
"@metamask/base-controller": {
"globals": {
"setTimeout": true
},
"packages": {
"immer": true
}

View File

@ -858,6 +858,9 @@
}
},
"@metamask/base-controller": {
"globals": {
"setTimeout": true
},
"packages": {
"immer": true
}

View File

@ -858,6 +858,9 @@
}
},
"@metamask/base-controller": {
"globals": {
"setTimeout": true
},
"packages": {
"immer": true
}

View File

@ -1079,6 +1079,9 @@
}
},
"@metamask/base-controller": {
"globals": {
"setTimeout": true
},
"packages": {
"immer": true
}

View File

@ -228,7 +228,7 @@
"@metamask/announcement-controller": "^4.0.0",
"@metamask/approval-controller": "^3.4.0",
"@metamask/assets-controllers": "^9.2.0",
"@metamask/base-controller": "^3.0.0",
"@metamask/base-controller": "^3.1.0",
"@metamask/browser-passworder": "^4.1.0",
"@metamask/contract-metadata": "^2.3.1",
"@metamask/controller-utils": "^4.1.0",

View File

@ -3947,13 +3947,13 @@ __metadata:
languageName: node
linkType: hard
"@metamask/base-controller@npm:^3.0.0":
version: 3.0.0
resolution: "@metamask/base-controller@npm:3.0.0"
"@metamask/base-controller@npm:^3.0.0, @metamask/base-controller@npm:^3.1.0":
version: 3.1.0
resolution: "@metamask/base-controller@npm:3.1.0"
dependencies:
"@metamask/utils": ^5.0.2
immer: ^9.0.6
checksum: a0853d90b024466c4108531cbf4459bd2f66fa6e0b912e42bd27cdf54262411a5601117649b6061424475ffa6b9714c5199d686c21e4d07c3b7b1ee0b4c17caa
checksum: fc1597a099e6d28bd089df936ca349d6c38c2e1b0f0737385cba30c34a5239241519eb172d77c70f8db2604f4dc5724f6893affe42bdd104cef98f9cfd6f1db8
languageName: node
linkType: hard
@ -24636,7 +24636,7 @@ __metadata:
"@metamask/approval-controller": ^3.4.0
"@metamask/assets-controllers": ^9.2.0
"@metamask/auto-changelog": ^2.1.0
"@metamask/base-controller": ^3.0.0
"@metamask/base-controller": ^3.1.0
"@metamask/browser-passworder": ^4.1.0
"@metamask/contract-metadata": ^2.3.1
"@metamask/controller-utils": ^4.1.0