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

PushMessageData is poorly defined and seems broken #380

Open
annevk opened this issue Jul 9, 2024 · 1 comment
Open

PushMessageData is poorly defined and seems broken #380

annevk opened this issue Jul 9, 2024 · 1 comment

Comments

@annevk
Copy link
Member

annevk commented Jul 9, 2024

  1. Most methods refer to a bytes variable that is not defined. Presumably this should be the internal slot that references the associated byte sequence or null?
  2. The methods don't handle bytes being null. Though perhaps it should never be null and that should instead be handled one layer up? It does seem that data on PushEvent is nullable, though data on PushEventInit is not??? That would match how section 10.4 initializes this.
annevk added a commit that referenced this issue 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.
annevk added a commit that referenced this issue Jul 10, 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.
@annevk
Copy link
Member Author

annevk commented Jul 10, 2024

What remains here is making data on PushEventInit nullable (and default to null). That's a normative change that requires changes to implementations, but I think would make sense given the overall desired model.

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

No branches or pull requests

1 participant