From 04d4faefc4b0b50a7210346c2f397bb8d7bfd73d Mon Sep 17 00:00:00 2001
From: Jonas Jenwald <jonas.jenwald@gmail.com>
Date: Thu, 5 Oct 2017 13:38:25 +0200
Subject: [PATCH] Remove the `this._currentUid` property from `PDFHistory`,
 since it's no longer needed

Commit https://github.com/mozilla/pdf.js/pull/8885/commits/938dffb06b8dcd54ea5c7c2ad531d145b5fdaa5e, in PR 8885, removed the only actual usage of `this._currentUid` and it can thus be removed.
---
 web/pdf_history.js | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/web/pdf_history.js b/web/pdf_history.js
index cca49c476..0edc0933f 100644
--- a/web/pdf_history.js
+++ b/web/pdf_history.js
@@ -109,7 +109,7 @@ class PDFHistory {
     this._currentHash = getCurrentHash();
     this._numPositionUpdates = 0;
 
-    this._currentUid = this._uid = 0;
+    this._uid = 0;
     this._destination = null;
     this._position = null;
 
@@ -266,7 +266,7 @@ class PDFHistory {
     let shouldReplace = forceReplace || !this._destination;
     let newState = {
       fingerprint: this.fingerprint,
-      uid: shouldReplace ? this._currentUid : this._uid,
+      uid: shouldReplace ? this._uid : (this._uid + 1),
       destination,
     };
 
@@ -392,8 +392,7 @@ class PDFHistory {
       delete destination.temporary;
     }
     this._destination = destination;
-    this._currentUid = uid;
-    this._uid = this._currentUid + 1;
+    this._uid = uid;
     // This should always be reset when `this._destination` is updated.
     this._numPositionUpdates = 0;
   }
@@ -468,7 +467,7 @@ class PDFHistory {
         (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&
          state.chromecomState && !this._isValidState(state))) {
       // This case corresponds to the user changing the hash of the document.
-      this._currentUid = this._uid;
+      this._uid++;
 
       let { hash, page, rotation, } = parseCurrentHash(this.linkService);
       this._pushOrReplaceState({ hash, page, rotation, },