Bug 139519 - Get rid of the storage strategy
Summary: Get rid of the storage strategy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-10 18:05 PST by Anders Carlsson
Modified: 2014-12-11 17:58 PST (History)
1 user (show)

See Also:


Attachments
Patch (39.78 KB, patch)
2014-12-10 18:06 PST, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (41.64 KB, patch)
2014-12-10 20:14 PST, Anders Carlsson
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2014-12-10 18:05:31 PST
Get rid of the storage strategy
Comment 1 Anders Carlsson 2014-12-10 18:06:45 PST
Created attachment 243085 [details]
Patch
Comment 2 Anders Carlsson 2014-12-10 20:14:22 PST
Created attachment 243092 [details]
Patch
Comment 3 Csaba Osztrogonác 2014-12-11 03:39:44 PST
Comment on attachment 243092 [details]
Patch

nit: Please remove the duplicated changelog entries.
Comment 4 Antti Koivisto 2014-12-11 09:08:04 PST
Comment on attachment 243092 [details]
Patch

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

> Source/WebCore/ChangeLog:31
> +        * storage/StorageStrategy.cpp: Removed.
> +        * storage/StorageStrategy.h: Removed.

Nice!

> Source/WebCore/ChangeLog:36
> +
> +2014-12-10  Anders Carlsson  <andersca@apple.com>
> +
> +        Get rid of the storage strategy
> +        https://bugs.webkit.org/show_bug.cgi?id=139519

Duplicated ChangeLog entry

> Source/WebKit2/ChangeLog:18
> +        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
> +
> +2014-12-10  Anders Carlsson  <andersca@apple.com>
> +
> +        Get rid of the storage strategy
> +        https://bugs.webkit.org/show_bug.cgi?id=139519

Here too.
Comment 5 Anders Carlsson 2014-12-11 09:12:15 PST
Committed r177151: <http://trac.webkit.org/changeset/177151>
Comment 6 Joseph Pecoraro 2014-12-11 17:55:22 PST
Comment on attachment 243092 [details]
Patch

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

> Source/WebCore/page/PageGroup.cpp:170
>  StorageNamespace* PageGroup::localStorage()
>  {
> -    if (!m_localStorage)
> -        m_localStorage = StorageNamespace::localStorageNamespace(this);
> -
>      return m_localStorage.get();
>  }

The inspector used this interface, and always expected a Storage object, and is now crashing.

It doesn't look like m_localStorage is ever assigned now, so this is always null.

Is this being phased out, or is there something else we should use in Inspector land?
Comment 7 Joseph Pecoraro 2014-12-11 17:58:16 PST
Comment on attachment 243092 [details]
Patch

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

> Source/WebCore/page/DOMWindow.cpp:864
> +    if (document->securityOrigin()->canAccessLocalStorage(document->topOrigin()))
> +        storageArea = page->storageNamespaceProvider().localStorageNamespace().storageArea(document->securityOrigin());
> +    else
> +        storageArea = page->storageNamespaceProvider().transientLocalStorageNamespace(*document->topOrigin()).storageArea(document->securityOrigin());

Sounds like we should switch to using storageNamespaceProvider.