Open Bug 659009 Opened 11 years ago Updated 3 years ago

Stored Reference to sessionStorage not equal to window.sessionStorage, throws Security errors NS_ERROR_DOM_SECURITY_ERR


(Core :: DOM: Core & HTML, defect, P5)






(Reporter: velten, Unassigned)


User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

I have used and stored window.sessionStorage in a local scope variable for later usage. First all Methods of this Reference are working correct.

But on same Pages i retrieve Security Errors, if I use the stored reference later in the HTML-Page: (length-Property, getItem, setItem Methods). toString is working.

Fehler: uncaught exception: [Exception... "Security error"  code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" 

storedRef == window.sessionStorage returns false;

URL has not changed. All Methods of window.sessionStorage are working correct. 

Reproducible: Always

Steps to Reproduce:
Happens only on some pages (every time). But on some pages not (every time).  
I have not found the differences on this pages. There is no URL-Change between store of Reference an usage of the Reference

1. Store window.sessionStorage in closure scope variable
2. Call Methods of stored ref to window.sessionStorage later (not same Javascript-File)

Could not provide testpages, since this pages are not our ones and not public available.  

Actual Results:  
Security Errors on length-Property, getItem(), setItem() Methods.
storedRef == window.sessionStorage returns false;

Expected Results:  
No Security Errors
storedRef == window.sessionStorage should return true;

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.