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

Allow GrpcWebStreamParser to accept Uint8Array #734

Merged
merged 5 commits into from
Mar 19, 2020

Conversation

travikk
Copy link
Contributor

@travikk travikk commented Feb 19, 2020

Solves the following: #710

Suggested by: #683 (comment)

@travikk travikk marked this pull request as ready for review February 19, 2020 06:24
var pos = 0;

if (input instanceof Uint8Array || input instanceof Array) {
inputBytes = input
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: missing semicolon. doesn't pass closure lint checks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

if (input instanceof Uint8Array || input instanceof Array) {
inputBytes = input
} else {
inputBytes = new Uint8Array(input)
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: missing semicolon. doesn't pass closure lint checks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

* @throws {!Error} Throws an error message if the input is invalid.
* @override
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry another issue: apparently you need @override here because now the spec differs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@travikk
Copy link
Contributor Author

travikk commented Mar 10, 2020

@stanley-cheung do you think you can merge this in and release?

@stanley-cheung
Copy link
Collaborator

Thanks, all internal tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants