Bug 1630229: Part 8 - Stop throwing AssertionError for binding of defunct ServiceAllocator.InstanceInfo; r=geckoview-reviewers,owlish
authorAaron Klotz <aklotz@mozilla.com>
Thu, 21 May 2020 19:11:22 +0000
changeset 531492 9c5b9c33920bd312f86167e9577a028e980a4678
parent 531491 f350b8dff15db04d352d92aa8f46465aae5057ec
child 531493 8b1bfe0d44265063bf65677a2c37a1ebed0dc397
push id37440
push userabutkovits@mozilla.com
push dateFri, 22 May 2020 09:43:16 +0000
treeherdermozilla-central@fbf71e4d2e21 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, owlish
bugs1630229
milestone78.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 1630229: Part 8 - Stop throwing AssertionError for binding of defunct ServiceAllocator.InstanceInfo; r=geckoview-reviewers,owlish 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;
@@ -209,21 +208,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.