Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
observeStorageKey('sync', 'featureFlags').subscribe((flags = featureFlagDefaults) => {
const allowed = flags.allowErrorReporting
// Don't initialize if user hasn't allowed us to report errors or in Phabricator.
if (!allowed || isInPage) {
const client = Sentry.getCurrentHub().getClient()
if (client) {
client.getOptions().enabled = false
}
return
}
callSentryInit(browser.runtime.id)
Sentry.configureScope(scope => {
scope.setTag('script', script)
scope.setTag('extension_version', getExtensionVersion())
if (codeHost) {
scope.setTag('code_host', codeHost)
}
})
})
export function nativeCrash(): void {
const client = getCurrentHub().getClient();
if (client) {
client.nativeCrash();
}
}