Bug 579517 follow-up: Remove NSPR types that crept in
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 29 Aug 2012 10:56:51 -0400
changeset 105819 130e416aefd2da8e8ae96f9bfec07e3505a46146
parent 105818 3f8f9d41a525c910741f28e9a20fa6e1e8ad76bd
child 105820 88d2dbb78bf5824e87744208a7d9c8fdb415e2e6
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
bugs579517
milestone18.0a1
Bug 579517 follow-up: Remove NSPR types that crept in
content/base/src/nsBlobProtocolHandler.cpp
content/base/src/nsXMLHttpRequest.cpp
docshell/base/nsDSURIContentListener.cpp
dom/icc/src/IccManager.cpp
layout/base/FrameLayerBuilder.cpp
layout/base/FrameLayerBuilder.h
security/manager/ssl/src/SSLServerCertVerification.cpp
--- a/content/base/src/nsBlobProtocolHandler.cpp
+++ b/content/base/src/nsBlobProtocolHandler.cpp
@@ -168,17 +168,17 @@ nsBlobProtocolHandler::NewChannel(nsIURI
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsISupports> owner = do_QueryInterface(info->mPrincipal);
 
   nsAutoString type;
   rv = info->mFile->GetType(type);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  PRUint64 size;
+  uint64_t size;
   rv = info->mFile->GetSize(&size);
   NS_ENSURE_SUCCESS(rv, rv);
 
   channel->SetOwner(owner);
   channel->SetOriginalURI(uri);
   channel->SetContentType(NS_ConvertUTF16toUTF8(type));
   channel->SetContentLength(size);
 
--- a/content/base/src/nsXMLHttpRequest.cpp
+++ b/content/base/src/nsXMLHttpRequest.cpp
@@ -1465,17 +1465,17 @@ nsXMLHttpRequest::GetAllResponseHeaders(
     AppendASCIItoUTF16(value, aResponseHeaders);
     if (NS_SUCCEEDED(mChannel->GetContentCharset(value)) && !value.IsEmpty()) {
       aResponseHeaders.AppendLiteral(";charset=");
       AppendASCIItoUTF16(value, aResponseHeaders);
     }
     aResponseHeaders.AppendLiteral("\r\n");
   }
 
-  PRInt32 length;
+  int32_t length;
   if (NS_SUCCEEDED(mChannel->GetContentLength(&length))) {
     aResponseHeaders.AppendLiteral("Content-Length: ");
     aResponseHeaders.AppendInt(length);
     aResponseHeaders.AppendLiteral("\r\n");
   }
 }
 
 NS_IMETHODIMP
@@ -1526,17 +1526,17 @@ nsXMLHttpRequest::GetResponseHeader(cons
           !value.IsEmpty()) {
         _retval.Append(";charset=");
         _retval.Append(value);
       }
     }
 
     // Content Length:
     else if (header.LowerCaseEqualsASCII("content-length")) {
-      PRInt32 length;
+      int32_t length;
       if (NS_SUCCEEDED(mChannel->GetContentLength(&length))) {
         _retval.AppendInt(length);
       }
     }
 
     return;
   }
 
