From e904b8a67c1bb94a8286dd69292dbace33027d5c Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Fri, 26 Jan 2018 12:50:25 +0100 Subject: [PATCH] Drop third parameter to replaceState/pushState This was introduced in #3582 to work around https://crbug.com/274024 . The bug in Chrome has been fixed a long time ago (at least 33), so let's simplify the code. --- web/pdf_history.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/web/pdf_history.js b/web/pdf_history.js index 5bdc17b92..3ca1df2cd 100644 --- a/web/pdf_history.js +++ b/web/pdf_history.js @@ -281,23 +281,10 @@ class PDFHistory { this._updateInternalState(destination, newState.uid); if (shouldReplace) { - if (typeof PDFJSDev !== 'undefined' && - PDFJSDev.test('FIREFOX || MOZCENTRAL')) { - // Providing the third argument causes a SecurityError for file:// URLs. - window.history.replaceState(newState, ''); - } else { - window.history.replaceState(newState, '', document.URL); - } + window.history.replaceState(newState, ''); } else { this._maxUid = this._uid; - - if (typeof PDFJSDev !== 'undefined' && - PDFJSDev.test('FIREFOX || MOZCENTRAL')) { - // Providing the third argument causes a SecurityError for file:// URLs. - window.history.pushState(newState, ''); - } else { - window.history.pushState(newState, '', document.URL); - } + window.history.pushState(newState, ''); } if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&