Bug 1442250 - 4. Fix crash when child preloading fails; r=jchen
authorJim Chen <nchen@mozilla.com>
Fri, 09 Mar 2018 12:34:37 -0500
changeset 460002 beefe251970fd65eaa9b52bb28fa784a02488c97
parent 460001 f06bf979916a4cb4a65402272827c1aa86c8e1d4
child 460003 a49ec516aafd994407a19e50052e0c0e0e7546da
push id8824
push userarchaeopteryx@coole-files.de
push dateMon, 12 Mar 2018 14:54:48 +0000
treeherdermozilla-beta@8d9daab95d68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs1442250
milestone60.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 1442250 - 4. Fix crash when child preloading fails; r=jchen Fix a null pointer crash when we fail to preload a child process. MozReview-Commit-ID: FIJopxOVAEj
mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoProcessManager.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoProcessManager.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoProcessManager.java
@@ -156,18 +156,19 @@ public final class GeckoProcessManager e
             }
             return connection;
         }
     }
 
     public void preload(final String... types) {
         for (final String type : types) {
             final ChildConnection connection = getConnection(type);
-            connection.bind();
-            connection.getPid();
+            if (connection.bind() != null) {
+                connection.getPid();
+            }
         }
     }
 
     @WrapForJNI
     private static int start(final String type, final String[] args,
                              final int ipcFd, final int crashFd,
                              final int crashAnnotationFd) {
         return INSTANCE.start(type, args, ipcFd, crashFd, crashAnnotationFd, /* retry */ false);