GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||
GeezerVison is showing github.com — src: use JS inheritance for `AsyncWrap` by addaleax · Pull Request #23094 · nodejs/node Conversation
Member
For all classes descending from This allows cleanup of some code around transferring handles Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
For all classes descending from `AsyncWrap`, use JS inheritance instead of manually adding methods to the individual classes. This allows cleanup of some code around transferring handles over IPC.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
| V(async_hooks_init_function, v8::Function) \ | ||
| V(async_hooks_promise_resolve_function, v8::Function) \ | ||
| V(async_wrap_constructor_template, v8::FunctionTemplate) \ | ||
| V(async_wrap_object_constructor_template, v8::FunctionTemplate) \ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Maybe use ctor for this name as well, for consistency?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Done!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Definitely a good idea, I think, but is this going to be semver-major? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jasnell If necessary, I would be okay with that, but could you explain why this is semver-major? It doesn’t touch public API or remove methods, it just moves them to a different position on the prototype chain (of internal objects). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Largely defensive. It shouldn't be breaking but as we've seen many times, it pays to be careful. At the very least we need a citgm run to be sure |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I ran CITGM – there are a lot of failures because of #23122, but in the diff between the run here and the master run, I didn’t find anything that would point to issues with this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hopefully ok then :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jasnell I think this will require a backport PR for v10.x anyway … let’s run CITGM on that as well, that should give a much clearer picture. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Still LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
New CI: https://ci.nodejs.org/job/node-test-pull-request/17517/ (This still needs to wait for a second approval, or two more days.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Re-run of node-test-commit-aix. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Windows again: https://ci.nodejs.org/job/node-test-commit-windows-fanned/21222/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Btw, @joyeecheung … just thinking out loud: The most natural way to do mirror the C++ multiple inheritance might be to create a second native JS class (e.g. That sounds semver-major to me, though, and I still have some native stream refactoring that I’d like to do, so maybe I’d keep that approach in mind and we could implement it late in the Node 11 release cycle? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Isn't that kind of like (Or..maybe we should do it the other way around, why does |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Because it’s both a class that wraps a libuv handle, and is a stream at the same time – it does make sense to use multiple inheritance here… |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
… and again, Windows: https://ci.nodejs.org/job/node-test-commit-windows-fanned/21229/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in d527dde |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
For all classes descending from `AsyncWrap`, use JS inheritance instead of manually adding methods to the individual classes. This allows cleanup of some code around transferring handles over IPC. PR-URL: #23094 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]>
For all classes descending from `AsyncWrap`, use JS inheritance instead of manually adding methods to the individual classes. This allows cleanup of some code around transferring handles over IPC. PR-URL: nodejs#23094 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]>
For all classes descending from `AsyncWrap`, use JS inheritance instead of manually adding methods to the individual classes. This allows cleanup of some code around transferring handles over IPC. Backport-PR-URL: #23247 PR-URL: #23094 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]>
For all classes descending from `AsyncWrap`, use JS inheritance instead of manually adding methods to the individual classes. This allows cleanup of some code around transferring handles over IPC. Backport-PR-URL: #23247 PR-URL: #23094 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]>
For all classes descending from `AsyncWrap`, use JS inheritance instead of manually adding methods to the individual classes. This allows cleanup of some code around transferring handles over IPC. PR-URL: #23094 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.