Closed Bug 940198 Opened 11 years ago Closed 11 years ago

Help to confirm if cause memory leak after call navigator.mozApps.mgmt.getAll()

Categories

(Core Graveyard :: DOM: Apps, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 924565

People

(Reporter: brhuang, Unassigned)

Details

Partner reported that memory leak happened during testing. After checking, the issue was because of the usage navigator.mozApps.mgmt.getAll(). Gaiatest already release a patch to fix it. 

Since there are still many places calling it. Could anyone help to check if there is a chance to have the memory leak.

Code contains the call:

About.js (gaia\apps\settings\js):      navigator.mozApps.mgmt.getAll().onsuccess = function gotApps(evt) {

aboutApps.js (gecko\mobile\android\chrome\content):  let request = navigator.mozApps.mgmt.getAll();

Appinfo.js (gecko\b2g\chrome\content\engmode\projectmenu\js):    navigator.mozApps.mgmt.getAll().onsuccess = function mozAppGotAll(evt)

Applications.js (gaia\apps\system\js):      navigator.mozApps.mgmt.getAll().onsuccess = function mozAppGotAll(evt) {

Apps.js (gaia\apps\settings\js):    navigator.mozApps.mgmt.getAll().onsuccess = function mozAppGotAll(evt) {

Icc_worker.js (gaia\apps\system\js):      navigator.mozApps.mgmt.getAll().onsuccess = function gotApps(evt) {

Permissiontest.js (gaia\test_apps\testpermission\js):  navigator.mozApps.mgmt.getAll().onsuccess = function mozAppGotAll(evt) {

Runapp.js (gecko\b2g\chrome\content):    this._req = navigator.mozApps.mgmt.getAll();

Test_clear_browser_data.html (gecko\dom\tests\mochitest\localstorage):  navigator.mozApps.mgmt.getAll().onsuccess = function() {

UpdatePrompt.js (gecko\b2g\components):    let all = window.navigator.mozApps.mgmt.getAll();
Hi Thinker,

Could you provide your comments here?
Flags: needinfo?(tlee)
(In reply to Brian Huang [:brianhuang] from comment #1)
> Hi Thinker,
> 
> Could you provide your comments here?

You probably want Fabrice's input here. He is the primary developer on this API.
Component: General → DOM: Apps
Flags: needinfo?(fabrice)
Product: Firefox OS → Core
Hi Tim,

Could you provide your comments here?
Flags: needinfo?(timdream)
Please refer to here to know the memory leak (bug 924565).
I don't understand why we have a new bug here. There are known issues with object lifetime (which are not necessarily leaks), especially when used in windows that never go away. I would:
1) apply the gaiatest patch.
2) wait for bug 924565 to land.
Flags: needinfo?(fabrice)
Duping this over to bug 924565
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Hi Fabrice,

(In reply to Fabrice Desré [:fabrice] from comment #5)
> I don't understand why we have a new bug here. There are known issues with
> object lifetime (which are not necessarily leaks), especially when used in
> windows that never go away. I would:
> 1) apply the gaiatest patch.
> 2) wait for bug 924565 to land.

I am not open another case, since there are many places called this function. I just want to confirm if there will have chance to cause memory leak if code did not handle well. Like Gaiatest, it was modified.
Flags: needinfo?(timdream)
Flags: needinfo?(tlee)
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.