http2: add constant to already destructured constants#28176
Closed
dnalborczyk wants to merge 2 commits intonodejs:masterfrom
Closed
http2: add constant to already destructured constants#28176dnalborczyk wants to merge 2 commits intonodejs:masterfrom
dnalborczyk wants to merge 2 commits intonodejs:masterfrom
Conversation
cjihrig
approved these changes
Jun 11, 2019
lpinca
reviewed
Jun 11, 2019
| const Readable = Stream.Readable; | ||
| const binding = internalBinding('http2'); | ||
| const constants = binding.constants; | ||
| const { Readable } = Stream; |
Member
There was a problem hiding this comment.
Suggested change
| const { Readable } = Stream; | |
| const { Readable } = require('stream'); |
Contributor
Author
There was a problem hiding this comment.
thing is that Http2ServerResponse extends from Stream below, so we need a Stream reference as well. if we could use ES6 modules internally, I'd use a 'default', and a 'named import': import Stream, { Readable } from ....
| @@ -4,9 +4,8 @@ const { Object, ObjectPrototype, Reflect } = primordials; | |||
|
|
|||
| const assert = require('internal/assert'); | |||
| const Stream = require('stream'); | |||
Member
There was a problem hiding this comment.
Suggested change
| const Stream = require('stream'); |
jasnell
approved these changes
Jun 14, 2019
Member
|
I am not a huge fan of changes like these. They do not seem to bring much benefit but I won't block this either. |
This comment has been minimized.
This comment has been minimized.
Trott
approved these changes
Jul 8, 2019
Collaborator
Collaborator
Collaborator
Member
|
Landed in 3a9cb5c...b04de23 |
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
Jul 30, 2019
PR-URL: nodejs#28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
Jul 30, 2019
PR-URL: nodejs#28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos
pushed a commit
that referenced
this pull request
Aug 2, 2019
PR-URL: #28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos
pushed a commit
that referenced
this pull request
Aug 2, 2019
PR-URL: #28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
add constant to already destructured constants and while we're at it, destructure
Readableandconstantsas well, removebinding.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes