<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node.git/src/pipe_wrap.h, branch master</title>
<subtitle>github.com: joyent/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/'/>
<entry>
<title>async-wrap: explicitly pass parent</title>
<updated>2014-12-05T12:57:01+00:00</updated>
<author>
<name>Trevor Norris</name>
<email>trev.norris@gmail.com</email>
</author>
<published>2014-11-17T20:54:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=419f18d2e245405b839e7441e5f59bc08e9c8d6c'/>
<id>419f18d2e245405b839e7441e5f59bc08e9c8d6c</id>
<content type='text'>
When instantiating a new AsyncWrap allow the parent AsyncWrap to be
passed. This is useful for cases like TCP incoming connections, so the
connection can be tied to the server receiving the connection.

Because the current architecture instantiates the *Wrap inside a
v8::FunctionCallback, the parent pointer is currently wrapped inside a
new v8::External every time and passed as an argument. This adds ~80ns
to instantiation time.

A future optimization would be to add the v8::External as the data field
when creating the v8::FunctionTemplate, change the pointer just before
making the call then NULL'ing it out afterwards. This adds enough code
complexity that it will not be attempted until the current approach
demonstrates it is a bottle neck.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris &lt;trev.norris@gmail.com&gt;
Reviewed-by: Fedor Indutny &lt;fedor@indutny.com&gt;
Reviewed-by: Alexis Campailla &lt;alexis@janeasystems.com&gt;
Reviewed-by: Julien Gilli &lt;julien.gilli@joyent.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When instantiating a new AsyncWrap allow the parent AsyncWrap to be
passed. This is useful for cases like TCP incoming connections, so the
connection can be tied to the server receiving the connection.

Because the current architecture instantiates the *Wrap inside a
v8::FunctionCallback, the parent pointer is currently wrapped inside a
new v8::External every time and passed as an argument. This adds ~80ns
to instantiation time.

A future optimization would be to add the v8::External as the data field
when creating the v8::FunctionTemplate, change the pointer just before
making the call then NULL'ing it out afterwards. This adds enough code
complexity that it will not be attempted until the current approach
demonstrates it is a bottle neck.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris &lt;trev.norris@gmail.com&gt;
Reviewed-by: Fedor Indutny &lt;fedor@indutny.com&gt;
Reviewed-by: Alexis Campailla &lt;alexis@janeasystems.com&gt;
Reviewed-by: Julien Gilli &lt;julien.gilli@joyent.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: don't use class specific Unwrap methods</title>
<updated>2013-10-29T22:09:44+00:00</updated>
<author>
<name>Trevor Norris</name>
<email>trev.norris@gmail.com</email>
</author>
<published>2013-10-29T20:09:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=f2e3be53bc33fc9269c248cec4ac26d6ec9054f7'/>
<id>f2e3be53bc33fc9269c248cec4ac26d6ec9054f7</id>
<content type='text'>
Instead use the template functions in util.h.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead use the template functions in util.h.
</pre>
</div>
</content>
</entry>
<entry>
<title>src: add multi-context support</title>
<updated>2013-09-06T03:51:42+00:00</updated>
<author>
<name>Ben Noordhuis</name>
<email>info@bnoordhuis.nl</email>
</author>
<published>2013-08-10T22:26:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=756b6222956b5d25b2e7db81f4e79033a3a4d20e'/>
<id>756b6222956b5d25b2e7db81f4e79033a3a4d20e</id>
<content type='text'>
This commit makes it possible to use multiple V8 execution contexts
within a single event loop.  Put another way, handle and request wrap
objects now "remember" the context they belong to and switch back to
that context when the time comes to call into JS land.

This could have been done in a quick and hacky way by calling
v8::Object::GetCreationContext() on the wrap object right before
making a callback but that leaves a fairly wide margin for bugs.

Instead, we make the context explicit through a new Environment class
that encapsulates everything (or almost everything) that belongs to
the context.  Variables that used to be a static or a global are now
members of the aforementioned class.  An additional benefit is that
this approach should make it relatively straightforward to add full
isolate support in due course.

There is no JavaScript API yet but that will be added in the near
future.

This work was graciously sponsored by GitHub, Inc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit makes it possible to use multiple V8 execution contexts
within a single event loop.  Put another way, handle and request wrap
objects now "remember" the context they belong to and switch back to
that context when the time comes to call into JS land.

This could have been done in a quick and hacky way by calling
v8::Object::GetCreationContext() on the wrap object right before
making a callback but that leaves a fairly wide margin for bugs.

Instead, we make the context explicit through a new Environment class
that encapsulates everything (or almost everything) that belongs to
the context.  Variables that used to be a static or a global are now
members of the aforementioned class.  An additional benefit is that
this approach should make it relatively straightforward to add full
isolate support in due course.

There is no JavaScript API yet but that will be added in the near
future.

This work was graciously sponsored by GitHub, Inc.
</pre>
</div>
</content>
</entry>
<entry>
<title>src: lint c++ code</title>
<updated>2013-07-31T18:12:06+00:00</updated>
<author>
<name>Fedor Indutny</name>
<email>fedor.indutny@gmail.com</email>
</author>
<published>2013-07-31T18:07:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=8e29ce9f13f7e4b6c0296325287c05f78ff22ce0'/>
<id>8e29ce9f13f7e4b6c0296325287c05f78ff22ce0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>lib, src: upgrade after v8 api change</title>
<updated>2013-07-06T15:44:44+00:00</updated>
<author>
<name>Ben Noordhuis</name>
<email>info@bnoordhuis.nl</email>
</author>
<published>2013-07-03T02:23:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=110a9cd8db515c4d1a9ac5cd8837291da7c6c5ea'/>
<id>110a9cd8db515c4d1a9ac5cd8837291da7c6c5ea</id>
<content type='text'>
This is a big commit that touches just about every file in the src/
directory. The V8 API has changed in significant ways. The most
important changes are:

