Bug 1634585: Return a rejected promise instead of nullptr from mozilla::GetProcInfo on Android; r=geckoview-reviewers,agi
authorAaron Klotz <aklotz@mozilla.com>
Thu, 21 May 2020 20:21:39 +0000
changeset 531522 78e1e47675dc093169b753b9e9735da4a2a1ef54
parent 531521 6f615c38b59464498ca3a89284685cad07551a01
child 531523 d1343cbbfca37e4651a7e3179197b5c4b68c8841
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, agi
bugs1634585, 1529510
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 1634585: Return a rejected promise instead of nullptr from mozilla::GetProcInfo on Android; r=geckoview-reviewers,agi This is a simple fix to eliminate crashing. Proper implementation of this function will be done in bug 1529510. Differential Revision: https://phabricator.services.mozilla.com/D76269
widget/android/ProcInfo.cpp
--- a/widget/android/ProcInfo.cpp
+++ b/widget/android/ProcInfo.cpp
@@ -8,12 +8,12 @@
 #include "mozilla/ipc/GeckoChildProcessHost.h"
 
 namespace mozilla {
 
 RefPtr<ProcInfoPromise> GetProcInfo(base::ProcessId pid, int32_t childId,
                                     const ProcType& type,
                                     const nsAString& origin) {
   // Not implemented on Android.
-  return nullptr;
+  return ProcInfoPromise::CreateAndReject(NS_ERROR_NOT_IMPLEMENTED, __func__);
 }
 
 }  // namespace mozilla