You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check for null data when constructing a PushEvent - #439
After Web IDL conversion, the nullable data member is present with a default of null. Test for null to distinguish omitted data from a supplied empty string or buffer.
@saschanaz, a question about Gecko after this change. The spec's PushEventInit declares PushMessageDataInit? data = null (IDL), so {data: null} means no data. Gecko declares PushMessageDataInit data; (PushEvent.webidl), and the constructor tests aOptions.mData.WasPassed() (ServiceWorkerEvents.cpp). By my reading of Web IDL, an explicit null there converts to the string "null". I have not run it in Firefox. Could you confirm that reading? If it holds, would Gecko change the member to nullable with a null default, as in the spec?
That changed in #385 then we missed it because we didn't bother to implement mutable... But it's a right change as generally we want to make new FooEvent(fooEvent) work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After Web IDL conversion, the nullable
datamember is present with a default ofnull. Test for null to distinguish omitted data from a supplied empty string or buffer.Preview | Diff