1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

Add lint to try to limit reappearance of Safari memory leaks (#6382)

This commit is contained in:
Daniel García
2023-10-10 19:13:50 +02:00
committed by GitHub
parent 3e720c05f2
commit 524123ac01
2 changed files with 19 additions and 0 deletions

View File

@@ -208,6 +208,7 @@ export class BrowserApi {
name: string,
callback: (message: any, sender: chrome.runtime.MessageSender, response: any) => void
) {
// eslint-disable-next-line no-restricted-syntax
chrome.runtime.onMessage.addListener(callback);
if (BrowserApi.isSafariApi && !BrowserApi.isBackgroundPage(window)) {
@@ -219,6 +220,7 @@ export class BrowserApi {
static storageChangeListener(
callback: Parameters<typeof chrome.storage.onChanged.addListener>[0]
) {
// eslint-disable-next-line no-restricted-syntax
chrome.storage.onChanged.addListener(callback);
if (BrowserApi.isSafariApi && !BrowserApi.isBackgroundPage(window)) {