Backed out changeset e18103445f9e (bug 1484524) on request from pascalc
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 17 Oct 2018 13:56:38 +0300
changeset 490027 e7995331d6386309dbe2caca5f947a54fc088249
parent 490026 ee2d80610d72755a8b2b58c6c8e8cd11a323da47
child 490028 4c944453210c428f505bc2d81b3b7f1c99a262a6
child 490046 0fc18d6f9732fafe1261b8ef8794c624e0dbbdd0
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
bugs1484524
milestone64.0a1
backs oute18103445f9e44d015e300cf9249f4ffa994ccc8
Backed out changeset e18103445f9e (bug 1484524) on request from pascalc
dom/cache/TypeUtils.cpp
--- a/dom/cache/TypeUtils.cpp
+++ b/dom/cache/TypeUtils.cpp
@@ -514,33 +514,13 @@ TypeUtils::SerializeCacheStream(nsIInput
 
   cacheStream.controlChild() = nullptr;
   cacheStream.controlParent() = nullptr;
 
   UniquePtr<AutoIPCStream> autoStream(new AutoIPCStream(cacheStream.stream()));
   autoStream->Serialize(aStream, GetIPCManager());
 
   aStreamCleanupList.AppendElement(std::move(autoStream));
-
-  // This nested condition guards against silent failures in IPC code
-  // that would cause a crash when the message is sent. Specifically,
-  // if IPCStreamSource::Initialize fails to get a StrongWorkerRef
-  // (e.g. when the worker terminates), a nullptr is silently stored
-  // in IPCRemoteStreamType.
-  // This is a workaround, requested in bug 1484524, and a more
-  // reasonable solution should replace it.
-  if (cacheStream.stream().type() == OptionalIPCStream::TIPCStream) {
-    const auto& ipcStream = cacheStream.stream().get_IPCStream();
-    if (ipcStream.type() == IPCStream::TIPCRemoteStream) {
-      const auto& ipcRemoteStream = ipcStream.get_IPCRemoteStream();
-      using mozilla::ipc::IPCRemoteStreamType;
-      if (ipcRemoteStream.stream().type() == IPCRemoteStreamType::TPChildToParentStreamChild) {
-        if (!ipcRemoteStream.stream().get_PChildToParentStreamChild()) {
-          aRv.Throw(NS_ERROR_FAILURE);
-        }
-      }
-    }
-  }
 }
 
 } // namespace cache
 } // namespace dom
 } // namespace mozilla