Skip to content

Commit 6e789d3

Browse files
committed
Bug 536324 part 2 - Change implementers of nsIChannel. r=sworkman
1 parent b7fddb4 commit 6e789d3

26 files changed

+60
-110
lines changed

dom/src/jsurl/nsJSProtocolHandler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,13 +1045,13 @@ nsJSChannel::GetContentDispositionHeader(nsACString &aContentDispositionHeader)
10451045
}
10461046

10471047
NS_IMETHODIMP
1048-
nsJSChannel::GetContentLength(int32_t *aContentLength)
1048+
nsJSChannel::GetContentLength(int64_t *aContentLength)
10491049
{
10501050
return mStreamChannel->GetContentLength(aContentLength);
10511051
}
10521052

10531053
NS_IMETHODIMP
1054-
nsJSChannel::SetContentLength(int32_t aContentLength)
1054+
nsJSChannel::SetContentLength(int64_t aContentLength)
10551055
{
10561056
return mStreamChannel->SetContentLength(aContentLength);
10571057
}

image/decoders/icon/mac/nsIconChannel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class nsIconChannel MOZ_FINAL : public nsIChannel, public nsIStreamListener
3838
protected:
3939
nsCOMPtr<nsIURI> mUrl;
4040
nsCOMPtr<nsIURI> mOriginalURI;
41-
int32_t mContentLength;
41+
int64_t mContentLength;
4242
nsCOMPtr<nsILoadGroup> mLoadGroup;
4343
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
4444
nsCOMPtr<nsISupports> mOwner;

image/decoders/icon/mac/nsIconChannelCocoa.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,13 @@
391391
return NS_ERROR_NOT_AVAILABLE;
392392
}
393393

394-
NS_IMETHODIMP nsIconChannel::GetContentLength(int32_t *aContentLength)
394+
NS_IMETHODIMP nsIconChannel::GetContentLength(int64_t *aContentLength)
395395
{
396396
*aContentLength = mContentLength;
397397
return NS_OK;
398398
}
399399

400-
NS_IMETHODIMP nsIconChannel::SetContentLength(int32_t aContentLength)
400+
NS_IMETHODIMP nsIconChannel::SetContentLength(int64_t aContentLength)
401401
{
402402
NS_NOTREACHED("nsIconChannel::SetContentLength");
403403
return NS_ERROR_NOT_IMPLEMENTED;

image/decoders/icon/os2/nsIconChannel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,13 +629,13 @@ nsIconChannel::GetContentDispositionHeader(nsACString &aContentDispositionHeader
629629
return NS_ERROR_NOT_AVAILABLE;
630630
}
631631

632-
NS_IMETHODIMP nsIconChannel::GetContentLength(int32_t *aContentLength)
632+
NS_IMETHODIMP nsIconChannel::GetContentLength(int64_t *aContentLength)
633633
{
634634
*aContentLength = mContentLength;
635635
return NS_OK;
636636
}
637637

638-
NS_IMETHODIMP nsIconChannel::SetContentLength(int32_t aContentLength)
638+
NS_IMETHODIMP nsIconChannel::SetContentLength(int64_t aContentLength)
639639
{
640640
NS_NOTREACHED("nsIconChannel::SetContentLength");
641641
return NS_ERROR_NOT_IMPLEMENTED;

image/decoders/icon/os2/nsIconChannel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class nsIconChannel MOZ_FINAL : public nsIChannel, public nsIStreamListener
3838
protected:
3939
nsCOMPtr<nsIURI> mUrl;
4040
nsCOMPtr<nsIURI> mOriginalURI;
41-
int32_t mContentLength;
41+
int64_t mContentLength;
4242
nsCOMPtr<nsILoadGroup> mLoadGroup;
4343
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
4444
nsCOMPtr<nsISupports> mOwner;

image/decoders/icon/win/nsIconChannel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,13 +643,13 @@ nsIconChannel::GetContentDispositionHeader(nsACString &aContentDispositionHeader
643643
return NS_ERROR_NOT_AVAILABLE;
644644
}
645645

646-
NS_IMETHODIMP nsIconChannel::GetContentLength(int32_t *aContentLength)
646+
NS_IMETHODIMP nsIconChannel::GetContentLength(int64_t *aContentLength)
647647
{
648648
*aContentLength = mContentLength;
649649
return NS_OK;
650650
}
651651

652-
NS_IMETHODIMP nsIconChannel::SetContentLength(int32_t aContentLength)
652+
NS_IMETHODIMP nsIconChannel::SetContentLength(int64_t aContentLength)
653653
{
654654
NS_NOTREACHED("nsIconChannel::SetContentLength");
655655
return NS_ERROR_NOT_IMPLEMENTED;

image/decoders/icon/win/nsIconChannel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class nsIconChannel MOZ_FINAL : public nsIChannel, public nsIStreamListener
4141
protected:
4242
nsCOMPtr<nsIURI> mUrl;
4343
nsCOMPtr<nsIURI> mOriginalURI;
44-
int32_t mContentLength;
44+
int64_t mContentLength;
4545
nsCOMPtr<nsILoadGroup> mLoadGroup;
4646
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
4747
nsCOMPtr<nsISupports> mOwner;

modules/libjar/nsJARChannel.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class nsJARInputThunk : public nsIInputStream
8383
NS_IF_ADDREF(*result = mJarReader);
8484
}
8585

86-
int32_t GetContentLength()
86+
int64_t GetContentLength()
8787
{
8888
return mContentLength;
8989
}
@@ -97,7 +97,7 @@ class nsJARInputThunk : public nsIInputStream
9797
nsCString mJarDirSpec;
9898
nsCOMPtr<nsIInputStream> mJarStream;
9999
nsCString mJarEntry;
100-
int32_t mContentLength;
100+
int64_t mContentLength;
101101
};
102102

103103
NS_IMPL_THREADSAFE_ISUPPORTS1(nsJARInputThunk, nsIInputStream)
@@ -136,7 +136,7 @@ nsJARInputThunk::EnsureJarStream()
136136
rv = mJarStream->Available((uint64_t *) &avail);
137137
if (NS_FAILED(rv)) return rv;
138138

139-
mContentLength = avail < INT32_MAX ? (int32_t) avail : -1;
139+
mContentLength = avail < INT64_MAX ? (int64_t) avail : -1;
140140

141141
return NS_OK;
142142
}
@@ -639,7 +639,7 @@ nsJARChannel::GetContentDispositionHeader(nsACString &aContentDispositionHeader)
639639
}
640640

