Skip to content

Fix memory leak because WebRequestMonitor.tabInfo is never removed#1983

Open
PetrP wants to merge 1 commit into
FelisCatus:masterfrom
PetrP:patch-1
Open

Fix memory leak because WebRequestMonitor.tabInfo is never removed#1983
PetrP wants to merge 1 commit into
FelisCatus:masterfrom
PetrP:patch-1

Conversation

@PetrP
Copy link
Copy Markdown

@PetrP PetrP commented Feb 7, 2020

What does this PR do?

  • Bug fix
  • Improvement
  • New feature

I noticed that when browser is running for longer time (days/weeks), the extension has masive memory footprint (hundreds of MB).
I investigated a little and noticed that WebRequestMonitor.tabInfo is never removed,
and it is because chrome.tabs.onRemoved.addListener had wrong parameter.

Compatibility

yes

tabInfo grows over time and extension is allocating more and more memory.
chrome.tabs.onRemoved.addListener is getting integer tabId, not tab object.
@PetrP PetrP changed the title Fix that WebRequestMonitor.tabInfo is never removed Fix memory leak because WebRequestMonitor.tabInfo is never removed Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant