Bug 1393439 - P2: Correct the variable naming. r?bkelly draft
authorTom Tung <shes050117@gmail.com>
Tue, 29 Aug 2017 16:00:35 +0800
changeset 654862 62b2a5b6b1b599f848896cefe6ed0972c4804ebb
parent 654861 9b64a5e5cbbce000aa77a6ad684b4fac8181e6ee
child 654863 6a71b48f72e53504ede46b9a3b6383ba3b9a7fef
push id76712
push userttung@mozilla.com
push dateTue, 29 Aug 2017 10:49:06 +0000
reviewersbkelly
bugs1393439
milestone57.0a1
Bug 1393439 - P2: Correct the variable naming. r?bkelly MozReview-Commit-ID: 1DblOV82nEd
dom/fetch/FetchDriver.cpp
--- a/dom/fetch/FetchDriver.cpp
+++ b/dom/fetch/FetchDriver.cpp
@@ -607,31 +607,31 @@ FetchDriver::OnStartRequest(nsIRequest* 
   mRequest->MaybeIncreaseResponseTainting(loadInfo->GetTainting());
 
   // Resolves fetch() promise which may trigger code running in a worker.  Make
   // sure the Response is fully initialized before calling this.
   mResponse = BeginAndGetFilteredResponse(response, foundOpaqueRedirect);
 
   // From "Main Fetch" step 19: SRI-part1.
   if (ShouldCheckSRI(mRequest, mResponse) && mSRIMetadata.IsEmpty()) {
-    nsIConsoleReportCollector* aReporter = nullptr;
+    nsIConsoleReportCollector* reporter = nullptr;
     if (mObserver) {
-      aReporter = mObserver->GetReporter();
+      reporter = mObserver->GetReporter();
     }
 
     nsAutoCString sourceUri;
     if (mDocument && mDocument->GetDocumentURI()) {
       mDocument->GetDocumentURI()->GetAsciiSpec(sourceUri);
     } else if (!mWorkerScript.IsEmpty()) {
       sourceUri.Assign(mWorkerScript);
     }
     SRICheck::IntegrityMetadata(mRequest->GetIntegrity(), sourceUri,
-                                aReporter, &mSRIMetadata);
+                                reporter, &mSRIMetadata);
     mSRIDataVerifier = new SRICheckDataVerifier(mSRIMetadata, sourceUri,
-                                                aReporter);
+                                                reporter);
 
     // Do not retarget off main thread when using SRI API.
     return NS_OK;
   }
 
   nsCOMPtr<nsIEventTarget> sts = do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     FailWithNetworkError();
@@ -788,29 +788,29 @@ FetchDriver::OnStopRequest(nsIRequest* a
     MOZ_ASSERT(!mResponse->IsError());
 
     // From "Main Fetch" step 19: SRI-part3.
     if (ShouldCheckSRI(mRequest, mResponse)) {
       MOZ_ASSERT(mSRIDataVerifier);
 
       nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
 
-      nsIConsoleReportCollector* aReporter = nullptr;
+      nsIConsoleReportCollector* reporter = nullptr;
       if (mObserver) {
-        aReporter = mObserver->GetReporter();
+        reporter = mObserver->GetReporter();
       }
 
       nsAutoCString sourceUri;
       if (mDocument && mDocument->GetDocumentURI()) {
         mDocument->GetDocumentURI()->GetAsciiSpec(sourceUri);
       } else if (!mWorkerScript.IsEmpty()) {
         sourceUri.Assign(mWorkerScript);
       }
       nsresult rv = mSRIDataVerifier->Verify(mSRIMetadata, channel, sourceUri,
-                                             aReporter);
+                                             reporter);
       if (NS_FAILED(rv)) {
         FailWithNetworkError();
         // Cancel request.
         return rv;
       }
     }
 
     if (mPipeOutputStream) {