Bug 1457208 - use IPC_FAIL_NO_REASON instead of KillHard in ContentParent::RecvPlaySound; r?mdeboer
MozReview-Commit-ID: 1qixpl6qshu
--- 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));