Skip to content
New issue

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

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

Already on GitHub? # to your account

Provide Crypto/Compression API errors where safe, fix macOS compiler warning #529

Merged
merged 1 commit into from
Apr 15, 2023

Conversation

fhanau
Copy link
Collaborator

@fhanau fhanau commented Apr 9, 2023

Based on the JSG_WARN_ONCE_IF() statements added in recent changes to the Web Crypto/Compression Streams APIs, errors can be thrown without breaking existing code in several but not all situations where there should be an error.
As a first step, throw errors where we can safely do so, which simplifies the code in several spaces; a future PR will create configuration flags to return errors in the other cases without breaking existing code.

Also fix a compiler warning about an unused variable that occurs in the implementation of FileWatcher for macOS/BSD.

Also see the eponymous upstream branch.

@fhanau fhanau requested a review from jasnell April 9, 2023 14:32
@fhanau fhanau force-pushed the felix/warn_if-refactor branch from 3f138a8 to 0cb88db Compare April 14, 2023 21:59
@fhanau
Copy link
Collaborator Author

fhanau commented Apr 14, 2023

It now looks like there are cases where throwing the compression API error would cause issues, I have removed that part so now it's just Web Crypto related changes.

@fhanau fhanau merged commit 51dbd97 into main Apr 15, 2023
@fhanau fhanau deleted the felix/warn_if-refactor branch April 18, 2023 00:30
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants