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

RESOLVED DUPLICATE of bug 924565

Status

RESOLVED DUPLICATE of bug 924565
5 years ago
a year ago

People

(Reporter: brhuang, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

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();
(Reporter)

Comment 1

5 years ago
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
(Reporter)

Comment 3

5 years ago
Hi Tim,

Could you provide your comments here?
Flags: needinfo?(timdream)
(Reporter)

Comment 4

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 924565
(Reporter)

Comment 7

5 years ago
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)

Updated

5 years ago
Flags: needinfo?(tlee)

Updated

a year ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.