Bug 1457208 - use IPC_FAIL_NO_REASON instead of KillHard in ContentParent::RecvPlaySound; r=mikedeboer
authorAlex Gaynor <agaynor@mozilla.com>
Thu, 26 Apr 2018 09:35:18 -0400
changeset 472431 22c284b4f13e2dbd3ee96f1aba5116500adf710a
parent 472430 ae08735a4830705b46a35da014790d8bd4dff43d
child 472432 2d72766be0b3dc77db4e6e6af0460e048bfb5359
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1457208
milestone61.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 1457208 - use IPC_FAIL_NO_REASON instead of KillHard in ContentParent::RecvPlaySound; r=mikedeboer MozReview-Commit-ID: 1qixpl6qshu
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2674,18 +2674,18 @@ ContentParent::RecvClipboardHasType(nsTA
 
 mozilla::ipc::IPCResult
 ContentParent::RecvPlaySound(const URIParams& aURI)
 {
   nsCOMPtr<nsIURI> soundURI = DeserializeURI(aURI);
   bool isChrome = false;
   // If the check here fails, it can only mean that this message was spoofed.
   if (!soundURI || NS_FAILED(soundURI->SchemeIs("chrome", &isChrome)) || !isChrome) {
-    KillHard("PlaySound only accepts a valid chrome URI.");
-    return IPC_OK();
+    // PlaySound only accepts a valid chrome URI.
+    return IPC_FAIL_NO_REASON(this);
   }
   nsCOMPtr<nsIURL> soundURL(do_QueryInterface(soundURI));
   if (!soundURL) {
     return IPC_OK();
   }
 
   nsresult rv;
   nsCOMPtr<nsISound> sound(do_GetService(NS_SOUND_CID, &rv));