<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/src/node_dir.cc, branch sam-github-tsc</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>src: remove unused using declarations</title>
<updated>2020-05-28T14:02:14+00:00</updated>
<author>
<name>Daniel Bevenius</name>
<email>daniel.bevenius@gmail.com</email>
</author>
<published>2020-05-26T06:48:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=4a20cc937f6a2b830a2752e35da7e389bbc4e006'/>
<id>4a20cc937f6a2b830a2752e35da7e389bbc4e006</id>
<content type='text'>
This commit removes the unused using declarations reported by lint-cpp.

PR-URL: https://github.com/nodejs/node/pull/33268
Refs: https://github.com/nodejs/node/issues/29226
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Christian Clauss &lt;cclauss@me.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: Beth Griggs &lt;Bethany.Griggs@uk.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit removes the unused using declarations reported by lint-cpp.

PR-URL: https://github.com/nodejs/node/pull/33268
Refs: https://github.com/nodejs/node/issues/29226
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Christian Clauss &lt;cclauss@me.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: Beth Griggs &lt;Bethany.Griggs@uk.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: use enum for refed flag on native immediates</title>
<updated>2020-05-22T00:47:56+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2020-05-17T05:13:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=b6b82cba27da9ef83bfef67cac9d3593bd72c0e2'/>
<id>b6b82cba27da9ef83bfef67cac9d3593bd72c0e2</id>
<content type='text'>
Refs: https://github.com/nodejs/node/pull/33320#discussion_r423141443

PR-URL: https://github.com/nodejs/node/pull/33444
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Zeyu Yang &lt;himself65@outlook.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refs: https://github.com/nodejs/node/pull/33320#discussion_r423141443

PR-URL: https://github.com/nodejs/node/pull/33444
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Zeyu Yang &lt;himself65@outlook.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: clean up Dir.read() uv_fs_t data before calling into JS</title>
<updated>2020-05-15T17:36:48+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2020-05-06T23:30:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=e9f293750760d59243020d0376edf242c9a26b67'/>
<id>e9f293750760d59243020d0376edf242c9a26b67</id>
<content type='text'>
A call into JS can schedule another operation on the same `uv_dir_t`.
In particular, when the handle is closed from the callback for a
directory read operation, there previously was a race condition window:

1. A `dir.read()` operation is submitted to libuv
2. The read operation is finished by libuv, calling `AfterDirRead()`
3. We call into JS
4. JS calls dir.close()
5. libuv posts the close request to a thread in the pool
6. The close request runs, destroying the directory handle
7. `AfterDirRead()` is being exited.

Exiting the `FSReqAfterScope` in step 7 attempts to destroy the original
uv_fs_t` from step 1, which now points to an `uv_dir_t` that has
already been destroyed in step 5.

By forcing the `FSReqAfterScope` to clean up before we call into JS,
we can be sure that no other operations on the same `uv_dir_t` are
submitted concurrently.

This addresses issues observed when running with ASAN/valgrind.

PR-URL: https://github.com/nodejs/node/pull/33274
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A call into JS can schedule another operation on the same `uv_dir_t`.
In particular, when the handle is closed from the callback for a
directory read operation, there previously was a race condition window:

1. A `dir.read()` operation is submitted to libuv
2. The read operation is finished by libuv, calling `AfterDirRead()`
3. We call into JS
4. JS calls dir.close()
5. libuv posts the close request to a thread in the pool
6. The close request runs, destroying the directory handle
7. `AfterDirRead()` is being exited.

Exiting the `FSReqAfterScope` in step 7 attempts to destroy the original
uv_fs_t` from step 1, which now points to an `uv_dir_t` that has
already been destroyed in step 5.

By forcing the `FSReqAfterScope` to clean up before we call into JS,
we can be sure that no other operations on the same `uv_dir_t` are
submitted concurrently.

This addresses issues observed when running with ASAN/valgrind.

PR-URL: https://github.com/nodejs/node/pull/33274
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: move fs state out of Environment</title>
<updated>2020-04-06T00:06:43+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-03-05T02:02:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=f4c2dff4e61570e6b8512f2a41ac2d17c2473a5e'/>
<id>f4c2dff4e61570e6b8512f2a41ac2d17c2473a5e</id>
<content type='text'>
Moves state that is specific to the `fs` binding into the
`fs` binding implementation as a cleanup.

PR-URL: https://github.com/nodejs/node/pull/32538
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Moves state that is specific to the `fs` binding into the
`fs` binding implementation as a cleanup.

