Skip to content

Commit 2cc302e

Browse files
author
Ehsan Akhgari
committed
Bug 646071 - Part 3: Remove nsInt64.h, and convert all uses of nsInt64 and nsUint64 in the tree to PRInt64 and PRUint64, respectively; r=bsmedberg
1 parent b8fdd3a commit 2cc302e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+100
-174
lines changed

content/html/document/src/nsHTMLContentSink.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
#include "nsCRT.h"
6161
#include "prtime.h"
6262
#include "prlog.h"
63-
#include "nsInt64.h"
6463
#include "nsNodeUtils.h"
6564
#include "nsIContent.h"
6665
#include "mozilla/dom/Element.h"

embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
#include "nsIStringEnumerator.h"
6363
#include "nsCRT.h"
6464
#include "nsSupportsArray.h"
65-
#include "nsInt64.h"
6665
#include "nsContentCID.h"
6766
#include "nsStreamUtils.h"
6867

@@ -168,8 +167,8 @@ struct OutputData
168167
nsCOMPtr<nsIURI> mFile;
169168
nsCOMPtr<nsIURI> mOriginalLocation;
170169
nsCOMPtr<nsIOutputStream> mStream;
171-
nsInt64 mSelfProgress;
172-
nsInt64 mSelfProgressMax;
170+
PRInt64 mSelfProgress;
171+
PRInt64 mSelfProgressMax;
173172
PRPackedBool mCalcFileExt;
174173

