Bug 1425625 - Fix getting reputation service with wrong interface name. r=francois
authorDimiL <dlee@mozilla.com>
Tue, 19 Dec 2017 09:46:28 +0800
changeset 448655 366c25784d0a11f66d30ec90114636b46b30ff8f
parent 448654 8e682e487ef12970f63169ac97045221ee1be2c9
child 448656 d95e61ced980eaa233c4c3c9f2ebd1018af53897
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrancois
bugs1425625
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1425625 - Fix getting reputation service with wrong interface name. r=francois Fix get service with wrong interface name and a double init issue. MozReview-Commit-ID: BA0wex06eWb
browser/components/nsBrowserGlue.js
toolkit/components/satchel/nsFormFillController.cpp
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1112,17 +1112,17 @@ BrowserGlue.prototype = {
 
     // It's important that SafeBrowsing is initialized reasonably
     // early, so we use a maximum timeout for it.
     Services.tm.idleDispatchToMainThread(() => {
       SafeBrowsing.init();
 
       // Login reputation depends on the Safe Browsing API.
       let reputationService = Cc["@mozilla.org/reputationservice/login-reputation-service;1"]
-        .getService(Ci.ILoginReputationService);
+        .getService(Ci.nsILoginReputationService);
       reputationService.init();
     }, 5000);
 
     if (AppConstants.MOZ_CRASHREPORTER) {
       UnsubmittedCrashHandler.scheduleCheckForUnsubmittedCrashReports();
     }
 
     if (AppConstants.platform == "win") {
--- a/toolkit/components/satchel/nsFormFillController.cpp
+++ b/toolkit/components/satchel/nsFormFillController.cpp
@@ -902,18 +902,16 @@ nsresult
 nsFormFillController::StartQueryLoginReputation(nsIDOMHTMLInputElement *aInput)
 {
   if (!mLoginReputationService) {
     mLoginReputationService =
       do_GetService(NS_LOGIN_REPUTATION_SERVICE_CONTRACTID);
     if (NS_WARN_IF(!mLoginReputationService)) {
       return NS_ERROR_FAILURE;
     }
-
-    mLoginReputationService->Init();
   }
 
   mLoginReputationService->QueryReputationAsync(aInput, nullptr);
 
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////