--- a/docshell/base/nsDSURIContentListener.cpp
+++ b/docshell/base/nsDSURIContentListener.cpp
@@ -255,17 +255,17 @@ nsDSURIContentListener::SetParentContent
         mParentContentListener = nullptr;
     }
     return NS_OK;
 }
 
 bool nsDSURIContentListener::CheckOneFrameOptionsPolicy(nsIRequest *request,
                                                         const nsAString& policy) {
     static const char allowFrom[] = "allow-from ";
-    const PRUint32 allowFromLen = ArrayLength(allowFrom) - 1;
+    const uint32_t allowFromLen = ArrayLength(allowFrom) - 1;
     bool isAllowFrom =
         StringHead(policy, allowFromLen).LowerCaseEqualsLiteral(allowFrom);
 
     // return early if header does not have one of the values with meaning
     if (!policy.LowerCaseEqualsLiteral("deny") &&
         !policy.LowerCaseEqualsLiteral("sameorigin") &&
         !isAllowFrom)
         return true;
--- a/dom/icc/src/IccManager.cpp
+++ b/dom/icc/src/IccManager.cpp
@@ -125,17 +125,17 @@ IccManager::SendStkResponse(const JS::Va
     return NS_ERROR_FAILURE;
   }
 
   mProvider->SendStkResponse(GetOwner(), aResponse);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IccManager::SendStkMenuSelection(PRUint16 aItemIdentifier, bool aHelpRequested)
+IccManager::SendStkMenuSelection(uint16_t aItemIdentifier, bool aHelpRequested)
 {
   if (!mProvider) {
     return NS_ERROR_FAILURE;
   }
 
   mProvider->SendStkMenuSelection(GetOwner(), aItemIdentifier, aHelpRequested);
   return NS_OK;
 }
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -1989,17 +1989,17 @@ FrameLayerBuilder::AddThebesDisplayItem(
                                                      mContainerLayerGeneration));
     cdi->mInactiveLayer = aLayerState != LAYER_NONE;
   }
 }
 
 void
 FrameLayerBuilder::AddLayerDisplayItemForFrame(Layer* aLayer,
                                                nsIFrame* aFrame,
-                                               PRUint32 aDisplayItemKey,
+                                               uint32_t aDisplayItemKey,
                                                LayerState aLayerState)
 {
   DisplayItemDataEntry* entry = mNewDisplayItemData.PutEntry(aFrame);
   if (entry) {
     entry->mContainerLayerGeneration = mContainerLayerGeneration;
     entry->mData.AppendElement(DisplayItemData(aLayer, aDisplayItemKey, aLayerState, mContainerLayerGeneration));
   }
 }
@@ -2008,22 +2008,22 @@ void
 FrameLayerBuilder::AddLayerDisplayItem(Layer* aLayer,
                                        nsDisplayItem* aItem,
                                        LayerState aLayerState)
 {
   if (aLayer->Manager() != mRetainingManager)
     return;
 
   nsIFrame* f = aItem->GetUnderlyingFrame();
-  PRUint32 key = aItem->GetPerFrameKey();
+  uint32_t key = aItem->GetPerFrameKey();
   AddLayerDisplayItemForFrame(aLayer, f, key, aLayerState);
 
   nsAutoTArray<nsIFrame*,4> mergedFrames;
   aItem->GetMergedFrames(&mergedFrames);
-  for (PRUint32 i = 0; i < mergedFrames.Length(); ++i) {
+  for (uint32_t i = 0; i < mergedFrames.Length(); ++i) {
     AddLayerDisplayItemForFrame(aLayer, mergedFrames[i], key, aLayerState);
   }
 }
 
 nsIntPoint
 FrameLayerBuilder::GetLastPaintOffset(ThebesLayer* aLayer)
 {
   ThebesLayerItemsEntry* entry = mThebesLayerItems.PutEntry(aLayer);
--- a/layout/base/FrameLayerBuilder.h
+++ b/layout/base/FrameLayerBuilder.h
@@ -276,17 +276,17 @@ public:
                            nsDisplayItem* aItem,
                            LayerState aLayerState);
 
   /**
    * Record aFrame as a frame that is rendered by an item on aLayer.
    */
   void AddLayerDisplayItemForFrame(Layer* aLayer,
                                    nsIFrame* aFrame,
-                                   PRUint32 aDisplayItemKey,
+                                   uint32_t aDisplayItemKey,
                                    LayerState aLayerState);
 
   /**
    * Record aItem as a display item that is rendered by the ThebesLayer
    * aLayer, with aClipRect, where aContainerLayerFrame is the frame
    * for the container layer this ThebesItem belongs to.
    * aItem must have an underlying frame.
    */
--- a/security/manager/ssl/src/SSLServerCertVerification.cpp
+++ b/security/manager/ssl/src/SSLServerCertVerification.cpp
@@ -181,17 +181,17 @@ void StopSSLServerCertVerificationThread
 }
 
 namespace {
 
 void
 LogInvalidCertError(TransportSecurityInfo *socketInfo, 
                     const nsACString &host, 
                     const nsACString &hostWithPort,
-                    PRInt32 port,
+                    int32_t port,
                     PRErrorCode errorCode,
                     ::mozilla::psm::SSLErrorMessageType errorMessageType,
                     nsIX509Cert* ix509)
 {
   nsString message;
   socketInfo->GetErrorLogMessage(errorCode, errorMessageType, message);
   
   if (!message.IsEmpty()) {