Bug 234370 - Add a "NotificationData" object to encompass local Notification-related parameters, instead of passing tons of them around everywhere
Summary: Add a "NotificationData" object to encompass local Notification-related param...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-12-15 15:39 PST by Brady Eidson
Modified: 2021-12-24 09:07 PST (History)
8 users (show)

See Also:


Attachments
Patch v1 (29.13 KB, patch)
2021-12-15 15:49 PST, Brady Eidson
thorton: review+
Details | Formatted Diff | Diff
PFL v1 (28.67 KB, patch)
2021-12-15 16:11 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
PFL v2 (29.38 KB, patch)
2021-12-15 16:51 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
PFL v3 (29.96 KB, patch)
2021-12-15 17:48 PST, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2021-12-15 15:39:12 PST
Add a "NotificationData" object to encompass local Notification-related parameters, instead of passing tons of them around everywhere
Comment 1 Brady Eidson 2021-12-15 15:49:38 PST
Created attachment 447295 [details]
Patch v1
Comment 2 Tim Horton 2021-12-15 15:58:36 PST
Comment on attachment 447295 [details]
Patch v1

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

> Source/WebCore/Modules/notifications/NotificationData.h:49
> +    encoder << title << body << iconURL << tag << language << direction << originString << notificationID;

I feel like traditionally we do one-per-line, though there's nothing wrong with this.
Comment 3 Tim Horton 2021-12-15 15:58:39 PST
Comment on attachment 447295 [details]
Patch v1

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

> Source/WebCore/Modules/notifications/NotificationData.h:49
> +    encoder << title << body << iconURL << tag << language << direction << originString << notificationID;

I feel like traditionally we do one-per-line, though there's nothing wrong with this.
Comment 4 Brady Eidson 2021-12-15 16:11:24 PST
Created attachment 447296 [details]
PFL v1
Comment 5 Brady Eidson 2021-12-15 16:51:23 PST
Created attachment 447300 [details]
PFL v2
Comment 6 Brady Eidson 2021-12-15 17:48:32 PST
Created attachment 447304 [details]
PFL v3
Comment 7 EWS 2021-12-15 19:47:31 PST
Committed r287124 (245308@main): <https://commits.webkit.org/245308@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 447304 [details].
Comment 8 Radar WebKit Bug Importer 2021-12-15 19:48:23 PST
<rdar://problem/86555440>
Comment 9 Darin Adler 2021-12-16 13:30:07 PST
Comment on attachment 447304 [details]
PFL v3

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

> Source/WebCore/Modules/notifications/NotificationData.cpp:31
> +namespace WebCore {
> +
> +} // namespace WebCore

What’s the rationale for creating an empty source file?
Comment 10 Brady Eidson 2021-12-21 16:36:15 PST
(In reply to Darin Adler from comment #9)
> Comment on attachment 447304 [details]
> PFL v3
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=447304&action=review
> 
> > Source/WebCore/Modules/notifications/NotificationData.cpp:31
> > +namespace WebCore {
> > +
> > +} // namespace WebCore
> 
> What’s the rationale for creating an empty source file?

There was definitely a build/link error resolved by it, but I definitely forget what it was.
Comment 11 Brady Eidson 2021-12-21 16:42:12 PST
This patch had a pretty subtle bug which caused a few different types of test flakiness.

Look at this file closely and see if you can spot it.
https://trac.webkit.org/changeset/287124/webkit/trunk/Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp

Good news - That type of subtle bug within the "two different notification identifiers" system is why I embarked upon https://bugs.webkit.org/show_bug.cgi?id=234534 which should fix it.
Comment 12 Darin Adler 2021-12-24 09:07:32 PST
(In reply to Brady Eidson from comment #10)
> (In reply to Darin Adler from comment #9)
> > > Source/WebCore/Modules/notifications/NotificationData.cpp:31
> > > +namespace WebCore {
> > > +
> > > +} // namespace WebCore
> > 
> > What’s the rationale for creating an empty source file?
> 
> There was definitely a build/link error resolved by it, but I definitely
> forget what it was.

Let’s follow up on this. Doesn’t make logical sense that we need an empty source file, and I am pretty sure we can remove it.