Bug 1678611: Remove onTitleChanged interface from nsINavHistoryService. r=mak,mixedpuppy
authorDaisuke Akatsuka <daisuke@birchill.co.jp>
Fri, 18 Dec 2020 07:25:49 +0000
changeset 561241 6498a49aab4594d7a86ce80d48987a2cf3b49e3d
parent 561240 94216739323722bd900c8969f7e03958adebddf7
child 561242 01e15bba25d459b671f963e68bfd1ea7da9c5078
push id38044
push userapavel@mozilla.com
push dateFri, 18 Dec 2020 21:38:02 +0000
treeherdermozilla-central@507ca4e67289 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, mixedpuppy
bugs1678611
milestone86.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 1678611: Remove onTitleChanged interface from nsINavHistoryService. r=mak,mixedpuppy Depends on D98280 Differential Revision: https://phabricator.services.mozilla.com/D98281
browser/components/extensions/parent/ext-history.js
browser/components/newtab/lib/PlacesFeed.jsm
browser/components/newtab/test/unit/lib/PlacesFeed.test.js
browser/modules/WindowsJumpLists.jsm
services/sync/modules/engines/history.js
services/sync/tests/unit/head_helpers.js
toolkit/components/downloads/DownloadHistory.jsm
toolkit/components/downloads/DownloadIntegration.jsm
toolkit/components/places/History.cpp
toolkit/components/places/PlacesExpiration.jsm
toolkit/components/places/nsINavHistoryService.idl
toolkit/components/places/nsNavHistory.cpp
toolkit/components/places/nsNavHistory.h
toolkit/components/places/nsNavHistoryResult.cpp
toolkit/components/places/nsNavHistoryResult.h
toolkit/components/places/tests/browser/head.js
toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js
toolkit/components/places/tests/head_common.js
toolkit/components/places/tests/history/test_remove.js
toolkit/components/places/tests/history/test_removeByFilter.js
toolkit/components/places/tests/history/test_removeMany.js
toolkit/components/places/tests/history/test_removeVisitsByFilter.js
toolkit/components/places/tests/unit/test_history_observer.js
toolkit/components/thumbnails/PageThumbs.jsm
--- a/browser/components/extensions/parent/ext-history.js
+++ b/browser/components/extensions/parent/ext-history.js
@@ -99,19 +99,16 @@ var _observer;
 const getHistoryObserver = () => {
   if (!_observer) {
     _observer = new (class extends EventEmitter {
       onDeleteURI(uri, guid, reason) {
         this.emit("visitRemoved", { allHistory: false, urls: [uri.spec] });
       }
       onBeginUpdateBatch() {}
       onEndUpdateBatch() {}
-      onTitleChanged(uri, title) {
-        this.emit("titleChanged", { url: uri.spec, title: title });
-      }
       onClearHistory() {
         this.emit("visitRemoved", { allHistory: true, urls: [] });
       }
       onFrecencyChanged() {}
       onManyFrecenciesChanged() {}
       onDeleteVisits(uri, partialRemoval, guid, reason) {
         if (!partialRemoval) {
           this.emit("visitRemoved", { allHistory: false, urls: [uri.spec] });
--- a/browser/components/newtab/lib/PlacesFeed.jsm
+++ b/browser/components/newtab/lib/PlacesFeed.jsm
@@ -75,18 +75,16 @@ class HistoryObserver extends Observer {
     this.dispatch({ type: at.PLACES_HISTORY_CLEARED });
   }
 
   // Empty functions to make xpconnect happy
   onBeginUpdateBatch() {}
 
   onEndUpdateBatch() {}
 
-  onTitleChanged() {}
-
   onFrecencyChanged() {}
 
   onManyFrecenciesChanged() {}
 
   onDeleteVisits() {}
 }
 
 /**
--- a/browser/components/newtab/test/unit/lib/PlacesFeed.test.js
+++ b/browser/components/newtab/test/unit/lib/PlacesFeed.test.js
@@ -748,17 +748,16 @@ describe("PlacesFeed", () => {
         observer.onClearHistory();
         assert.calledWith(dispatch, { type: at.PLACES_HISTORY_CLEARED });
       });
     });
     describe("Other empty methods (to keep code coverage happy)", () => {
       it("should have a various empty functions for xpconnect happiness", () => {
         observer.onBeginUpdateBatch();
         observer.onEndUpdateBatch();
-        observer.onTitleChanged();
         observer.onFrecencyChanged();
         observer.onManyFrecenciesChanged();
         observer.onDeleteVisits();
       });
     });
   });
 
   describe("Custom dispatch", () => {
--- a/browser/modules/WindowsJumpLists.jsm
+++ b/browser/modules/WindowsJumpLists.jsm
@@ -73,17 +73,16 @@ ChromeUtils.defineModuleGetter(
 XPCOMUtils.defineLazyGetter(this, "gHistoryObserver", function() {
   return Object.freeze({
     onClearHistory() {
       WinTaskbarJumpList.update();
     },
     onBeginUpdateBatch() {},
     onEndUpdateBatch() {},
     onVisits() {},
-    onTitleChanged() {},
     onFrecencyChanged() {},
     onManyFrecenciesChanged() {},
     onDeleteURI() {},
     onDeleteVisits() {},
     QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
   });
 });
 
--- a/services/sync/modules/engines/history.js
+++ b/services/sync/modules/engines/history.js
@@ -605,11 +605,10 @@ HistoryTracker.prototype = {
     // Note that we're going to trigger a sync, but none of the cleared
     // pages are tracked, so the deletions will not be propagated.
     // See Bug 578694.
     this.score += SCORE_INCREMENT_XLARGE;
   },
 
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
-  onTitleChanged() {},
   onBeforeDeleteURI() {},
 };
--- a/services/sync/tests/unit/head_helpers.js
+++ b/services/sync/tests/unit/head_helpers.js
@@ -628,17 +628,16 @@ async function promiseVisit(expectedType
     let observer = {
       handlePlacesEvents(events) {
         Assert.equal(events.length, 1);
         Assert.equal(events[0].type, "page-visited");
         done("added", events[0].url);
       },
       onBeginUpdateBatch() {},
       onEndUpdateBatch() {},
-      onTitleChanged() {},
       onFrecencyChanged() {},
       onManyFrecenciesChanged() {},
       onDeleteURI(uri) {
         done("removed", uri.spec);
       },
       onClearHistory() {},
       onDeleteVisits() {},
     };
--- a/toolkit/components/downloads/DownloadHistory.jsm
+++ b/toolkit/components/downloads/DownloadHistory.jsm
@@ -327,17 +327,16 @@ var DownloadCache = {
   onDeleteURI(uri) {
     this._data.delete(uri.spec);
   },
   onClearHistory() {
     this._data.clear();
   },
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
-  onTitleChanged() {},
   onFrecencyChanged() {},
   onManyFrecenciesChanged() {},
   onDeleteVisits() {},
 };
 
 /**
  * Represents a download from the browser history. This object implements part
  * of the interface of the Download object.
--- a/toolkit/components/downloads/DownloadIntegration.jsm
+++ b/toolkit/components/downloads/DownloadIntegration.jsm
@@ -1262,17 +1262,16 @@ DownloadHistoryObserver.prototype = {
     );
   },
 
   // nsINavHistoryObserver
   onClearHistory: function DL_onClearHistory() {
     this._list.removeFinished();
   },
 
-  onTitleChanged() {},
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
   onDeleteVisits() {},
 };
 
 /**
  * This view can be added to a DownloadList object to trigger a save operation
  * in the given DownloadStore object when a relevant change occurs.  You should
--- a/toolkit/components/places/History.cpp
+++ b/toolkit/components/places/History.cpp
@@ -467,20 +467,16 @@ class NotifyManyVisitsObservers : public
       NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Could not notify observers");
     }
 
     if (aNow - aPlace.visitTime < RECENTLY_VISITED_URIS_MAX_AGE) {
       mHistory->AppendToRecentlyVisitedURIs(aURI, aPlace.hidden);
     }
     mHistory->NotifyVisited(aURI, IHistory::VisitedStatus::Visited);
 
-    if (aPlace.titleChanged) {
-      aNavHistory->NotifyTitleChange(aURI, aPlace.title, aPlace.guid);
-    }
-
     aNavHistory->UpdateDaysOfHistory(aPlace.visitTime);
 
     return NS_OK;
   }
 
   void AddPlaceForNotify(const VisitData& aPlace,
                          Sequence<OwningNonNull<PlacesEvent>>& aEvents) {
     if (aPlace.transitionType == nsINavHistoryService::TRANSITION_EMBED) {
@@ -581,26 +577,16 @@ class NotifyTitleObservers : public Runn
         mGUID(aGUID) {}
 
   // MOZ_CAN_RUN_SCRIPT_BOUNDARY until Runnable::Run is marked
   // MOZ_CAN_RUN_SCRIPT.  See bug 1535398.
   MOZ_CAN_RUN_SCRIPT_BOUNDARY
   NS_IMETHOD Run() override {
     MOZ_ASSERT(NS_IsMainThread(), "This should be called on the main thread");
 
-    nsNavHistory* navHistory = nsNavHistory::GetHistoryService();
-    NS_ENSURE_TRUE(navHistory, NS_ERROR_OUT_OF_MEMORY);
-    nsCOMPtr<nsIURI> uri;
-    MOZ_ALWAYS_SUCCEEDS(NS_NewURI(getter_AddRefs(uri), mSpec));
-    if (!uri) {
-      return NS_ERROR_UNEXPECTED;
-    }
-
-    navHistory->NotifyTitleChange(uri, mTitle, mGUID);
-
     RefPtr<PlacesVisitTitle> titleEvent = new PlacesVisitTitle();
     titleEvent->mUrl.Assign(NS_ConvertUTF8toUTF16(mSpec));
     titleEvent->mPageGuid.Assign(mGUID);
     titleEvent->mTitle.Assign(mTitle);
 
     Sequence<OwningNonNull<PlacesEvent>> events;
     bool success = !!events.AppendElement(titleEvent.forget(), fallible);
     MOZ_RELEASE_ASSERT(success);
--- a/toolkit/components/places/PlacesExpiration.jsm
+++ b/toolkit/components/places/PlacesExpiration.jsm
@@ -583,17 +583,16 @@ nsPlacesExpiration.prototype = {
     }
   },
 
   onClearHistory: function PEX_onClearHistory() {
     // History status is clean after a clear history.
     this.status = STATUS.CLEAN;
   },
 
-  onTitleChanged() {},
   onDeleteURI() {},
   onDeleteVisits() {},
 
   // nsITimerCallback
 
   notify() {
     // Run at the first idle, or after 5 minutes, whatever comes first.
     Services.tm.idleDispatchToMainThread(async () => {
--- a/toolkit/components/places/nsINavHistoryService.idl
+++ b/toolkit/components/places/nsINavHistoryService.idl
@@ -575,40 +575,16 @@ interface nsINavHistoryObserver : nsISup
 
   /**
    * Notifies you that we are done doing a bunch of things and you should go
    * ahead and update UI, etc.
    */
   void onEndUpdateBatch();
 
   /**
-   * Called whenever either the "real" title or the custom title of the page
-   * changed. BOTH TITLES ARE ALWAYS INCLUDED in this notification, even though
-   * only one will change at a time. Often, consumers will want to display the
-   * user title if it is available, and fall back to the page title (the one
-   * specified in the <title> tag of the page).
-   *
-   * Note that there is a difference between an empty title and a NULL title.
-   * An empty string means that somebody specifically set the title to be
-   * nothing. NULL means nobody set it. From C++: use IsVoid() and SetIsVoid()
-   * to see whether an empty string is "null" or not (it will always be an
-   * empty string in either case).
-   *
-   * @param aURI
-   *        The URI of the page.
-   * @param aPageTitle
-   *        The new title of the page.
-   * @param aGUID
-   *        The unique ID associated with the page.
-   */
-  void onTitleChanged(in nsIURI aURI,
-                      in AString aPageTitle,
-                      in ACString aGUID);
-
-  /**
    * Called when an individual page's frecency has changed.
    *
    * This is not called for pages whose frecencies change as the result of some
    * large operation where some large or unknown number of frecencies change at
    * once.  Use onManyFrecenciesChanged to detect such changes.
    *
    * @param aURI
    *        The page's URI.
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -596,21 +596,16 @@ void nsNavHistory::UpdateDaysOfHistory(P
     mDaysOfHistory = 1;
   }
 
   if (visitTime > mLastCachedEndOfDay || visitTime < mLastCachedStartOfDay) {
     mDaysOfHistory = -1;
   }
 }
 
-void nsNavHistory::NotifyTitleChange(nsIURI* aURI, const nsString& aTitle,
-                                     const nsACString& aGUID) {
-  MOZ_ASSERT(!aGUID.IsEmpty());
-}
-
 void nsNavHistory::NotifyFrecencyChanged(const nsACString& aSpec,
                                          int32_t aNewFrecency,
                                          const nsACString& aGUID, bool aHidden,
                                          PRTime aLastVisitDate) {
   MOZ_ASSERT(!aGUID.IsEmpty());
 
   nsCOMPtr<nsIURI> uri;
   Unused << NS_NewURI(getter_AddRefs(uri), aSpec);
--- a/toolkit/components/places/nsNavHistory.h
+++ b/toolkit/components/places/nsNavHistory.h
@@ -341,22 +341,16 @@ class nsNavHistory final : public nsSupp
 
   /**
    * Updates and invalidates the mDaysOfHistory cache. Should be
    * called whenever a visit is added.
    */
   void UpdateDaysOfHistory(PRTime visitTime);
 
   /**
-   * Fires onTitleChanged event to nsINavHistoryService observers
-   */
-  void NotifyTitleChange(nsIURI* aURI, const nsString& title,
-                         const nsACString& aGUID);
-
-  /**
    * Fires onFrecencyChanged event to nsINavHistoryService observers
    */
   void NotifyFrecencyChanged(const nsACString& aSpec, int32_t aNewFrecency,
                              const nsACString& aGUID, bool aHidden,
                              PRTime aLastVisitDate);
 
   /**
    * Fires onManyFrecenciesChanged event to nsINavHistoryService observers
--- a/toolkit/components/places/nsNavHistoryResult.cpp
+++ b/toolkit/components/places/nsNavHistoryResult.cpp
@@ -2181,20 +2181,18 @@ nsresult nsNavHistoryQueryResultNode::On
  * Find every node that matches this URI and rename it.  We try to do
  * incremental updates here, even when we are closed, because changing titles
  * is easier than requerying if we are invalid.
  *
  * This actually gets called a lot.  Typically, we will get an AddURI message
  * when the user visits the page, and then the title will be set asynchronously
  * when the title element of the page is parsed.
  */
-NS_IMETHODIMP
-nsNavHistoryQueryResultNode::OnTitleChanged(nsIURI* aURI,
-                                            const nsAString& aPageTitle,
-                                            const nsACString& aGUID) {
+nsresult nsNavHistoryQueryResultNode::OnTitleChanged(
+    nsIURI* aURI, const nsAString& aPageTitle, const nsACString& aGUID) {
   if (!mExpanded) {
     // When we are not expanded, we don't update, just invalidate and unhook.
     // It would still be pretty easy to traverse the results and update the
     // titles, but when a title changes, its unlikely that it will be the only
     // thing.  Therefore, we just give up.
     ClearChildren(true);
     return NS_OK;  // no updates in tree state
   }
@@ -4215,25 +4213,16 @@ void nsNavHistoryResult::HandlePlacesEve
         MOZ_ASSERT_UNREACHABLE(
             "Receive notification of a type not subscribed to.");
       }
     }
   }
 }
 
 NS_IMETHODIMP
-nsNavHistoryResult::OnTitleChanged(nsIURI* aURI, const nsAString& aPageTitle,
-                                   const nsACString& aGUID) {
-  NS_ENSURE_ARG(aURI);
-
-  ENUMERATE_HISTORY_OBSERVERS(OnTitleChanged(aURI, aPageTitle, aGUID));
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsNavHistoryResult::OnFrecencyChanged(nsIURI* aURI, int32_t aNewFrecency,
                                       const nsACString& aGUID, bool aHidden,
                                       PRTime aLastVisitDate) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNavHistoryResult::OnManyFrecenciesChanged() { return NS_OK; }
--- a/toolkit/components/places/nsNavHistoryResult.h
+++ b/toolkit/components/places/nsNavHistoryResult.h
@@ -59,18 +59,16 @@ class nsTrimInt64HashKey : public PLDHas
  private:
   const int64_t mValue;
 };
 
 // Declare methods for implementing nsINavBookmarkObserver
 // and nsINavHistoryObserver (some methods, such as BeginUpdateBatch overlap)
 #define NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE(...)                    \
   NS_DECL_NSINAVBOOKMARKOBSERVER                                       \
-  NS_IMETHOD OnTitleChanged(nsIURI* aURI, const nsAString& aPageTitle, \
-                            const nsACString& aGUID) __VA_ARGS__;      \
   NS_IMETHOD OnFrecencyChanged(nsIURI* aURI, int32_t aNewFrecency,     \
                                const nsACString& aGUID, bool aHidden,  \
                                PRTime aLastVisitDate) __VA_ARGS__;     \
   NS_IMETHOD OnManyFrecenciesChanged() __VA_ARGS__;                    \
   NS_IMETHOD OnDeleteURI(nsIURI* aURI, const nsACString& aGUID,        \
                          uint16_t aReason) __VA_ARGS__;                \
   NS_IMETHOD OnClearHistory() __VA_ARGS__;                             \
   NS_IMETHOD OnDeleteVisits(nsIURI* aURI, bool aPartialRemoval,        \
@@ -705,16 +703,18 @@ class nsNavHistoryQueryResultNode final
                          const nsACString& aGUID, const nsACString& aParentGUID,
                          uint16_t aSource);
 
   // The internal version has an output aAdded parameter, it is incremented by
   // query nodes when the visited uri belongs to them. If no such query exists,
   // the history result creates a new query node dynamically.
   nsresult OnVisit(nsIURI* aURI, int64_t aVisitId, PRTime aTime,
                    uint32_t aTransitionType, bool aHidden, uint32_t* aAdded);
+  nsresult OnTitleChanged(nsIURI* aURI, const nsAString& aPageTitle,
+                          const nsACString& aGUID);
   virtual void OnRemoving() override;
 
  public:
   RefPtr<nsNavHistoryQuery> mQuery;
   uint32_t mLiveUpdate;  // one of QUERYUPDATE_* in nsNavHistory.h
   bool mHasSearchTerms;
 
   // safe options getter, ensures query is parsed
--- a/toolkit/components/places/tests/browser/head.js
+++ b/toolkit/components/places/tests/browser/head.js
@@ -84,17 +84,16 @@ function promiseFieldForUrl(aURI, aField
  * Generic nsINavHistoryObserver that doesn't implement anything, but provides
  * dummy methods to prevent errors about an object not having a certain method.
  */
 function NavHistoryObserver() {}
 
 NavHistoryObserver.prototype = {
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
-  onTitleChanged() {},
   onDeleteURI() {},
   onClearHistory() {},
   onDeleteVisits() {},
   QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
 };
 
 function whenNewWindowLoaded(aOptions, aCallback) {
   BrowserTestUtils.waitForNewWindow().then(aCallback);
--- a/toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
+++ b/toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
@@ -75,17 +75,16 @@ add_task(async function test_notificatio
       currentTest.bookmarks.push(page);
     }
 
     // Observe history.
     let historyObserver = {
       onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {},
       onEndUpdateBatch: function PEX_onEndUpdateBatch() {},
       onClearHistory() {},
-      onTitleChanged() {},
       onDeleteURI(aURI, aGUID, aReason) {
         currentTest.receivedNotifications++;
         // Check this uri was not bookmarked.
         Assert.equal(currentTest.bookmarks.indexOf(aURI.spec), -1);
         do_check_valid_places_guid(aGUID);
         Assert.equal(aReason, Ci.nsINavHistoryObserver.REASON_EXPIRED);
       },
       onDeleteVisits() {},
--- a/toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js
+++ b/toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js
@@ -110,17 +110,16 @@ add_task(async function test_notificatio
       currentTest.bookmarks.push(page);
     }
 
     // Observe history.
     let historyObserver = {
       onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {},
       onEndUpdateBatch: function PEX_onEndUpdateBatch() {},
       onClearHistory() {},
-      onTitleChanged() {},
       onDeleteURI(aURI, aGUID, aReason) {
         // Check this uri was not bookmarked.
         Assert.equal(currentTest.bookmarks.indexOf(aURI.spec), -1);
         do_check_valid_places_guid(aGUID);
         Assert.equal(aReason, Ci.nsINavHistoryObserver.REASON_EXPIRED);
       },
       onDeleteVisits(aURI, aPartialRemoval, aGUID, aReason) {
         currentTest.receivedNotifications++;
--- a/toolkit/components/places/tests/head_common.js
+++ b/toolkit/components/places/tests/head_common.js
@@ -732,17 +732,16 @@ NavBookmarkObserver.prototype = {
  * Generic nsINavHistoryObserver that doesn't implement anything, but provides
  * dummy methods to prevent errors about an object not having a certain method.
  */
 function NavHistoryObserver() {}
 
 NavHistoryObserver.prototype = {
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
-  onTitleChanged() {},
   onDeleteURI() {},
   onClearHistory() {},
   onDeleteVisits() {},
   QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
 };
 
 /**
  * Generic nsINavHistoryResultObserver that doesn't implement anything, but
--- a/toolkit/components/places/tests/history/test_remove.js
+++ b/toolkit/components/places/tests/history/test_remove.js
@@ -40,19 +40,16 @@ add_task(async function test_remove_sing
 
     let shouldRemove = !options.addBookmark;
     let observer;
     let placesEventListener;
     let promiseObserved = new Promise((resolve, reject) => {
       observer = {
         onBeginUpdateBatch() {},
         onEndUpdateBatch() {},
-        onTitleChanged(aUri) {
-          reject(new Error("Unexpected call to onTitleChanged " + aUri.spec));
-        },
         onClearHistory() {
           reject("Unexpected call to onClearHistory");
         },
         onFrecencyChanged(aURI) {
           try {
             Assert.ok(!shouldRemove, "Observing onFrecencyChanged");
             Assert.equal(
               aURI.spec,
--- a/toolkit/components/places/tests/history/test_removeByFilter.js
+++ b/toolkit/components/places/tests/history/test_removeByFilter.js
@@ -456,19 +456,16 @@ function getObserverPromise(bookmarkedUr
     return { observer: null, promiseObserved: Promise.resolve() };
   }
   let observer;
   let placesEventListener;
   let promiseObserved = new Promise((resolve, reject) => {
     observer = {
       onBeginUpdateBatch() {},
       onEndUpdateBatch() {},
-      onTitleChanged(aUri) {
-        reject(new Error("Unexpected call to onTitleChanged"));
-      },
       onClearHistory() {
         reject(new Error("Unexpected call to onClearHistory"));
       },
       onFrecencyChanged(aURI) {},
       onManyFrecenciesChanged() {},
       onDeleteURI(aURI) {
         try {
           Assert.notEqual(
--- a/toolkit/components/places/tests/history/test_removeMany.js
+++ b/toolkit/components/places/tests/history/test_removeMany.js
@@ -79,19 +79,16 @@ add_task(async function test_remove_many
   }
 
   let observer = {
     onBeginUpdateBatch() {},
     onEndUpdateBatch() {},
     onVisits(aVisits) {
       Assert.ok(false, "Unexpected call to onVisits " + aVisits.length);
     },
-    onTitleChanged(aURI) {
-      Assert.ok(false, "Unexpected call to onTitleChanged " + aURI.spec);
-    },
     onClearHistory() {
       Assert.ok(false, "Unexpected call to onClearHistory");
     },
     onFrecencyChanged(aURI) {
       let origin = pages.find(x => x.uri.spec == aURI.spec);
       Assert.ok(origin);
       Assert.ok(
         origin.hasBookmark,
--- a/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
+++ b/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
@@ -143,21 +143,16 @@ add_task(async function test_removeVisit
         uriDeletePromises.set(removedItems[i].uri.spec, PromiseUtils.defer());
       }
     }
 
     let observer = {
       deferred: PromiseUtils.defer(),
       onBeginUpdateBatch() {},
       onEndUpdateBatch() {},
-      onTitleChanged(uri) {
-        this.deferred.reject(
-          new Error("Unexpected call to onTitleChanged " + uri.spec)
-        );
-      },
       onClearHistory() {
         this.deferred.reject("Unexpected call to onClearHistory");
       },
       onFrecencyChanged(aURI) {
         info("onFrecencyChanged " + aURI.spec);
         let deferred = frecencyChangePromises.get(aURI.spec);
         Assert.ok(!!deferred, "Observing onFrecencyChanged");
         deferred.resolve();
--- a/toolkit/components/places/tests/unit/test_history_observer.js
+++ b/toolkit/components/places/tests/unit/test_history_observer.js
@@ -4,17 +4,16 @@
 /**
  * Generic nsINavHistoryObserver that doesn't implement anything, but provides
  * dummy methods to prevent errors about an object not having a certain method.
  */
 function NavHistoryObserver() {}
 NavHistoryObserver.prototype = {
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
-  onTitleChanged() {},
   onDeleteURI() {},
   onClearHistory() {},
   onDeleteVisits() {},
   QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
 };
 
 /**
  * Registers a one-time history observer for and calls the callback
--- a/toolkit/components/thumbnails/PageThumbs.jsm
+++ b/toolkit/components/thumbnails/PageThumbs.jsm
@@ -866,17 +866,16 @@ var PageThumbsHistoryObserver = {
   onDeleteURI(aURI, aGUID) {
     PageThumbsStorage.remove(aURI.spec);
   },
 
   onClearHistory() {
     PageThumbsStorage.wipe();
   },
 
-  onTitleChanged() {},
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
   onDeleteVisits() {},
 
   QueryInterface: ChromeUtils.generateQI([
     "nsINavHistoryObserver",
     "nsISupportsWeakReference",
   ]),