Bug 83253 - [BlackBerry] Clear local storage won't take effect until browser exit and relaunch
Summary: [BlackBerry] Clear local storage won't take effect until browser exit and rel...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-05 00:12 PDT by Jonathan Dong
Modified: 2012-04-05 03:53 PDT (History)
6 users (show)

See Also:


Attachments
Patch (5.54 KB, patch)
2012-04-05 00:37 PDT, Jonathan Dong
no flags Details | Formatted Diff | Diff
Patch (5.37 KB, patch)
2012-04-05 01:26 PDT, Jonathan Dong
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.