Bug 1253142 - Remove the long-deprecated nsIMemory.isLowMemory function. r=froydnj.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 06 Mar 2016 21:07:51 +1100
changeset 286990 93174ad8f659842636c364f579e2d59d67b85cea
parent 286989 8deacfdcb600b643ce24e973c670e4ca905ff8ea
child 286991 ab56b147647f5743e58974da59ef49fa2e6f92a8
push id72988
push usernnethercote@mozilla.com
push dateSun, 06 Mar 2016 21:54:37 +0000
treeherdermozilla-inbound@93174ad8f659 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1253142
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253142 - Remove the long-deprecated nsIMemory.isLowMemory function. r=froydnj.
xpcom/base/nsIMemory.idl
xpcom/base/nsMemoryImpl.cpp
--- a/xpcom/base/nsIMemory.idl
+++ b/xpcom/base/nsIMemory.idl
@@ -63,25 +63,16 @@ interface nsIMemory : nsISupports
      *   false, the flush will be scheduled to happen when the app is
      *   idle.
      * @throws NS_ERROR_FAILURE if 'immediate' is set an the call
      *   was not on the application's main thread.
      */
     void heapMinimize(in boolean immediate);
 
     /**
-     * This predicate can be used to determine if we're in a low-memory
-     * situation (what constitutes low-memory is platform dependent). This
-     * can be used to trigger the memory pressure observers.
-     *
-     * DEPRECATED - Always returns false.  See bug 592308.
-     */
-    boolean isLowMemory();
-
-    /**
      * This predicate can be used to determine if the platform is a "low-memory"
      * platform. Callers may use this to dynamically tune their behaviour
      * to favour reduced memory usage at the expense of performance. The value
      * returned by this function will not change over the lifetime of the process.
      */
     boolean isLowMemoryPlatform();
 };
 
--- a/xpcom/base/nsMemoryImpl.cpp
+++ b/xpcom/base/nsMemoryImpl.cpp
@@ -30,24 +30,16 @@ NS_IMPL_QUERY_INTERFACE(nsMemoryImpl, ns
 
 NS_IMETHODIMP
 nsMemoryImpl::HeapMinimize(bool aImmediate)
 {
   return FlushMemory(MOZ_UTF16("heap-minimize"), aImmediate);
 }
 
 NS_IMETHODIMP
-nsMemoryImpl::IsLowMemory(bool* aResult)
-{
-  NS_ERROR("IsLowMemory is deprecated.  See bug 592308.");
-  *aResult = false;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsMemoryImpl::IsLowMemoryPlatform(bool* aResult)
 {
 #ifdef ANDROID
   static int sLowMemory = -1; // initialize to unknown, lazily evaluate to 0 or 1
   if (sLowMemory == -1) {
     sLowMemory = 0; // assume "not low memory" in case file operations fail
     *aResult = false;