Skip to content

Conversation

@indutny
Copy link
Member

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

stream_base

Description of change

Always use req_wrap_obj to allow calling req->Done() in stream
implementations.

Always use `req_wrap_obj` to allow calling `req->Done()` in stream implementations.
@indutnyindutny added the c++ Issues and PRs that require attention from people who are familiar with C++. label Dec 8, 2016
@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lts-watch-v6.x labels Dec 8, 2016
Copy link
Member

@jasnelljasnell left a comment

Choose a reason for hiding this comment

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

LGTM with Green CI

req_wrap->object()->Set(env->bytes_string(),
req_wrap_obj->Set(env->async(), True(env->isolate()));
req_wrap_obj->Set(env->bytes_string(),
Number::New(env->isolate(), bytes));
Copy link
Contributor

Choose a reason for hiding this comment

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

The indentation needs to be adjusted here.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ack. Thank you!

@indutny
Copy link
MemberAuthor

Copy link
Member

@bnoordhuisbnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM but you might as well change the one at line ~330 too.

@indutny
Copy link
MemberAuthor

@bnoordhuis good point, fixed it everywhere.

@indutny
Copy link
MemberAuthor

Copy link
Member

@bnoordhuisbnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM with style nits. Please be less hasty next time.


if (req_wrap->object()->Has(env->context(),
if (req_wrap_obj->Has(env->context(),
env->oncomplete_string()).FromJust()){
Copy link
Member

Choose a reason for hiding this comment

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

Alignment. :-)

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Fixed.


if (req_wrap->object()->Has(env->context(),
if (req_wrap_obj->Has(env->context(),
env->oncomplete_string()).FromJust()){
Copy link
Member

Choose a reason for hiding this comment

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

And again.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Fixed.

@indutny
Copy link
MemberAuthor

Landed in 729fecf, thank you!

@indutnyindutny closed this Dec 19, 2016
@indutnyindutny deleted the fix/homogenize-streambase branch December 19, 2016 22:20
indutny added a commit that referenced this pull request Dec 19, 2016
Always use `req_wrap_obj` to allow calling `req->Done()` in stream implementations. PR-URL: #10184 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
cjihrig pushed a commit to cjihrig/node that referenced this pull request Dec 20, 2016
Always use `req_wrap_obj` to allow calling `req->Done()` in stream implementations. PR-URL: nodejs#10184 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
@italoacasasitaloacasas mentioned this pull request Dec 20, 2016
cjihrig pushed a commit that referenced this pull request Dec 20, 2016
Always use `req_wrap_obj` to allow calling `req->Done()` in stream implementations. PR-URL: #10184 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
@MylesBorins
Copy link
Contributor

@indutny I've gone ahead and backported to v6.x. It is not landing cleanly on v4.x though

please feel free to manually backport. If it should be backported please change the label appropriately.

MylesBorins pushed a commit that referenced this pull request Jan 22, 2017
Always use `req_wrap_obj` to allow calling `req->Done()` in stream implementations. PR-URL: #10184 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
@indutny
Copy link
MemberAuthor

No need to backport it, but thanks for attempt!

@MylesBorins
Copy link
Contributor

@indutny should it be removed from v6.x?

@indutny
Copy link
MemberAuthor

No need to remove it either. It is very minor and has neglectable behavior changes for core internals.

MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
Always use `req_wrap_obj` to allow calling `req->Done()` in stream implementations. PR-URL: #10184 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
Always use `req_wrap_obj` to allow calling `req->Done()` in stream implementations. PR-URL: #10184 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@indutny@MylesBorins@mscdex@bnoordhuis@jasnell@addaleax@cjihrig@nodejs-github-bot