Bug 1643458: Remove numUnbindFailures from ServiceAllocator.InstanceInfo.updateBindings; r=geckoview-reviewers,agi
authorAaron Klotz <aklotz@mozilla.com>
Thu, 04 Jun 2020 21:56:50 +0000
changeset 534200 c54c1b17dac6dc62020699b5037b7325ce9c5ddc
parent 534199 85183f00ced0e0592cb8f783c39a5a1da8369b4d
child 534201 b6cc21d51827dce745d756214173e13354b8a5e1
push id37484
push userdluca@mozilla.com
push dateSat, 06 Jun 2020 09:46:03 +0000
treeherdermozilla-central@6237102f005d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, agi
bugs1643458
milestone79.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 1643458: Remove numUnbindFailures from ServiceAllocator.InstanceInfo.updateBindings; r=geckoview-reviewers,agi `numUnbindFailures` can never be non-zero (since any unbind failures throw), so we should just eliminate this variable. Differential Revision: https://phabricator.services.mozilla.com/D78362
mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/ServiceAllocator.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/ServiceAllocator.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/ServiceAllocator.java
@@ -298,17 +298,16 @@ import java.util.Map.Entry;
          * current priority level ordinal must be bound.
          */
         @TargetApi(29)
         private boolean updateBindings() {
             XPCOMEventTarget.assertOnLauncherThread();
             int numBindSuccesses = 0;
             int numBindFailures = 0;
             int numUnbindSuccesses = 0;
-            int numUnbindFailures = 0;
 
             final Context context = GeckoAppShell.getApplicationContext();
 
             // This code assumes that the order of the PriorityLevel enum is highest to lowest
             final int curPriorityOrdinal = mCurrentPriority.ordinal();
             final PriorityLevel[] levels = PriorityLevel.values();
 
             for (int curLevelIdx = 0; curLevelIdx < levels.length; ++curLevelIdx) {
@@ -361,21 +360,20 @@ import java.util.Map.Entry;
             }
 
             final String svcName = mBindDelegate.getServiceName();
             final StringBuilder builder = new StringBuilder(svcName);
             builder.append(" updateBindings: ").append(mCurrentPriority).append(" priority, ")
                    .append(mRelativeImportance).append(" importance, ")
                    .append(numBindSuccesses).append(" successful binds, ")
                    .append(numBindFailures).append(" failed binds, ")
-                   .append(numUnbindSuccesses).append(" successful unbinds, ")
-                   .append(numUnbindFailures).append(" failed unbinds");
+                   .append(numUnbindSuccesses).append(" successful unbinds");
             Log.d(LOGTAG, builder.toString());
 
-            return numBindFailures == 0 && numUnbindFailures == 0;
+            return numBindFailures == 0;
         }
     }
 
     private interface ContentAllocationPolicy {
         /**
          * @return BindServiceDelegate that will be used for binding a new content service.
          */
         BindServiceDelegate getBindServiceDelegate(InstanceInfo info);