Bug 83253

Summary: [BlackBerry] Clear local storage won't take effect until browser exit and relaunch
Product: WebKit Reporter: Jonathan Dong <jonathan.dong.webkit>
Component: WebKit BlackBerryAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: charles.wei, leo.yang, rwlbuis, staikos, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Jonathan Dong 2012-04-05 00:12:15 PDT
RIM PR: #146871

way to reproduce:
1. goto http://html5demos.com/storage, enter something both in session storage
and local storage, then reload the page, you can see the session and local
storage are there;
2. clear local storage;
3. refresh the page.

expected behavior:
session storage still there, local storage is empty;
now:
session storage and local storage are still there both. if you exit and
relaunch the browser, the local storage is cleared.


root cause:
in WebPageClientImpl::clearLocalStorage(), we only deleted the storage database
file on disk, but we haven't cleared the local storage in memory.
Comment 1 Jonathan Dong 2012-04-05 00:37:34 PDT
Created attachment 135769 [details]
Patch
Comment 2 Jonathan Dong 2012-04-05 01:26:11 PDT
Created attachment 135780 [details]
Patch
Comment 3 Charles Wei 2012-04-05 02:53:17 PDT
Comment on attachment 135780 [details]
Patch

Looks good to me.  Need a reviewer to review and approve though.
Comment 4 Rob Buis 2012-04-05 03:44:21 PDT
Comment on attachment 135780 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=135780&action=review

Looks good.

> Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp:139
>  void clearDatabase(const WebString& pageGroupName)

I wonder if clearDatabase is still in use...
Comment 5 WebKit Review Bot 2012-04-05 03:53:03 PDT
Comment on attachment 135780 [details]
Patch

Clearing flags on attachment: 135780

Committed r113309: <http://trac.webkit.org/changeset/113309>
Comment 6 WebKit Review Bot 2012-04-05 03:53:08 PDT
All reviewed patches have been landed.  Closing bug.