175174
OutputData(nsIURI *aFile, nsIURI *aOriginalLocation, PRBool aCalcFileExt) :
@@ -192,8 +191,8 @@ struct OutputData
192191
struct UploadData
193192
{
194193
nsCOMPtr<nsIURI> mFile;
195-
nsInt64 mSelfProgress;
196-
nsInt64 mSelfProgressMax;
194+
PRInt64 mSelfProgress;
195+
PRInt64 mSelfProgressMax;
197196

198197
UploadData(nsIURI *aFile) :
199198
mFile(aFile),
@@ -244,6 +243,8 @@ nsWebBrowserPersist::nsWebBrowserPersist() :
244243
mPersistFlags(kDefaultPersistFlags),
245244
mPersistResult(NS_OK),
246245
mWrapColumn(72),
246+
mTotalCurrentProgress(0),
247+
mTotalMaxProgress(0),
247248
mEncodingFlags(0)
248249
{
249250
}

embedding/components/webbrowserpersist/src/nsWebBrowserPersist.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858

5959
#include "nsHashtable.h"
6060
#include "nsTArray.h"
61-
#include "nsInt64.h"
6261

6362
#include "nsCWebBrowserPersist.h"
6463

@@ -240,8 +239,8 @@ class nsWebBrowserPersist : public nsIInterfaceRequestor,
240239
PRPackedBool mSerializingOutput;
241240
PRUint32 mPersistFlags;
242241
PRUint32 mPersistResult;
243-
nsInt64 mTotalCurrentProgress;
244-
nsInt64 mTotalMaxProgress;
242+
PRInt64 mTotalCurrentProgress;
243+
PRInt64 mTotalMaxProgress;
245244
PRInt16 mWrapColumn;
246245
PRUint32 mEncodingFlags;
247246
nsString mContentType;

modules/libjar/nsJARChannel.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include "nsJARProtocolHandler.h"
4343
#include "nsMimeTypes.h"
4444
#include "nsNetUtil.h"
45-
#include "nsInt64.h"
4645
#include "nsEscape.h"
4746
#include "nsIPrefService.h"
4847
#include "nsIPrefBranch.h"

modules/libpr0n/decoders/icon/mac/nsIconChannelCocoa.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
#include "plstr.h"
5757
#include "nsILocalFileMac.h"
5858
#include "nsIFileURL.h"
59-
#include "nsInt64.h"
6059
#include "nsTArray.h"
6160
#include "nsObjCExceptions.h"
6261

@@ -220,7 +219,7 @@
220219
NS_ENSURE_SUCCESS(rv, rv);
221220

222221
// Init our stream pump
223-
rv = mPump->Init(inStream, nsInt64(-1), nsInt64(-1), 0, 0, PR_FALSE);
222+
rv = mPump->Init(inStream, PRInt64(-1), PRInt64(-1), 0, 0, PR_FALSE);
224223
NS_ENSURE_SUCCESS(rv, rv);
225224

226225
rv = mPump->AsyncRead(this, ctxt);

modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
#include "nsReadableUtils.h"
4848
#include "nsMemory.h"
4949
#include "nsNetUtil.h"
50-
#include "nsInt64.h"
5150
#include "nsILocalFile.h"
5251
#include "nsIFileURL.h"
5352
#include "nsDirectoryServiceDefs.h"
@@ -203,7 +202,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports
203202
return rv;
204203

205204
// Init our streampump
206-
rv = mPump->Init(inStream, nsInt64(-1), nsInt64(-1), 0, 0, PR_FALSE);
205+
rv = mPump->Init(inStream, PRInt64(-1), PRInt64(-1), 0, 0, PR_FALSE);
207206
if (NS_FAILED(rv))
208207
return rv;
209208

modules/libpr0n/decoders/icon/win/nsIconChannel.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
#include "nsIStringStream.h"
5454
#include "nsIURL.h"
5555
#include "nsNetUtil.h"
56-
#include "nsInt64.h"
5756
#include "nsIFile.h"
5857
#include "nsIFileURL.h"
5958
#include "nsIMIMEService.h"
@@ -249,7 +248,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports
249248
return rv;
250249

251250
// Init our streampump
252-
rv = mPump->Init(inStream, nsInt64(-1), nsInt64(-1), 0, 0, PR_FALSE);
251+
rv = mPump->Init(inStream, PRInt64(-1), PRInt64(-1), 0, 0, PR_FALSE);
253252
if (NS_FAILED(rv))
254253
return rv;
255254

modules/plugin/base/src/nsPluginHost.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
#include "nsAppDirectoryServiceDefs.h"
134134
#include "nsIFile.h"
135135
#include "nsPluginDirServiceProvider.h"
136-
#include "nsInt64.h"
137136
#include "nsPluginError.h"
138137

139138
#include "nsUnicharUtils.h"
@@ -2890,7 +2889,7 @@ nsPluginHost::ReadPluginInfo()
28902889
if (NS_FAILED(rv))
28912890
return rv;
28922891

2893-
PRInt32 flen = nsInt64(fileSize);
2892+
PRInt32 flen = PRInt64(fileSize);
28942893
if (flen == 0) {
28952894
NS_WARNING("Plugins Registry Empty!");
28962895
return NS_OK; // ERROR CONDITION

modules/plugin/base/src/nsPluginStreamListenerPeer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnDataAvailable(nsIRequest *request,
969969
brr->GetStartRange(&absoluteOffset64);
970970

971971
// XXX handle 64-bit for real
972-
PRInt32 absoluteOffset = (PRInt32)nsInt64(absoluteOffset64);
972+
PRInt32 absoluteOffset = (PRInt32)PRInt64(absoluteOffset64);
973973

974974
// we need to track how much data we have forwarded to the
975975
// plugin.
@@ -1049,7 +1049,7 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIRequest *request,
10491049
PRInt64 absoluteOffset64 = LL_ZERO;
10501050
brr->GetStartRange(&absoluteOffset64);
10511051
// XXX support 64-bit offsets
1052-
PRInt32 absoluteOffset = (PRInt32)nsInt64(absoluteOffset64);
1052+
PRInt32 absoluteOffset = (PRInt32)PRInt64(absoluteOffset64);
10531053

10541054
nsPRUintKey key(absoluteOffset);
10551055

netwerk/base/public/nsNetUtil.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
#include "nsIPersistentProperties2.h"
9191
#include "nsISyncStreamListener.h"
9292
#include "nsInterfaceRequestorAgg.h"
93-
#include "nsInt64.h"
9493
#include "nsINetUtil.h"
9594
#include "nsIURIWithPrincipal.h"
9695
#include "nsIAuthPrompt.h"
@@ -490,8 +489,8 @@ NS_NewInputStreamChannel(nsIChannel **result,
490489
inline nsresult
491490
NS_NewInputStreamPump(nsIInputStreamPump **result,
492491
nsIInputStream *stream,
493-
PRInt64 streamPos = nsInt64(-1),
494-
PRInt64 streamLen = nsInt64(-1),
492+
PRInt64 streamPos = PRInt64(-1),
493+
PRInt64 streamLen = PRInt64(-1),
495494
PRUint32 segsize = 0,
496495
PRUint32 segcount = 0,
497496
PRBool closeWhenDone = PR_FALSE)
@@ -1040,7 +1039,7 @@ NS_BackgroundInputStream(nsIInputStream **result,
10401039
do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
10411040
if (NS_SUCCEEDED(rv)) {
10421041
nsCOMPtr<nsITransport> inTransport;
1043-
rv = sts->CreateInputTransport(stream, nsInt64(-1), nsInt64(-1),
1042+
rv = sts->CreateInputTransport(stream, PRInt64(-1), PRInt64(-1),
10441043
PR_TRUE, getter_AddRefs(inTransport));
10451044
if (NS_SUCCEEDED(rv))
10461045
rv = inTransport->OpenInputStream(nsITransport::OPEN_BLOCKING,
@@ -1064,7 +1063,7 @@ NS_BackgroundOutputStream(nsIOutputStream **result,
10641063
do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
10651064
if (NS_SUCCEEDED(rv)) {
10661065
nsCOMPtr<nsITransport> inTransport;
1067-
rv = sts->CreateOutputTransport(stream, nsInt64(-1), nsInt64(-1),
1066+
rv = sts->CreateOutputTransport(stream, PRInt64(-1), PRInt64(-1),
10681067
PR_TRUE, getter_AddRefs(inTransport));
10691068
if (NS_SUCCEEDED(rv))
10701069
rv = inTransport->OpenOutputStream(nsITransport::OPEN_BLOCKING,

0 commit comments

Comments
 (0)