Bug 237040 - Share more code between dispatchSessionStorageEvents() and dispatchLocalStorageEvents()
Summary: Share more code between dispatchSessionStorageEvents() and dispatchLocalStora...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-22 08:10 PST by Chris Dumez
Modified: 2022-02-22 17:36 PST (History)
5 users (show)

See Also:


Attachments
Patch (6.61 KB, patch)
2022-02-22 08:16 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (36.74 KB, patch)
2022-02-22 11:54 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (6.70 KB, patch)
2022-02-22 12:09 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (6.67 KB, patch)
2022-02-22 16:16 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2022-02-22 08:10:58 PST
Share more code between dispatchSessionStorageEvents() and dispatchLocalStorageEvents().
Comment 1 Chris Dumez 2022-02-22 08:16:56 PST
Created attachment 452872 [details]
Patch
Comment 2 Chris Dumez 2022-02-22 11:54:52 PST
Created attachment 452889 [details]
Patch
Comment 3 Chris Dumez 2022-02-22 12:09:49 PST
Created attachment 452891 [details]
Patch
Comment 4 Geoffrey Garen 2022-02-22 14:19:31 PST
Comment on attachment 452891 [details]
Patch

r=me
Comment 5 Darin Adler 2022-02-22 14:59:18 PST
Comment on attachment 452891 [details]
Patch

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

> Source/WebCore/storage/StorageEventDispatcher.cpp:52
> +        if (!isRelevantPage(window.page()))

Love this the way it is already, but one note: Could put the null check in the shared code and pass a Page& to the function.
Comment 6 Chris Dumez 2022-02-22 16:16:37 PST
Created attachment 452911 [details]
Patch
Comment 7 EWS 2022-02-22 17:35:16 PST
Committed r290342 (247662@main): <https://commits.webkit.org/247662@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452911 [details].
Comment 8 Radar WebKit Bug Importer 2022-02-22 17:36:21 PST
<rdar://problem/89326846>