<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node.git/src/smalloc.cc, branch buf-compare-normalize</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>buffer: truncate buffer after string decode</title>
<updated>2014-04-10T21:20:43+00:00</updated>
<author>
<name>Fedor Indutny</name>
<email>fedor.indutny@gmail.com</email>
</author>
<published>2014-03-27T17:45:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=4c36f3e7e6108660fc3629d76036e40c1938f639'/>
<id>4c36f3e7e6108660fc3629d76036e40c1938f639</id>
<content type='text'>
When our estimates for a storage size are higher than the actual length
of decoded data, the destination buffer should be truncated. Otherwise
`Buffer::Length` will give misleading information to C++ layer.

fix #7365

Signed-off-by: Fedor Indutny &lt;fedor@indutny.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When our estimates for a storage size are higher than the actual length
of decoded data, the destination buffer should be truncated. Otherwise
`Buffer::Length` will give misleading information to C++ layer.

fix #7365

Signed-off-by: Fedor Indutny &lt;fedor@indutny.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: fix up smalloc weak persistent usage</title>
<updated>2014-03-16T12:15:34+00:00</updated>
<author>
<name>Ben Noordhuis</name>
<email>info@bnoordhuis.nl</email>
</author>
<published>2014-03-15T00:12:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=e87ceb2b427a9b51a55af5898c2ef24b4cc08af2'/>
<id>e87ceb2b427a9b51a55af5898c2ef24b4cc08af2</id>
<content type='text'>
Fix a regression that was introduced in commit ce04c726 after the
upgrade to V8 3.24.

The new weak persistent handle API no longer gives you the original
persistent but still requires that you clear it inside your weak
callback.

Rearrange the code in src/smalloc.cc to keep track of the persistent
handle with the least amount of pain and try hard to share as much
code as possible between the 'just free it' and 'invoke my callback'
versions of the smalloc API.

Fixes #7309.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a regression that was introduced in commit ce04c726 after the
upgrade to V8 3.24.

The new weak persistent handle API no longer gives you the original
persistent but still requires that you clear it inside your weak
callback.

Rearrange the code in src/smalloc.cc to keep track of the persistent
handle with the least amount of pain and try hard to share as much
code as possible between the 'just free it' and 'invoke my callback'
versions of the smalloc API.

Fixes #7309.
</pre>
</div>
</content>
</entry>
<entry>
<title>src: fix segfaults, fix 32 bits integer negation</title>
<updated>2014-03-16T12:15:33+00:00</updated>
<author>
<name>Ben Noordhuis</name>
<email>info@bnoordhuis.nl</email>
</author>
<published>2014-03-14T22:22:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=f6ea0c203aa08c4817c7739461f8e7015d390279'/>
<id>f6ea0c203aa08c4817c7739461f8e7015d390279</id>
<content type='text'>
Make calls to v8::Isolate::AdjustAmountOfExternalAllocatedMemory() take
special care when negating 32 bits unsigned types like size_t.

Before this commit, values were negated before they got promoted to
64 bits, meaning that on 32 bits architectures, a value like 42 got
cast to 4294967254 instead of -42.

That in turn made the garbage collector start scavenging like crazy
because it thought the system was out of memory.

That's bad enough but calls to AdjustAmountOfExternalAllocatedMemory()
were made from weak callbacks, i.e. at a time when the garbage collector
was already busy.  It triggered asserts in debug builds and caused
random crashes and memory corruption in release builds.

The behavior in release builds is arguably a V8 bug and should perhaps
be reported upstream.

Partially fixes #7309 but requires further bug fixes to src/smalloc.cc
that I'll address in a follow-up commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make calls to v8::Isolate::AdjustAmountOfExternalAllocatedMemory() take
special care when negating 32 bits unsigned types like size_t.

Before this commit, values were negated before they got promoted to
64 bits, meaning that on 32 bits architectures, a value like 42 got
cast to 4294967254 instead of -42.

That in turn made the garbage collector start scavenging like crazy
because it thought the system was out of memory.

That's bad enough but calls to AdjustAmountOfExternalAllocatedMemory()
were made from weak callbacks, i.e. at a time when the garbage collector
was already busy.  It triggered asserts in debug builds and caused
random crashes and memory corruption in release builds.

