Bug 1630229: Part 8 - Stop throwing AssertionError for binding of defunct ServiceAllocator.InstanceInfo; r=geckoview-reviewers,owlish a=RyanVM
authorAaron Klotz <aklotz@mozilla.com>
Thu, 21 May 2020 19:11:22 +0000
changeset 2913930 300dc3a419af8f977f5bcd875a88dacbd7d21120
parent 2913929 5bb288cd58d3d250878d0564c0cc47790ba8d419
child 2913931 b56c5586464ad74e5c980e38fba121705ffcc65c
push id542463
push userarchaeopteryx@coole-files.de
push dateMon, 25 May 2020 10:36:55 +0000
treeherdertry@273e62595ea4 [default view] [failures only]
reviewersgeckoview-reviewers, owlish, RyanVM
bugs1630229
milestone77.0
Bug 1630229: Part 8 - Stop throwing AssertionError for binding of defunct ServiceAllocator.InstanceInfo; r=geckoview-reviewers,owlish a=RyanVM I'm keeping this patch as simple as possible so that we can uplift to beta. I'll sort out the rest of this in follow-up bugs. Differential Revision: https://phabricator.services.mozilla.com/D76333
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
@@ -1,15 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.process;
 
-import org.mozilla.geckoview.BuildConfig;
 import org.mozilla.gecko.annotation.WrapForJNI;
 import org.mozilla.gecko.GeckoAppShell;
 import org.mozilla.gecko.util.XPCOMEventTarget;
 
 import android.annotation.TargetApi;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -205,21 +204,17 @@ import java.util.Map.Entry;
 
         public GeckoProcessType getType() {
             return mType;
         }
 
         protected boolean bindService() {
             if (mIsDefunct) {
                 final String errorMsg = "Attempt to bind a defunct InstanceInfo for " + mType + " child process";
-                if (BuildConfig.DEBUG) {
-                    throw new AssertionError(errorMsg);
-                } else {
-                    throw new BindException(errorMsg);
-                }
+                throw new BindException(errorMsg);
             }
 
             return updateBindings();
         }
 
         /**
          * Unbinds the service described by |this| and releases our unique ID. This method may
          * safely be called multiple times even if we are already defunct.