LocalStorage is not database backed if page->settings()->localStorageDatabasePath() returns "". Instead, the code should return an immutable LocalStorage (like during private browsing) rather than returning a mutable (but not database backed) version.
This is described in more detail in this email thread: https://lists.webkit.org/pipermail/webkit-dev/2009-May/007790.html
I'm happy to take this on and should be able to get to it in the next couple weeks.
FYI: I'm still planning on fixing this once I get a couple of my refactoring changes (https://bugs.webkit.org/show_bug.cgi?id=25376) in.