Issue metadata
Sign in to add a comment
|
Memory leak in chrome.browserAction.setIcon().
Reported by
smbl...@gmail.com,
Mar 21 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36 Steps to reproduce the problem: 1. Use chrome.browserAction.setIcon() on an extension's background page (with a tabId specified) for every new tab. 2. Create some tabs, remove some tabs, create some tabs, remove some tabs, and so on 3. What is the expected behavior? The memory consumed by the extension remains roughly constant. What went wrong? The memory consumed by the extension rises quite rapidly. In the case of Vimium, on the order of 200KB per tab. WebStore page: https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb/reviews?hl=en Did this work before? Yes It worked in 48.0.2564.109. Chrome version: 50.0.2661.37 Channel: n/a OS Version: Debian (Jessie) Flash Version: Shockwave Flash 20.0 r0 Try the attached mini-extension to demonstrate the issue.
,
Apr 28 2016
Reproduced, debugged and reduced. This bug has the same root cause as issue 242215 (getImageData is used here: https://chromium.googlesource.com/chromium/src/+/master/extensions/renderer/resources/set_icon.js). The work-around is to use chrome.browserAction.setIcon with ImageData [1]. So duplicate the loadImagePath logic from set_icon.js, cache the ImageData variable somewhere in your code and call chrome.browserAction.setIcon({imageData: the_image_data_that_you_just_cached}); [1] https://developer.chrome.com/extensions/browserAction#method-setIcon |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by smbl...@gmail.com
, Mar 24 2016