Skip to content
This repository was archived by the owner on Aug 31, 2018. It is now read-only.

worker: apply some preparations to Ayo’s internals#82

Merged
addaleax merged 6 commits intoayojs:latestfrom
addaleax:workers-impl-precommit
Sep 27, 2017
Merged

worker: apply some preparations to Ayo’s internals#82
addaleax merged 6 commits intoayojs:latestfrom
addaleax:workers-impl-precommit

Conversation

@addaleax
Copy link
Copy Markdown
Contributor

This simply picks a few commits from #58 for easier review.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@addaleax addaleax force-pushed the workers-impl-precommit branch from 5dced6b to 8757c27 Compare September 26, 2017 22:28
addaleax added a commit to addaleax/ayo that referenced this pull request Sep 26, 2017
This makes some of the internal `AsyncWrap::MakeCallback()`
utility wrappers throw rather than crash the process when
the requested method is not present on the `this` object.

Doing so makes it easier for future code to expose C++
objects directly to userland, where JS code can overwrite
or delete such methods.

PR-URL: ayojs#82
addaleax added a commit to addaleax/ayo that referenced this pull request Sep 26, 2017
Previously, the `Environment` destructor did not release its
`fs_stats_field_array` memory. The memory is allocated when the
`fs` module is initialized and calls `GetStatValues()`.

PR-URL: ayojs#82
addaleax added a commit to addaleax/ayo that referenced this pull request Sep 26, 2017
addaleax added a commit to addaleax/ayo that referenced this pull request Sep 26, 2017
This adds pairs of methods to the `Environment` class and to public APIs
which can add and remove cleanup handlers.

Unlike `AtExit`, this API targets addon developers rather than
embedders, giving them (and Node’s internals) the ability to register
per-`Environment` cleanup work.

PR-URL: ayojs#82
addaleax added a commit to addaleax/ayo that referenced this pull request Sep 26, 2017
addaleax added a commit to addaleax/ayo that referenced this pull request Sep 26, 2017
This makes some of the internal `AsyncWrap::MakeCallback()`
utility wrappers throw rather than crash the process when
the requested method is not present on the `this` object.

Doing so makes it easier for future code to expose C++
objects directly to userland, where JS code can overwrite
or delete such methods.

PR-URL: ayojs#82
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Previously, the `Environment` destructor did not release its
`fs_stats_field_array` memory. The memory is allocated when the
`fs` module is initialized and calls `GetStatValues()`.

PR-URL: ayojs#82
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: ayojs#82
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
This adds pairs of methods to the `Environment` class and to public APIs
which can add and remove cleanup handlers.

Unlike `AtExit`, this API targets addon developers rather than
embedders, giving them (and Node’s internals) the ability to register
per-`Environment` cleanup work.

PR-URL: ayojs#82
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: ayojs#82
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: ayojs#82
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
@addaleax addaleax force-pushed the workers-impl-precommit branch from 8757c27 to 55e7e61 Compare September 27, 2017 19:37
@addaleax addaleax merged commit 55e7e61 into ayojs:latest Sep 27, 2017
@addaleax addaleax deleted the workers-impl-precommit branch September 27, 2017 20:39
jasnell pushed a commit to jasnell/node that referenced this pull request Oct 1, 2017
Original PR: ayojs/ayo#82

> This makes some of the internal `AsyncWrap::MakeCallback()`
> utility wrappers throw rather than crash the process when
> the requested method is not present on the `this` object.

> Doing so makes it easier for future code to expose C++
> objects directly to userland, where JS code can overwrite
> or delete such methods.

> PR-URL: ayojs/ayo#82
> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
jasnell pushed a commit to jasnell/node that referenced this pull request Oct 1, 2017
Original PR: ayojs/ayo#82

> Previously, the `Environment` destructor did not release its
> `fs_stats_field_array` memory. The memory is allocated when the
> `fs` module is initialized and calls `GetStatValues()`.

> PR-URL: ayojs/ayo#82
> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
jasnell pushed a commit to jasnell/node that referenced this pull request Oct 1, 2017
Original PR: ayojs/ayo#82
> PR-URL: ayojs/ayo#82
> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
jasnell pushed a commit to jasnell/node that referenced this pull request Oct 1, 2017
Original PR: ayojs/ayo#82

> This adds pairs of methods to the `Environment` class and to public APIs
> which can add and remove cleanup handlers.

> Unlike `AtExit`, this API targets addon developers rather than
> embedders, giving them (and Node’s internals) the ability to register
> per-`Environment` cleanup work.

> PR-URL: ayojs/ayo#82
> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
jasnell pushed a commit to jasnell/node that referenced this pull request Oct 1, 2017
Original PR: ayojs/ayo#82

> PR-URL: ayojs/ayo#82
> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
jasnell pushed a commit to jasnell/node that referenced this pull request Oct 1, 2017
Original PR: ayojs/ayo#82

> PR-URL: ayojs/ayo#82
> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
@addaleax addaleax added the worker label Oct 8, 2017
addaleax added a commit to addaleax/node that referenced this pull request Mar 18, 2018
This adds pairs of methods to the `Environment` class and to public APIs
which can add and remove cleanup handlers.

Unlike `AtExit`, this API targets addon developers rather than
embedders, giving them (and Node’s internals) the ability to register
per-`Environment` cleanup work.

We may want to replace `AtExit` with this API at some point.

Many thanks for Stephen Belanger for reviewing the original version of
this commit in the Ayo.js project.

Refs: ayojs/ayo#82
addaleax added a commit to addaleax/node that referenced this pull request Mar 18, 2018
This prevents calls back into JS from the shutdown phase.

Many thanks for Stephen Belanger for reviewing the original version of
this commit in the Ayo.js project.

Refs: ayojs/ayo#82
addaleax added a commit to addaleax/node that referenced this pull request Apr 21, 2018
This adds pairs of methods to the `Environment` class and to public APIs
which can add and remove cleanup handlers.

Unlike `AtExit`, this API targets addon developers rather than
embedders, giving them (and Node’s internals) the ability to register
per-`Environment` cleanup work.

We may want to replace `AtExit` with this API at some point.

Many thanks for Stephen Belanger for reviewing the original version of
this commit in the Ayo.js project.

Refs: ayojs/ayo#82
addaleax added a commit to addaleax/node that referenced this pull request Apr 21, 2018
This prevents calls back into JS from the shutdown phase.

Many thanks for Stephen Belanger for reviewing the original version of
this commit in the Ayo.js project.

Refs: ayojs/ayo#82
addaleax added a commit to addaleax/node that referenced this pull request Apr 27, 2018
This adds pairs of methods to the `Environment` class and to public APIs
which can add and remove cleanup handlers.

Unlike `AtExit`, this API targets addon developers rather than
embedders, giving them (and Node’s internals) the ability to register
per-`Environment` cleanup work.

We may want to replace `AtExit` with this API at some point.

Many thanks for Stephen Belanger for reviewing the original version of
this commit in the Ayo.js project.

Refs: ayojs/ayo#82
addaleax added a commit to addaleax/node that referenced this pull request Apr 27, 2018
This prevents calls back into JS from the shutdown phase.

Many thanks for Stephen Belanger for reviewing the original version of
this commit in the Ayo.js project.

Refs: ayojs/ayo#82
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants