mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 07:16:36 +01:00
35dbdbc438
A patch made in #15672 was found to be unnecessary. Instead of setting a `rootGlobals` object upon construction of the root compartment, we are now creating a `sentryHooks` object in the initial top-level compartment. I hadn't realized at the time that the root compartment would inherit all properties of the initial compartment `globalThis`. This accomplishes the same goals as #15672 except without needing a patch.
11 lines
297 B
JavaScript
11 lines
297 B
JavaScript
import setupSentry from './lib/setupSentry';
|
|
|
|
// The root compartment will populate this with hooks
|
|
global.sentryHooks = {};
|
|
|
|
// setup sentry error reporting
|
|
global.sentry = setupSentry({
|
|
release: process.env.METAMASK_VERSION,
|
|
getState: () => global.sentryHooks?.getSentryState?.() || {},
|
|
});
|