Bug 1306327 - Avoid call to NS_DebugBreak from content_process_main(). r=billm
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 10 Jan 2017 17:50:04 +0900
changeset 462790 be999ce0e4fe0354bd2737504cca7fccf206f94e
parent 462789 8e583d30ce9816b92a180ce34b0559c7e09e04a3
child 462791 a7dac14f91df3f94ed809465f80833c310a99f0c
push id41857
push userbmo:mh+mozilla@glandium.org
push dateWed, 18 Jan 2017 00:24:11 +0000
reviewersbillm
bugs1306327
milestone53.0a1
Bug 1306327 - Avoid call to NS_DebugBreak from content_process_main(). r=billm We want to avoid calls to XPCOM glue functions, in order to remove them later on.
ipc/contentproc/plugin-container.cpp
--- a/ipc/contentproc/plugin-container.cpp
+++ b/ipc/contentproc/plugin-container.cpp
@@ -107,12 +107,10 @@ content_process_main(int argc, char* arg
 #if !defined(XP_LINUX) && defined(MOZ_PLUGIN_CONTAINER)
     // On Windows and MacOS, the GMPLoader lives in plugin-container, so that its
     // code can be covered by an EME/GMP vendor's voucher.
     if (XRE_GetProcessType() == GeckoProcessType_GMPlugin) {
         childData.gmpLoader = mozilla::gmp::CreateGMPLoader(MakeSandboxStarter());
     }
 #endif
     nsresult rv = XRE_InitChildProcess(argc, argv, &childData);
-    NS_ENSURE_SUCCESS(rv, 1);
-
-    return 0;
+    return NS_FAILED(rv);
 }