The behavior in release builds is arguably a V8 bug and should perhaps
be reported upstream.

Partially fixes #7309 but requires further bug fixes to src/smalloc.cc
that I'll address in a follow-up commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>src: update to v8 3.24 APIs</title>
<updated>2014-03-13T16:56:55+00:00</updated>
<author>
<name>Fedor Indutny</name>
<email>fedor.indutny@gmail.com</email>
</author>
<published>2014-03-13T16:38:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=ce04c726a31cd13be131915b1c8b8bc7a00a4d24'/>
<id>ce04c726a31cd13be131915b1c8b8bc7a00a4d24</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove `node_isolate` from source</title>
<updated>2014-02-21T23:20:56+00:00</updated>
<author>
<name>Fedor Indutny</name>
<email>fedor.indutny@gmail.com</email>
</author>
<published>2014-02-21T13:02:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=75adde07f9a2de7f38a67bec72bd377d450bdb52'/>
<id>75adde07f9a2de7f38a67bec72bd377d450bdb52</id>
<content type='text'>
fix #6899
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix #6899
</pre>
</div>
</content>
</entry>
<entry>
<title>node: register modules from DSO constructors</title>
<updated>2014-01-27T23:52:50+00:00</updated>
<author>
<name>Keith M Wesolowski</name>
<email>wesolows@foobazco.org</email>
</author>
<published>2013-12-17T00:00:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=76b98462e589a69d9fd48ccb9fb5f6e96b539715'/>
<id>76b98462e589a69d9fd48ccb9fb5f6e96b539715</id>
<content type='text'>
Built-in modules should be automatically registered, replacing the
static module list.  Add-on modules should also be automatically
registered via DSO constructors.  This improves flexibility in adding
built-in modules and is also a prerequisite to pure-C addon modules.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Built-in modules should be automatically registered, replacing the
static module list.  Add-on modules should also be automatically
registered via DSO constructors.  This improves flexibility in adding
built-in modules and is also a prerequisite to pure-C addon modules.
</pre>
</div>
</content>
</entry>
<entry>
<title>smalloc: check if object has external memory</title>
<updated>2013-11-13T23:29:50+00:00</updated>
<author>
<name>Trevor Norris</name>
<email>trev.norris@gmail.com</email>
</author>
<published>2013-11-13T22:51:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=c414ec1c2cdff8111a60f62f445011708bfd81ba'/>
<id>c414ec1c2cdff8111a60f62f445011708bfd81ba</id>
<content type='text'>
Add HasExternalData API to check if Object has externally allocated
memory, and accompanying tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add HasExternalData API to check if Object has externally allocated
memory, and accompanying tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>src: fix Environment::GetCurrent() usage</title>
<updated>2013-11-11T09:40:28+00:00</updated>
<author>
<name>Ben Noordhuis</name>
<email>info@bnoordhuis.nl</email>
</author>
<published>2013-11-11T21:02:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=09724b311ee44e6c7998c7a5cb39e739609eba66'/>
<id>09724b311ee44e6c7998c7a5cb39e739609eba66</id>
<content type='text'>
Create a HandleScope before calling the Environment::GetCurrent() that
takes a v8::Isolate* as an argument because it creates a handle with
the call to v8::Isolate::CurrentContext().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a HandleScope before calling the Environment::GetCurrent() that
takes a v8::Isolate* as an argument because it creates a handle with
the call to v8::Isolate::CurrentContext().
</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>smalloc: consistent-ify syntax</title>
<updated>2013-08-20T20:33:50+00:00</updated>
<author>
<name>Trevor Norris</name>
<email>trev.norris@gmail.com</email>
</author>
<published>2013-08-20T17:55:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=849cf1aa92532339ab78f5a3852cac2e7b4309cb'/>
<id>849cf1aa92532339ab78f5a3852cac2e7b4309cb</id>
<content type='text'>
Small syntax fixes of variable renaming and argument alignment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Small syntax fixes of variable renaming and argument alignment.
</pre>
</div>
</content>
</entry>
</feed>
