Bug 1460396 - Make notifyHistoryObservers an arrow function. r=tcsc
authorEdouard Oger <eoger@fastmail.com>
Wed, 09 May 2018 15:26:04 -0400
changeset 417826 77b189833de1067c21f8230d6c68a29f1e4d7455
parent 417825 fd3cab8c506a65faf17c6080bc4b7dadf6c928a5
child 417827 b5fac38dc791a9935f2d3713537f2e4350a1c2b7
push id33980
push userebalazs@mozilla.com
push dateFri, 11 May 2018 09:35:12 +0000
treeherdermozilla-central@8e9a4a323f0c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcsc
bugs1460396
milestone62.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 1460396 - Make notifyHistoryObservers an arrow function. r=tcsc MozReview-Commit-ID: B4BPE98YxEi
services/sync/modules/engines/history.js
--- a/services/sync/modules/engines/history.js
+++ b/services/sync/modules/engines/history.js
@@ -227,27 +227,27 @@ HistoryStore.prototype = {
           failed.push(record.id);
         }
       }
     }
     if (toAdd.length || toRemove.length) {
       // We want to notify history observers that a batch operation is underway
       // so they don't do lots of work for each incoming record.
       let observers = PlacesUtils.history.getObservers();
-      function notifyHistoryObservers(notification) {
+      const notifyHistoryObservers = (notification) => {
         for (let observer of observers) {
           try {
             observer[notification]();
           } catch (ex) {
             // don't log an error - it's not our code that failed and we don't
             // want an error log written just for this.
             this._log.info("history observer failed", ex);
           }
         }
-      }
+      };
       notifyHistoryObservers("onBeginUpdateBatch");
       try {
         if (toRemove.length) {
           // PlacesUtils.history.remove takes an array of visits to remove,
           // but the error semantics are tricky - a single "bad" entry will cause
           // an exception before anything is removed. So we do remove them one at
           // a time.
           for await (let record of Async.yieldingIterator(toRemove)) {