Bug 1287163 - Remove over-strict asserts in InternalResponse IPC code. r=sicking
authorKannan Vijayan <kvijayan@mozilla.com>
Mon, 18 Jul 2016 13:01:00 -0400
changeset 330673 fd7eaf008b62b564dcb6e31aa76ba5c476de559d
parent 330672 6acd35b64dc936c0e5fed7b041a81508518e324a
child 330674 6cca6d362e38a4eb1f680c62a17137e04b1169f2
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssicking
bugs1287163
milestone50.0a1
Bug 1287163 - Remove over-strict asserts in InternalResponse IPC code. r=sicking
dom/fetch/InternalResponse.cpp
--- a/dom/fetch/InternalResponse.cpp
+++ b/dom/fetch/InternalResponse.cpp
@@ -24,18 +24,16 @@ InternalResponse::InternalResponse(uint1
   , mHeaders(new InternalHeaders(HeadersGuardEnum::Response))
   , mBodySize(UNKNOWN_BODY_SIZE)
 {
 }
 
 already_AddRefed<InternalResponse>
 InternalResponse::FromIPC(const IPCInternalResponse& aIPCResponse)
 {
-  MOZ_ASSERT(!aIPCResponse.urlList().IsEmpty());
-
   if (aIPCResponse.type() == ResponseType::Error) {
     return InternalResponse::NetworkError();
   }
 
   RefPtr<InternalResponse> response =
     new InternalResponse(aIPCResponse.status(),
                          aIPCResponse.statusText());
 
@@ -104,17 +102,16 @@ InternalResponse::ToIPC<mozilla::ipc::PB
 
 template<typename M>
 void
 InternalResponse::ToIPC(IPCInternalResponse* aIPCResponse,
                         M* aManager,
                         UniquePtr<mozilla::ipc::AutoIPCStream>& aAutoStream)
 {
   MOZ_ASSERT(aIPCResponse);
-  MOZ_ASSERT(!mURLList.IsEmpty());
   aIPCResponse->type() = mType;
   aIPCResponse->urlList() = mURLList;
   aIPCResponse->status() = GetUnfilteredStatus();
   aIPCResponse->statusText() = GetUnfilteredStatusText();
 
   mHeaders->ToIPC(aIPCResponse->headers(), aIPCResponse->headersGuard());
 
   aIPCResponse->channelInfo() = mChannelInfo.AsIPCChannelInfo();