Bug 663229 - e10s HTTP: initialize prnetaddrs correctly in child. r=jdm
authorJason Duell <jduell.mcbugs@gmail.com>
Thu, 09 Jun 2011 14:02:09 -0700
changeset 71122 a19e5f55f67c06225f1c0290a448f1f6cb1e98ae
parent 71121 87406ae57a1b67662d3e452bfddac70e42c35aad
child 71123 974c34e96293be6fee5489ba4dc7b31895785ac7
push id209
push userbzbarsky@mozilla.com
push dateTue, 05 Jul 2011 17:42:16 +0000
treeherdermozilla-aurora@cc6e30cce8af [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs663229
milestone7.0a1
Bug 663229 - e10s HTTP: initialize prnetaddrs correctly in child. r=jdm
netwerk/ipc/NeckoMessageUtils.h
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/ipc/NeckoMessageUtils.h
+++ b/netwerk/ipc/NeckoMessageUtils.h
@@ -339,16 +339,19 @@ struct ParamTraits<PRNetAddr>
     } else if (aParam.raw.family == PR_AF_INET6) {
       WriteParam(aMsg, aParam.ipv6.port);
       WriteParam(aMsg, aParam.ipv6.flowinfo);
       WriteParam(aMsg, aParam.ipv6.ip.pr_s6_addr64[0]);
       WriteParam(aMsg, aParam.ipv6.ip.pr_s6_addr64[1]);
       WriteParam(aMsg, aParam.ipv6.scope_id);
 #if defined(XP_UNIX) || defined(XP_OS2)
     } else if (aParam.raw.family == PR_AF_LOCAL) {
+      // Train's already off the rails:  let's get a stack trace at least...
+      NS_RUNTIMEABORT("Error: please post stack trace to "
+                      "https://bugzilla.mozilla.org/show_bug.cgi?id=661158");
       aMsg->WriteBytes(aParam.local.path, sizeof(aParam.local.path));
 #endif
     }
 
     /* If we get here without hitting any of the cases above, there's not much
      * we can do but let the deserializer fail when it gets this message */
   }
 
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -82,16 +82,20 @@ HttpBaseChannel::HttpBaseChannel()
   , mTracingEnabled(PR_TRUE)
   , mTimingEnabled(PR_FALSE)
   , mRedirectedCachekeys(nsnull)
 {
   LOG(("Creating HttpBaseChannel @%x\n", this));
 
   // grab a reference to the handler to ensure that it doesn't go away.
   NS_ADDREF(gHttpHandler);
+
+  // Subfields of unions cannot be targeted in an initializer list
+  mSelfAddr.raw.family = PR_AF_UNSPEC;
+  mPeerAddr.raw.family = PR_AF_UNSPEC;
 }
 
 HttpBaseChannel::~HttpBaseChannel()
 {
   LOG(("Destroying HttpBaseChannel @%x\n", this));
 
   // Make sure we don't leak
   CleanRedirectCacheChainIfNecessary();
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -133,19 +133,16 @@ nsHttpChannel::nsHttpChannel()
     , mCustomConditionalRequest(PR_FALSE)
     , mFallingBack(PR_FALSE)
     , mWaitingForRedirectCallback(PR_FALSE)
     , mRequestTimeInitialized(PR_FALSE)
 {
     LOG(("Creating nsHttpChannel [this=%p]\n", this));
     mChannelCreationTime = PR_Now();
     mChannelCreationTimestamp = mozilla::TimeStamp::Now();
-    // Subfields of unions cannot be targeted in an initializer list
-    mSelfAddr.raw.family = PR_AF_UNSPEC;
-    mPeerAddr.raw.family = PR_AF_UNSPEC;
 }
 
 nsHttpChannel::~nsHttpChannel()
 {
     LOG(("Destroying nsHttpChannel [this=%p]\n", this));
 
     if (mAuthProvider)
         mAuthProvider->Disconnect(NS_ERROR_ABORT);