I got a "Persistent storage maximum size reached" error when I call the following code:
localStorage.setItem('key', 1);
But when I get the length attribute of the localStorage, the result is 0:
localStorage.length; // returns 0
The problem occurred on my Firefox 13.0.1 Mac version