Closed Bug 975434 Opened 6 years ago Closed 6 years ago

Remove the ability to cancel memory minimizations

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
1.4 S2 (28feb)

People

(Reporter: gsvelto, Assigned: gsvelto)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #971728 +++

In bug 814771 we had introduced the ability to cancel a memory minimization and used it to interrupt the process when the homescreen was quickly sent to the background and then to the foreground again. Now that bug 971728 has landed we don't use this functionality anymore so let's remove it as it's just become unnecessary complexity in the relevant code.
Assignee: nobody → gsvelto
Status: NEW → ASSIGNED
Comment on attachment 8381435 [details] [diff] [review]
[PATCH] Remove the ability to cancel memory minimizations

This effectively removes the changes introduced in bug 814771. The ability to cancel memory minimizations is not needed anymore now that we're using regular memory-pressure events for this task, removing it simplifies the code which IMHO is a good thing.

The try run is here:

https://tbpl.mozilla.org/?tree=Try&rev=1525dfd4e28f
Attachment #8381435 - Flags: review?(n.nethercote)
Comment on attachment 8381435 [details] [diff] [review]
[PATCH] Remove the ability to cancel memory minimizations

Review of attachment 8381435 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/ipc/ContentChild.cpp
@@ +1511,5 @@
>      }
>  #endif
>      nsCOMPtr<nsIMemoryReporterManager> mgr =
>          do_GetService("@mozilla.org/memory-reporter-manager;1");
>      NS_ENSURE_TRUE(mgr, true);

This function always returns true, so if you want to change it to return void that'd be fine by me.
Attachment #8381435 - Flags: review?(n.nethercote) → review+
(In reply to Nicholas Nethercote [:njn] from comment #3)
> This function always returns true, so if you want to change it to return
> void that'd be fine by me.

The prototype for that method is generated from IPDL and IIRC it's not possible to force it to return void. It's a bit silly but we'll have to live with it. Thanks for the review!
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a21fc292b2ea
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S2 (28feb)
You need to log in before you can comment on or make changes to this bug.