Non-existing sessionStorage object is interpreted as an object.

RESOLVED DUPLICATE of bug 532062

Status

()

Firefox
Untriaged
RESOLVED DUPLICATE of bug 532062
6 years ago
6 years ago

People

(Reporter: Chris Abrams, Unassigned)

Tracking

8 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.1 Safari/536.5

Steps to reproduce:

In the console I typed:

sessionStorage.something

I did this in FF 8 on Windows and Mac


Actual results:

It returned:

"object"


Expected results:

It should have said:

undefined
(Reporter)

Comment 1

6 years ago
Sorry for the double headers; this was my first bug report.
(Reporter)

Comment 2

6 years ago
(In reply to Chris Abrams from comment #0)
> User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.5
> (KHTML, like Gecko) Chrome/19.0.1084.1 Safari/536.5
> 
> Steps to reproduce:
> 
> In the console I typed:
> 
> typeof sessionStorage.something
> 
> I did this in FF 8 on Windows and Mac
> 
> 
> Actual results:
> 
> It returned:
> 
> "object"
> 
> 
> Expected results:
> 
> It should have said:
> 
> undefined
(Reporter)

Comment 3

6 years ago
Guys, really sorry for the confusion (but Bugzillas UI is very confusing):

I typed:

typeof sessionStorage.something

and got:

"object"

but I should have gotten:

undefined

Comment 4

6 years ago
Thanks for taking time to report this (and for getting through the bugzilla's UI)!

Firefox 8 is very old though. The current supported release is Firefox 11, and when reporting bugs we usually request to test with the latest development build (http://nightly.mozilla.org/) as well, since that's where the development happens.

I know it used to return null in recent versions, which was fixed in bug 532062 just a few days ago and the fix will likely be available in Firefox 14. (Note that as of today, you have to test using |window.sessionStorage.something| due to bug 726949.)

You could re-test on a nightly if you'd like to verify this is indeed fixed for you, and feel free to file a new bug if you encounter a different problem.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 532062
You need to log in before you can comment on or make changes to this bug.