Bug 1374887 - Remove nsIFormAutoComplete::StopControllingInput() from the C++ side; r=MattN
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 20 Jun 2017 22:12:13 -0400
changeset 414153 41d082a79f1f46c87edadfe6849a2ffd6160ea4a
parent 414152 70d1b3958b3e67ab446d1b7746e39719a50f5d9f
child 414154 d568e7c89e9f69f79d8022fd2591c12fff7dc061
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1374887
milestone56.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 1374887 - Remove nsIFormAutoComplete::StopControllingInput() from the C++ side; r=MattN This currently only incurs some XPConnect and exception creation overhead, as the method has no implementation.
toolkit/components/satchel/nsFormFillController.cpp
toolkit/components/satchel/nsIFormAutoComplete.idl
--- a/toolkit/components/satchel/nsFormFillController.cpp
+++ b/toolkit/components/satchel/nsFormFillController.cpp
@@ -1395,21 +1395,16 @@ nsFormFillController::StopControllingInp
     if (input == this) {
       mController->SetInput(nullptr);
     }
   }
 
   if (mFocusedInputNode) {
     MaybeRemoveMutationObserver(mFocusedInputNode);
 
-    auto formAutoComplete = GetFormAutoComplete();
-    if (formAutoComplete) {
-      formAutoComplete->StopControllingInput(mFocusedInput);
-    }
-
     mFocusedInputNode = nullptr;
     mFocusedInput = nullptr;
   }
 
   if (mFocusedPopup) {
     mFocusedPopup->ClosePopup();
   }
   mFocusedPopup = nullptr;
--- a/toolkit/components/satchel/nsIFormAutoComplete.idl
+++ b/toolkit/components/satchel/nsIFormAutoComplete.idl
@@ -21,21 +21,16 @@ interface nsIFormAutoComplete: nsISuppor
                                  in nsIAutoCompleteResult aDatalistResult,
                                  in nsIFormAutoCompleteObserver aListener);
 
     /**
      * If a search is in progress, stop it. Otherwise, do nothing. This is used
      * to cancel an existing search, for example, in preparation for a new search.
      */
     void stopAutoCompleteSearch();
-
-    /**
-     * Since the controller is disconnecting, any related data must be cleared.
-     */
-    void stopControllingInput(in nsIDOMHTMLInputElement aField);
 };
 
 [scriptable, function, uuid(604419ab-55a0-4831-9eca-1b9e67cc4751)]
 interface nsIFormAutoCompleteObserver : nsISupports
 {
   /*
    * Called when a search is complete and the results are ready even if the
    * result set is empty. If the search is cancelled or a new search is