Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct PushMessageData #382

Merged
merged 4 commits into from
Jul 10, 2024
Merged

Correct PushMessageData #382

merged 4 commits into from
Jul 10, 2024

Conversation

annevk
Copy link
Member

@annevk annevk commented Jul 9, 2024

Give PushMessageData a clear internal concept to hold the bytes and also make it clear that it cannot be null. None of the methods were prepared to handle it being null and nothing ever creates a PushMessageData object where it is null.

Partially addresses the concerns in #380 and fixes #381.


I installed tidy-html5 but that appears to not work. There are no instructions provided by this repository as to how to do formatting so I guess I'm fine with that happening in an automatic follow-up cleanup commit...

One thing that I'm not familiar with is ReSpec and how it does linking so that probably needs careful review here as I'm trying to introduce some new links.


Preview | Diff

Give PushMessageData a clear internal concept to hold the bytes and also make it clear that it cannot be null. None of the methods were prepared to handle it being null and nothing ever creates a PushMessageData object where it is null.

Partially addresses the concerns in #380 and fixes #381.
@annevk annevk requested review from marcoscaceres and saschanaz July 9, 2024 14:36
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@annevk annevk requested a review from saschanaz July 9, 2024 15:54
Copy link
Member

@saschanaz saschanaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems PushMessageData is only set for PushEvent if any buffer exists and otherwise data becomes null, and PushMessageData itself does not expect null. Gecko does not expect null either, so it matches the implementation. (I assume you checked WebKit, and my quick check says WebKit does not either.)

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@annevk annevk requested a review from saschanaz July 10, 2024 12:16
Copy link
Member

@saschanaz saschanaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@annevk annevk merged commit 8a6a92c into gh-pages Jul 10, 2024
2 checks passed
@annevk annevk deleted the pushmessagedata branch July 10, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

json() should be defined in terms of Infra
2 participants