[Pkg-javascript-commits] [pdf.js] 19/210: [Firefox] Workaround for sessionStorage error when the preference network.cookie.lifetimePolicy is set to 1 (bug 1000777)

David Prévot taffit at moszumanska.debian.org
Thu Jun 5 14:20:57 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch upstream
in repository pdf.js.

commit 447d115ec145cd39eecbed03a4f1e3f8d516fdf5
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Fri Apr 25 11:24:13 2014 +0200

    [Firefox] Workaround for sessionStorage error when the preference network.cookie.lifetimePolicy is set to 1 (bug 1000777)
---
 web/view_history.js | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/web/view_history.js b/web/view_history.js
index 49fd7a4..f785631 100644
--- a/web/view_history.js
+++ b/web/view_history.js
@@ -48,7 +48,13 @@ var ViewHistory = (function ViewHistoryClosure() {
 //#endif
 
 //#if FIREFOX || MOZCENTRAL
-//  resolvePromise(sessionStorage.getItem('pdfjsHistory'));
+//  var sessionHistory;
+//  try {
+//    // Workaround for security error when the preference
+//    // network.cookie.lifetimePolicy is set to 1, see Mozilla Bug 365772.
+//    sessionHistory = sessionStorage.getItem('pdfjsHistory');
+//  } catch (ex) {}
+//  resolvePromise(sessionHistory);
 //#endif
 
 //#if !(FIREFOX || MOZCENTRAL || B2G)
@@ -93,7 +99,10 @@ var ViewHistory = (function ViewHistoryClosure() {
 //#endif
 
 //#if FIREFOX || MOZCENTRAL
-//    sessionStorage.setItem('pdfjsHistory',database);
+//    try {
+//      // See comment in try-catch block above.
+//      sessionStorage.setItem('pdfjsHistory', database);
+//    } catch (ex) {}
 //#endif
 
 //#if !(FIREFOX || MOZCENTRAL || B2G)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list