641641
NS_IMETHODIMP
642-
nsJARChannel::GetContentLength(int32_t *result)
642+
nsJARChannel::GetContentLength(int64_t *result)
643643
{
644644
// if content length is unknown, query mJarInput...
645645
if (mContentLength < 0 && mJarInput)
@@ -650,7 +650,7 @@ nsJARChannel::GetContentLength(int32_t *result)
650650
}
651651

652652
NS_IMETHODIMP
653-
nsJARChannel::SetContentLength(int32_t aContentLength)
653+
nsJARChannel::SetContentLength(int64_t aContentLength)
654654
{
655655
// XXX does this really make any sense at all?
656656
mContentLength = aContentLength;

modules/libjar/nsJARChannel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class nsJARChannel : public nsIJARChannel
7171
/* mContentDisposition is uninitialized if mContentDispositionHeader is
7272
* empty */
7373
uint32_t mContentDisposition;
74-
int32_t mContentLength;
74+
int64_t mContentLength;
7575
uint32_t mLoadFlags;
7676
nsresult mStatus;
7777
bool mIsPending;

netwerk/base/public/nsChannelProperties.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@
1818
*/
1919

2020

21-
/**
22-
* Content-Length of a channel. Used instead of the nsIChannel.contentLength
23-
* property.
24-
* Not available before onStartRequest has been called.
25-
* Type: uint64_t
26-
*/
27-
#define NS_CHANNEL_PROP_CONTENT_LENGTH_STR "content-length"
28-
29-
3021
/**
3122
* Exists to allow content policy mechanism to function properly during channel
3223
* redirects. Contains security contextual information about the load.
@@ -35,11 +26,8 @@
3526
#define NS_CHANNEL_PROP_CHANNEL_POLICY_STR "channel-policy"
3627

3728
#ifdef IMPL_NS_NET
38-
#define NS_CHANNEL_PROP_CONTENT_LENGTH gNetStrings->kContentLength
3929
#define NS_CHANNEL_PROP_CHANNEL_POLICY gNetStrings->kChannelPolicy
4030
#else
41-
#define NS_CHANNEL_PROP_CONTENT_LENGTH \
42-
NS_LITERAL_STRING(NS_CHANNEL_PROP_CONTENT_LENGTH_STR)
4331
#define NS_CHANNEL_PROP_CHANNEL_POLICY \
4432
NS_LITERAL_STRING(NS_CHANNEL_PROP_CHANNEL_POLICY_STR)
4533
#endif

0 commit comments

Comments
 (0)