[webkit-reviews] review granted: [Bug 177876] Add an efficient data structure for WebCore to query if there is a Service Worker registered for a given origin : [Attachment 324086] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 17 23:06:36 PDT 2017


Ryosuke Niwa <rniwa at webkit.org> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 177876: Add an efficient data structure for WebCore to query if there is a
Service Worker registered for a given origin
https://bugs.webkit.org/show_bug.cgi?id=177876

Attachment 324086: Patch

https://bugs.webkit.org/attachment.cgi?id=324086&action=review




--- Comment #35 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 324086
  --> https://bugs.webkit.org/attachment.cgi?id=324086
Patch

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

> Source/WebKit/StorageProcess/StorageProcess.cpp:227
> +	   if (auto* store = swOriginStoreForSession(sessionID))
> +	       store->clear();

It's a bit scary to have a generic look up function like
swOriginStoreForSession since the lifetime of WebSWOriginStore is tied to its
unique_ptr,
and there is no guarantee that unique_ptr would outlive the usage of the raw
pointer returned by it.

Can we instead add a method to find & call clear or remove data for a set of
origins so that we don't have to expose WebSWOriginStore*?

> LayoutTests/ChangeLog:17
> +	   (log):
> +	   (then):
> +	   (catch):

Remove these?

> LayoutTests/ChangeLog:19
> +	   (i.then):

Ditto.


More information about the webkit-reviews mailing list