Merge lp://staging/~gary/juju-gui/noCookiesAgain into lp://staging/juju-gui/experimental

Proposed by Gary Poster
Status: Merged
Merged at revision: 1069
Proposed branch: lp://staging/~gary/juju-gui/noCookiesAgain
Merge into: lp://staging/juju-gui/experimental
Diff against target: 21 lines (+6/-4)
1 file modified
app/store/env/base.js (+6/-4)
To merge this branch: bzr merge lp://staging/~gary/juju-gui/noCookiesAgain
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+186649@code.staging.launchpad.net

Description of the change

Fix no-cookie access. Again.

test suggestions welcome. I don't see any practical ones.

https://codereview.appspot.com/13786044/

To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :

Reviewers: mp+186649_code.launchpad.net,

Message:
Please take a look.

Description:
Fix no-cookie access. Again.

test suggestions welcome. I don't see any practical ones.

https://code.launchpad.net/~gary/juju-gui/noCookiesAgain/+merge/186649

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/13786044/

Affected files (+8, -4 lines):
   A [revision details]
   M app/store/env/base.js

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: app/store/env/base.js
=== modified file 'app/store/env/base.js'
--- app/store/env/base.js 2013-09-02 11:24:20 +0000
+++ app/store/env/base.js 2013-09-19 20:29:59 +0000
@@ -62,11 +62,13 @@
     * @return {undefined} side effects only.
     */
    module.verifySessionStorage = function() {
- if (!module.sessionStorage) {
- // The conditional is to allow for test manipulation.
- module.sessionStorage = window.sessionStorage;
- }
      try {
+ // Any manipulation of the sessionStorage that might actually fail
+ // because cookies are turned off needs to be in this try/catch
block.
+ if (!module.sessionStorage) {
+ // The conditional is to allow for test manipulation.
+ module.sessionStorage = window.sessionStorage;
+ }
        module.sessionStorage.getItem('credentials');
      } catch (e) {
        module.sessionStorage = module.stubSessionStorage;

Revision history for this message
Jeff Pihach (hatch) wrote :
Revision history for this message
Gary Poster (gary) wrote :

*** Submitted:

Fix no-cookie access. Again.

test suggestions welcome. I don't see any practical ones.

R=jeff.pihach
CC=
https://codereview.appspot.com/13786044

https://codereview.appspot.com/13786044/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches