Skip to content

Commit

Permalink
[Firefox] Workaround for sessionStorage error when the preference net…
Browse files Browse the repository at this point in the history
…work.cookie.lifetimePolicy is set to 1 (bug 1000777)
  • Loading branch information
Snuffleupagus committed Apr 25, 2014
1 parent 0045325 commit 447d115
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions web/view_history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 447d115

Please sign in to comment.