Bug 1457208 - use IPC_FAIL_NO_REASON instead of KillHard in ContentParent::RecvPlaySound; r?mdeboer draft
authorAlex Gaynor <agaynor@mozilla.com>
Thu, 26 Apr 2018 09:35:18 -0400
changeset 788590 5a6ab5e5e80f924baa5655d9326c06d06e44c58e
parent 788440 ccfd7b716a91241ddbc084cb7116ec561e56d5d1
push id108018
push userbmo:agaynor@mozilla.com
push dateThu, 26 Apr 2018 16:41:18 +0000
reviewersmdeboer
bugs1457208
milestone61.0a1
Bug 1457208 - use IPC_FAIL_NO_REASON instead of KillHard in ContentParent::RecvPlaySound; r?mdeboer 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));