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 416280 22c284b4f13e2dbd3ee96f1aba5116500adf710a
parent 416279 ae08735a4830705b46a35da014790d8bd4dff43d
child 416281 2d72766be0b3dc77db4e6e6af0460e048bfb5359
push id63424
push userncsoregi@mozilla.com
push dateMon, 30 Apr 2018 14:01:58 +0000
treeherderautoland@22c284b4f13e [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));