* Binding functions take a const v8::FunctionCallbackInfo&lt;T&gt;&amp; argument
  rather than a const v8::Arguments&amp; argument.

* Binding functions return void rather than v8::Handle&lt;v8::Value&gt;. The
  return value is returned with the args.GetReturnValue().Set() family
  of functions.

* v8::Persistent&lt;T&gt; no longer derives from v8::Handle&lt;T&gt; and no longer
  allows you to directly dereference the object that the persistent
  handle points to. This means that the common pattern of caching
  oft-used JS values in a persistent handle no longer quite works,
  you first need to reconstruct a v8::Local&lt;T&gt; from the persistent
  handle with the Local&lt;T&gt;::New(isolate, persistent) factory method.

A handful of (internal) convenience classes and functions have been
added to make dealing with the new API a little easier.

The most visible one is node::Cached&lt;T&gt;, which wraps a v8::Persistent&lt;T&gt;
with some template sugar. It can hold arbitrary types but so far it's
exclusively used for v8::Strings (which was by far the most commonly
cached handle type.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a big commit that touches just about every file in the src/
directory. The V8 API has changed in significant ways. The most
important changes are:

* Binding functions take a const v8::FunctionCallbackInfo&lt;T&gt;&amp; argument
  rather than a const v8::Arguments&amp; argument.

* Binding functions return void rather than v8::Handle&lt;v8::Value&gt;. The
  return value is returned with the args.GetReturnValue().Set() family
  of functions.

* v8::Persistent&lt;T&gt; no longer derives from v8::Handle&lt;T&gt; and no longer
  allows you to directly dereference the object that the persistent
  handle points to. This means that the common pattern of caching
  oft-used JS values in a persistent handle no longer quite works,
  you first need to reconstruct a v8::Local&lt;T&gt; from the persistent
  handle with the Local&lt;T&gt;::New(isolate, persistent) factory method.

A handful of (internal) convenience classes and functions have been
added to make dealing with the new API a little easier.

The most visible one is node::Cached&lt;T&gt;, which wraps a v8::Persistent&lt;T&gt;
with some template sugar. It can hold arbitrary types but so far it's
exclusively used for v8::Strings (which was by far the most commonly
cached handle type.)
</pre>
</div>
</content>
</entry>
<entry>
<title>process: abstract out HandleToStream</title>
<updated>2013-06-15T19:44:50+00:00</updated>
<author>
<name>Fedor Indutny</name>
<email>fedor.indutny@gmail.com</email>
</author>
<published>2013-06-11T10:52:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=6978e998ee7c08b3dd10e4cecd2a167696b74317'/>
<id>6978e998ee7c08b3dd10e4cecd2a167696b74317</id>
<content type='text'>
Originally contributed by @tjfontaine, but modified to be faster and
more generic.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Originally contributed by @tjfontaine, but modified to be faster and
more generic.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: use proper #include directives</title>
<updated>2012-03-09T23:14:14+00:00</updated>
<author>
<name>Ben Noordhuis</name>
<email>info@bnoordhuis.nl</email>
</author>
<published>2012-03-09T23:11:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=ff4a9d381d2c77d1e074f9886c71003d5b7db25f'/>
<id>ff4a9d381d2c77d1e074f9886c71003d5b7db25f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster: support passing of named pipes</title>
<updated>2012-03-09T17:42:13+00:00</updated>
<author>
<name>Ben Noordhuis</name>
<email>info@bnoordhuis.nl</email>
</author>
<published>2012-03-09T17:20:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=296b7a580b106ce07c7d5fc3018c9f05dc3fb70d'/>
<id>296b7a580b106ce07c7d5fc3018c9f05dc3fb70d</id>
<content type='text'>
Fixes triggered assertion:

  Assertion failed: (0 &amp;&amp; "bad address family"), function GetPeerName,
  file ../src/tcp_wrap.cc, line 237.

Fixes #2870.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes triggered assertion:

  Assertion failed: (0 &amp;&amp; "bad address family"), function GetPeerName,
  file ../src/tcp_wrap.cc, line 237.

Fixes #2870.
</pre>
</div>
</content>
</entry>
<entry>
<title>binding for uv_pipe_pending_instances</title>
<updated>2011-12-01T21:57:47+00:00</updated>
<author>
<name>Igor Zinkovsky</name>
<email>igorzi@microsoft.com</email>
</author>
<published>2011-12-01T21:24:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=99c9d19184fdd46ae88464d7a608aac57a530634'/>
<id>99c9d19184fdd46ae88464d7a608aac57a530634</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing copyright headers</title>
<updated>2011-11-02T17:00:57+00:00</updated>
<author>
<name>Ryan Dahl</name>
<email>ry@tinyclouds.org</email>
</author>
<published>2011-11-02T17:00:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=60818b957c1ee932a43750f6e2163125ba70a0e1'/>
<id>60818b957c1ee932a43750f6e2163125ba70a0e1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