PR-URL: https://github.com/nodejs/node/pull/32538
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: improve handling of internal field counting</title>
<updated>2020-03-02T18:58:36+00:00</updated>
<author>
<name>James M Snell</name>
<email>jasnell@gmail.com</email>
</author>
<published>2020-02-25T22:37:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=0fac393d263fc7e2f4f054c9d4aab0c1c3cf00c8'/>
<id>0fac393d263fc7e2f4f054c9d4aab0c1c3cf00c8</id>
<content type='text'>
Change suggested by bnoordhuis.

Improve handing of internal field counting by using enums.
Helps protect against future possible breakage if field
indexes are ever changed or added to.

Signed-off-by: James M Snell &lt;jasnell@gmail.com&gt;

PR-URL: https://github.com/nodejs/node/pull/31960
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Franziska Hinkelmann &lt;franziska.hinkelmann@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change suggested by bnoordhuis.

Improve handing of internal field counting by using enums.
Helps protect against future possible breakage if field
indexes are ever changed or added to.

Signed-off-by: James M Snell &lt;jasnell@gmail.com&gt;

PR-URL: https://github.com/nodejs/node/pull/31960
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Franziska Hinkelmann &lt;franziska.hinkelmann@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove redundant cast in node_dir.cc</title>
<updated>2019-12-03T22:21:14+00:00</updated>
<author>
<name>gengjiawen</name>
<email>technicalcute@gmail.com</email>
</author>
<published>2019-12-01T07:30:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1d0c3e3188c2e7906eb4ac072d36079c1ba0f334'/>
<id>1d0c3e3188c2e7906eb4ac072d36079c1ba0f334</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/30747
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/30747
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: fix node_dir.cc memory allocation</title>
<updated>2019-12-03T22:19:14+00:00</updated>
<author>
<name>Priyanka Kore</name>
<email>piyukore06@gmail.com</email>
</author>
<published>2019-12-01T12:41:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=efd6775a509734de5feae5d62c045f3cd2231841'/>
<id>efd6775a509734de5feae5d62c045f3cd2231841</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/30750
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/30750
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: clean up node_file.h</title>
<updated>2019-11-30T08:51:06+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-11-18T13:49:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=52a3e3560484ec3ad4479ef80d829f7c99d39e80'/>
<id>52a3e3560484ec3ad4479ef80d829f7c99d39e80</id>
<content type='text'>
- Move inline functions into an `-inl.h` file
- Move override function definitions into `.cc` files
- Remove `using` statements from header files
- Make data fields of classes private
- Mark classes at the end of hierarchies as `final`

This is also partially being done in an attempt to avoid
a particular internal compiler error, see
https://github.com/nodejs/node/pull/30475#issuecomment-554740850
for details.

PR-URL: https://github.com/nodejs/node/pull/30530
Reviewed-By: Jiawen Geng &lt;technicalcute@gmail.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Move inline functions into an `-inl.h` file
- Move override function definitions into `.cc` files
- Remove `using` statements from header files
- Make data fields of classes private
- Mark classes at the end of hierarchies as `final`

This is also partially being done in an attempt to avoid
a particular internal compiler error, see
https://github.com/nodejs/node/pull/30475#issuecomment-554740850
for details.

PR-URL: https://github.com/nodejs/node/pull/30530
Reviewed-By: Jiawen Geng &lt;technicalcute@gmail.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove unused variable in node_dir.cc</title>
<updated>2019-11-30T08:39:08+00:00</updated>
<author>
<name>gengjiawen</name>
<email>technicalcute@gmail.com</email>
</author>
<published>2019-11-05T15:40:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=6c4cf862d0f17be7a4113d720567d3ce8f2d6fac'/>
<id>6c4cf862d0f17be7a4113d720567d3ce8f2d6fac</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/30267
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/30267
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: add `bufferSize` option to `fs.opendir()`</title>
<updated>2019-10-28T13:34:25+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-10-25T14:17:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=b35181f877d5a92e8bb52eb071489f2a7d87494b'/>
<id>b35181f877d5a92e8bb52eb071489f2a7d87494b</id>
<content type='text'>
Add an option that controls the size of the internal
buffer.

Fixes: https://github.com/nodejs/node/issues/29941

PR-URL: https://github.com/nodejs/node/pull/30114
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an option that controls the size of the internal
buffer.

Fixes: https://github.com/nodejs/node/issues/29941

PR-URL: https://github.com/nodejs/node/pull/30114
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
