FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Revert "handle_wrap: IsRefed -> Unrefed, no isAlive check" by Fishrock123 · Pull Request #6546 · nodejs/node · GitHub

/ node Public

Revert "handle_wrap: IsRefed -> Unrefed, no isAlive check" - #6546

Merged
Fishrock123 merged 2 commits into
nodejs:masterfrom
Fishrock123:revert-9bb5a5e
May 11, 2016
Merged

Revert "handle_wrap: IsRefed -> Unrefed, no isAlive check"#6546
Fishrock123 merged 2 commits into
nodejs:masterfrom
Fishrock123:revert-9bb5a5e

Conversation

Copy link
Copy Markdown
Contributor
Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected core subsystem(s)

handle_wrap

Description of change

This reverts commit 9bb5a5e.

Refs: #6395
Refs: #6204
Refs: #6401
Refs: #6382
Fixes: #6381

Conflicts:
src/handle_wrap.cc
test/parallel/test-handle-wrap-isrefed-tty.js
test/parallel/test-handle-wrap-isrefed.js

My own stupidity for changing this. cc @bnoordhuis, @jasnell, @trevnorris so this can hopefully be landed properly into a release. (Hopefully this week?..)

Fishrock123 added the lib / src Issues and PRs related to general changes in the lib or src directory. label May 3, 2016
nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label May 3, 2016

Copy link
Copy Markdown
Contributor Author

Fishrock123 mentioned this pull request May 3, 2016
4 tasks

Fishrock123 commented May 3, 2016
edited
Loading

Copy link
Copy Markdown
Contributor Author

and here's some proof (kinda) that it actually works (reasonably): #6381 (comment)

jasnell commented May 3, 2016

Copy link
Copy Markdown
Member

Can you please add some explanation in the commit message about why would be reverted.

Copy link
Copy Markdown
Contributor Author

@jasnell done, ptal

Fishrock123 force-pushed the revert-9bb5a5e branch 2 times, most recently from cd80f4b to 2688e45 Compare May 3, 2016 15:37

jasnell commented May 3, 2016

Copy link
Copy Markdown
Member

Thank you. CI is green. LGTM but want @bnoordhuis and @trevnorris to sign off as well.

Copy link
Copy Markdown
Contributor Author

ping @bnoordhuis & @trevnorris

Copy link
Copy Markdown
Member

Quick LGTM. Can we rename them now to hasRef() and HasRef() in a follow-up PR? :-)

Copy link
Copy Markdown
Contributor Author

@bnoordhuis I may as well do that in a second commit here then..

Copy link
Copy Markdown
Contributor Author

updated ptal..

Copy link
Copy Markdown
Member

2nd commit LGTM2.

Copy link
Copy Markdown
Contributor Author

attempting to ping @trevnorris again

Copy link
Copy Markdown
Contributor

LGTM. Second commit enough to warrant another CI run?

Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Contributor Author

CI is green, landing.

This reverts commit 9bb5a5e.

This API is not suitable because it depended on being able to
potentially access the handle's flag after the handle was already
cleaned up. Since this is not actually possible (obviously, oops)
this newer API no longer makes much sense, and the older API is more
suitable.

API comparison:
IsRefed -> Has a strong reference AND is alive. (Deterministic)
Unrefed -> Has a weak reference OR is dead. (Less deterministic)

Refs: nodejs#6395
Refs: nodejs#6204
Refs: nodejs#6401
Refs: nodejs#6382
Fixes: nodejs#6381

PR-URL: nodejs#6546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

Conflicts:
	src/handle_wrap.cc
	test/parallel/test-handle-wrap-isrefed-tty.js
	test/parallel/test-handle-wrap-isrefed.js
Rename slightly to HasRef() at bnoordhuis’ request.
Better reflects what we actually do for this check.

Refs: nodejs#6395
Refs: nodejs#6204
Refs: nodejs#6401
Refs: nodejs#6382
Refs: nodejs#6381

PR-URL: nodejs#6546
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Fishrock123 merged commit fe4837a into nodejs:master May 11, 2016
Fishrock123 deleted the revert-9bb5a5e branch May 11, 2016 21:45

Fishrock123 commented May 17, 2016
edited
Loading

Copy link
Copy Markdown
Contributor Author

evanlucas pushed a commit that referenced this pull request May 17, 2016
This reverts commit 9bb5a5e.

This API is not suitable because it depended on being able to
potentially access the handle's flag after the handle was already
cleaned up. Since this is not actually possible (obviously, oops)
this newer API no longer makes much sense, and the older API is more
suitable.

API comparison:
IsRefed -> Has a strong reference AND is alive. (Deterministic)
Unrefed -> Has a weak reference OR is dead. (Less deterministic)

Refs: #6395
Refs: #6204
Refs: #6401
Refs: #6382
Fixes: #6381

PR-URL: #6546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

Conflicts:
	src/handle_wrap.cc
	test/parallel/test-handle-wrap-isrefed-tty.js
	test/parallel/test-handle-wrap-isrefed.js
evanlucas pushed a commit that referenced this pull request May 17, 2016
Rename slightly to HasRef() at bnoordhuis’ request.
Better reflects what we actually do for this check.

Refs: #6395
Refs: #6204
Refs: #6401
Refs: #6382
Refs: #6381

PR-URL: #6546
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

Copy link
Copy Markdown
Contributor

@Fishrock123 Added dont-land label. please feel free to make a change if that was incorrect

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

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL