Bug 1338096 - correct the data type used in PHttpChannel.SetPriority(). r=mayhemer
MozReview-Commit-ID: k5paB7XsTV
--- a/netwerk/ipc/NeckoChannelParams.ipdlh
+++ b/netwerk/ipc/NeckoChannelParams.ipdlh
@@ -100,17 +100,17 @@ struct HttpChannelOpenArgs
uint32_t referrerPolicy;
OptionalURIParams apiRedirectTo;
OptionalURIParams topWindowURI;
uint32_t loadFlags;
RequestHeaderTuples requestHeaders;
nsCString requestMethod;
OptionalIPCStream uploadStream;
bool uploadStreamHasHeaders;
- uint16_t priority;
+ int16_t priority;
uint32_t classOfService;
uint8_t redirectionLimit;
bool allowPipelining;
bool allowSTS;
uint32_t thirdPartyFlags;
bool resumeAt;
uint64_t startPos;
nsCString entityID;
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -2963,16 +2963,16 @@ HttpChannelChild::ShouldInterceptURI(nsI
rv = NS_GetSecureUpgradedURI(aURI, getter_AddRefs(upgradedURI));
NS_ENSURE_SUCCESS(rv, false);
}
return ShouldIntercept(upgradedURI ? upgradedURI.get() : aURI);
}
mozilla::ipc::IPCResult
-HttpChannelChild::RecvSetPriority(const uint16_t& aPriority)
+HttpChannelChild::RecvSetPriority(const int16_t& aPriority)
{
mPriority = aPriority;
return IPC_OK();
}
} // namespace net
} // namespace mozilla
--- a/netwerk/protocol/http/HttpChannelChild.h
+++ b/netwerk/protocol/http/HttpChannelChild.h
@@ -150,17 +150,17 @@ protected:
mozilla::ipc::IPCResult RecvFinishInterceptedRedirect() override;
mozilla::ipc::IPCResult RecvReportSecurityMessage(const nsString& messageTag,
const nsString& messageCategory) override;
mozilla::ipc::IPCResult RecvIssueDeprecationWarning(const uint32_t& warning,
const bool& asError) override;
- mozilla::ipc::IPCResult RecvSetPriority(const uint16_t& aPriority) override;
+ mozilla::ipc::IPCResult RecvSetPriority(const int16_t& aPriority) override;
bool GetAssociatedContentSecurity(nsIAssociatedContentSecurity** res = nullptr);
virtual void DoNotifyListenerCleanup() override;
NS_IMETHOD GetResponseSynthesized(bool* aSynthesized) override;
private:
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -297,17 +297,17 @@ HttpChannelParent::DoAsyncOpen( const U
const uint32_t& aReferrerPolicy,
const OptionalURIParams& aAPIRedirectToURI,
const OptionalURIParams& aTopWindowURI,
const uint32_t& aLoadFlags,
const RequestHeaderTuples& requestHeaders,
const nsCString& requestMethod,
const OptionalIPCStream& uploadStream,
const bool& uploadStreamHasHeaders,
- const uint16_t& priority,
+ const int16_t& priority,
const uint32_t& classOfService,
const uint8_t& redirectionLimit,
const bool& allowPipelining,
const bool& allowSTS,
const uint32_t& thirdPartyFlags,
const bool& doResumeAt,
const uint64_t& startPos,
const nsCString& entityID,
@@ -618,19 +618,19 @@ HttpChannelParent::ConnectChannel(const
pbChannel->SetPrivate(mPBOverride == kPBOverride_Private ? true : false);
}
}
return true;
}
mozilla::ipc::IPCResult
-HttpChannelParent::RecvSetPriority(const uint16_t& priority)
+HttpChannelParent::RecvSetPriority(const int16_t& priority)
{
- LOG(("HttpChannelParent::RecvSetPriority [this=%p, priority=%u]\n",
+ LOG(("HttpChannelParent::RecvSetPriority [this=%p, priority=%d]\n",
this, priority));
if (mChannel) {
mChannel->SetPriority(priority);
}
nsCOMPtr<nsISupportsPriority> priorityRedirectChannel =
do_QueryInterface(mRedirectChannel);
--- a/netwerk/protocol/http/HttpChannelParent.h
+++ b/netwerk/protocol/http/HttpChannelParent.h
@@ -114,17 +114,17 @@ protected:
const uint32_t& referrerPolicy,
const OptionalURIParams& internalRedirectUri,
const OptionalURIParams& topWindowUri,
const uint32_t& loadFlags,
const RequestHeaderTuples& requestHeaders,
const nsCString& requestMethod,
const OptionalIPCStream& uploadStream,
const bool& uploadStreamHasHeaders,
- const uint16_t& priority,
+ const int16_t& priority,
const uint32_t& classOfService,
const uint8_t& redirectionLimit,
const bool& allowPipelining,
const bool& allowSTS,
const uint32_t& thirdPartyFlags,
const bool& doResumeAt,
const uint64_t& startPos,
const nsCString& entityID,
@@ -143,17 +143,17 @@ protected:
const bool& aBlockAuthPrompt,
const bool& aSuspendAfterSynthesizeResponse,
const bool& aAllowStaleCacheContent,
const nsCString& aContentTypeHint,
const nsCString& aChannelId,
const uint64_t& aContentWindowId,
const nsCString& aPreferredAlternativeType);
- virtual mozilla::ipc::IPCResult RecvSetPriority(const uint16_t& priority) override;
+ virtual mozilla::ipc::IPCResult RecvSetPriority(const int16_t& priority) override;
virtual mozilla::ipc::IPCResult RecvSetClassOfService(const uint32_t& cos) override;
virtual mozilla::ipc::IPCResult RecvSetCacheTokenCachedCharset(const nsCString& charset) override;
virtual mozilla::ipc::IPCResult RecvSuspend() override;
virtual mozilla::ipc::IPCResult RecvResume() override;
virtual mozilla::ipc::IPCResult RecvCancel(const nsresult& status) override;
virtual mozilla::ipc::IPCResult RecvRedirect2Verify(const nsresult& result,
const RequestHeaderTuples& changedHeaders,
const uint32_t& loadFlags,
--- a/netwerk/protocol/http/PHttpChannel.ipdl
+++ b/netwerk/protocol/http/PHttpChannel.ipdl
@@ -172,14 +172,14 @@ child:
both:
// After receiving this message, the parent also calls
// SendFinishInterceptedRedirect, and makes sure not to send any more messages
// after that. When receiving this message, the child will call
// Send__delete__() and complete the steps required to finish the redirect.
async FinishInterceptedRedirect();
- async SetPriority(uint16_t priority);
+ async SetPriority(int16_t priority);
};
} // namespace net
} // namespace mozilla