Ben Noordhuis [Fri, 2 Aug 2013 21:12:56 +0000 (23:12 +0200)]
src: remove non-isolate PersistentToLocal()
There is no need for it and it's a tiny bit slower than the version of
PersistentToLocal() that takes a v8::Isolate* as its first argument.
Trevor Norris [Fri, 2 Aug 2013 20:00:54 +0000 (13:00 -0700)]
smalloc: remove double checks
Now that values are checks in JS, no need for them to be checked in C++.
Trevor Norris [Fri, 2 Aug 2013 19:52:43 +0000 (12:52 -0700)]
smalloc: fix assertion fails/segfault
* Numeric values passed to alloc were converted to int32, not uint32
before the range check, which allows wrap around on ToUint32. This
would cause massive malloc calls and v8 fatal errors.
* dispose would not check if value was an Object, causing segfault if a
Primitive was passed.
* kMaxLength was not enumerable.
Trevor Norris [Fri, 2 Aug 2013 19:52:34 +0000 (12:52 -0700)]
util: add isPrimitive check
Ben Noordhuis [Fri, 2 Aug 2013 11:52:20 +0000 (13:52 +0200)]
build: fix --without-ssl build
Build breakage accidentally introduced in 8e29ce9 during code cleanup.
HAVE_OPENSSL is always defined (as either 0 or 1) so use #if rather
than #ifdef.
Fixes #5979.
isaacs [Fri, 26 Jul 2013 21:38:08 +0000 (14:38 -0700)]
src: Replace macros with util functions
Trevor Norris [Thu, 1 Aug 2013 22:02:38 +0000 (15:02 -0700)]
benchmark: update misc to new v8 API
Trevor Norris [Thu, 1 Aug 2013 20:53:19 +0000 (13:53 -0700)]
test: add mac to test-os
Fix test from 30701d6.
Fedor Indutny [Sun, 21 Jul 2013 16:16:26 +0000 (23:16 +0700)]
tls_wrap: parse tls session ticket extension
And, if present and non-empty, don't invoke `resumeSession` callback.
fix #5872
Brian White [Wed, 31 Jul 2013 23:13:36 +0000 (19:13 -0400)]
os: add mac address to networkInterfaces() output
Ben Noordhuis [Thu, 1 Aug 2013 10:33:33 +0000 (12:33 +0200)]
cpplint: exclude src/node_win32_perfctr_provider.cc
It's forced to violate the build/include_order rule because it includes
a header file generated with ctrpp.exe that doesn't include perflib.h
itself.
Ben Noordhuis [Thu, 1 Aug 2013 10:26:23 +0000 (12:26 +0200)]
src: don't include <string.h> twice in src/node.cc
Bert Belder [Thu, 1 Aug 2013 09:53:41 +0000 (11:53 +0200)]
build: disable some msvc compiler warnings
These are not real problems, and they are so plenty that actual problems
are hidden from view.
Bert Belder [Thu, 1 Aug 2013 09:39:25 +0000 (11:39 +0200)]
build: un-break the windows build
Ben Noordhuis [Wed, 31 Jul 2013 21:16:08 +0000 (23:16 +0200)]
src: more lint after cpplint tightening
Commit 847c6d9 adds a 'project headers before system headers' check
to cpplint. Update the files in src/ to make the linter pass again.
Ben Noordhuis [Wed, 31 Jul 2013 20:34:34 +0000 (22:34 +0200)]
tools: cpplint: fix up build/include_order rule
Change the build/include_order rule to match our preference:
project headers before system headers.
The rationale is that system headers before project headers makes it
easy to slip in bugs where a project header that requires a definition
from a system header, forgets to include the system header but still
compiles because the source files that include the project header
coincidentally include the system header too.
A good example is the size_t type. A project header file that needs the
definition of size_t should include stddef.h but forgetting to do so
will probably go unnoticed for a long time because almost every other
system header includes stddef.h (either directly or indirectly) and
almost every source file includes one or more system headers.
Ergo, project headers before system headers. It's a good thing.
Antony Bailey [Wed, 31 Jul 2013 18:28:29 +0000 (19:28 +0100)]
doc: remove travis status image
The project has moved to Jenkins. The status image is no longer
needed and perpetually shows a failed build. Remove it.
Fedor Indutny [Wed, 31 Jul 2013 18:35:46 +0000 (22:35 +0400)]
etw_provider: unbreak windows build
Fedor Indutny [Wed, 31 Jul 2013 10:54:06 +0000 (14:54 +0400)]
make: add `cpplint` to `test` target
Also, exclude some C-headers, machine generated headers and tweaked
sources from cpplint file list.
Fedor Indutny [Wed, 31 Jul 2013 18:07:29 +0000 (22:07 +0400)]
src: lint c++ code
Fedor Indutny [Wed, 31 Jul 2013 18:05:31 +0000 (22:05 +0400)]
cpplint: make lint rules closer to node's source
* Support C-style header guards (/* comments */)
* Support `class NODE_EXTERN something`
* Support `} // extern "C"` closures
* Ignore header order
* Ignore `long/short` usage (because of OpenSSL's API)
Trevor Norris [Tue, 30 Jul 2013 22:06:45 +0000 (15:06 -0700)]
node: add inTick and lastThrew to infoBox
To prevent all unnecessary calls to JS from MakeCallback, the remaining
two immediate return variables inTick and lastThrew have been added to
infoBox. Now MakeCallback should never need to call into JS unless it
absolutely has to.
Also removed Tock. Performance tests showed it was at least as fast or
faster than using a normal object, and this is more readable.
Ben Noordhuis [Mon, 29 Jul 2013 19:00:33 +0000 (21:00 +0200)]
util: don't throw on circular %j input to format()
Don't throw an exception when the argument to %j is an object that
contains circular references, it's not helpful. Catch the exception
and return the string '[Circular]'.
Trevor Norris [Tue, 2 Jul 2013 07:27:26 +0000 (00:27 -0700)]
fs: write strings directly to disk
Prior, strings would first be converted to a Buffer before being written
to disk. Now the intermediary step has been removed.
Other changes of note:
* Class member "must_free" was added to req_wrap so to track if the
memory needs to be manually cleaned up after use.
* External String Resource support, so the memory will be used directly
instead of copying out the data.
* Docs have been updated to reflect that if position is not a number
then it will assume null. Previously it specified the argument must be
null, but that was not how the code worked. An attempt was made to
only support == null, but there were too many tests that assumed !=
number would be enough.
* Docs update show some of the write/writeSync arguments are optional.
Trevor Norris [Tue, 2 Jul 2013 07:07:47 +0000 (00:07 -0700)]
string_bytes: export GetExternalParts
The method is useful elsewhere when needing to check if external and
grab data.
Ben Noordhuis [Tue, 30 Jul 2013 21:32:53 +0000 (23:32 +0200)]
deps: upgrade libuv to joyent/libuv@4bdb7d8
Non-release upgrade so pending patches can land.
Ben Noordhuis [Mon, 29 Jul 2013 18:36:11 +0000 (20:36 +0200)]
crypto: simplify DH modp group name matcher
* Use ARRAY_SIZE() rather than scanning until we hit a NULL entry.
* Fix `-fsigned-char -Wnarrowing` compiler warnings. Harmless but
numerous and annoying.
* Static-ify the modp_group and mod_groups arrays.
* Const-ify the modp_groups array.
Ben Noordhuis [Tue, 30 Jul 2013 19:42:47 +0000 (21:42 +0200)]
src: const-ify variables in src/node_crypto*
No functional changes, just some code tightening. Clean up some style
inconsistencies while we are here.
Ben Noordhuis [Tue, 30 Jul 2013 19:32:43 +0000 (21:32 +0200)]
src: remove unused import in src/node_os.cc
Ben Noordhuis [Tue, 30 Jul 2013 19:28:43 +0000 (21:28 +0200)]
string_bytes: don't use named imports in header
It imports the definition into every source file that includes
string_bytes.h, as evidenced by the build suddenly breaking left
and right because of missing Handle/Local/String/Value imports.
Ben Noordhuis [Tue, 30 Jul 2013 15:14:55 +0000 (17:14 +0200)]
v8: upgrade v8 to 3.20.11
Ben Noordhuis [Tue, 30 Jul 2013 13:19:48 +0000 (15:19 +0200)]
Merge remote-tracking branch 'origin/v0.10'
Conflicts:
AUTHORS
ChangeLog
deps/uv/ChangeLog
deps/uv/src/version.c
deps/uv/src/win/fs.c
src/node.cc
src/node_crypto.cc
src/node_os.cc
src/node_version.h
Ben Noordhuis [Tue, 30 Jul 2013 12:27:13 +0000 (14:27 +0200)]
crypto: fix assert() on malformed hex input
Use the StringBytes::IsValidString() function introduced in commit
dce26cc to ensure that the input string meets the expectations of the
other StringBytes functions before processing it further.
Fixes the following assertion:
Assertion failed: (str->Length() % 2 == 0 && "invalid hex string
length"), function StorageSize, file ../../src/string_bytes.cc,
line 301.
Fixes #5725.
Ben Noordhuis [Tue, 30 Jul 2013 12:26:11 +0000 (14:26 +0200)]
string_bytes: add StringBytes::IsValidString()
Performs a quick, non-exhaustive check on the input string to see if
it's compatible with the specified string encoding.
Curently it only checks that hex strings have a length that is a
multiple of two.
Ben Noordhuis [Tue, 30 Jul 2013 11:28:48 +0000 (13:28 +0200)]
assert: replace !!!value with just !value
Not harmful, just code cleanup.
Fixes #5885.
Ben Noordhuis [Wed, 26 Jun 2013 22:43:23 +0000 (00:43 +0200)]
dgram: report send errors to cb, don't pass bytes
Passing the number of sent bytes to the callback is superfluous;
datagram sockets operate in atomic mode: either the sendmsg() system
call succeeds or it fails but it never does partial writes.
Instead, report send errors to the callback. UDP error reporting is
fairly haphazard on most platforms. You should not expect reliable
delivery of anything besides EMSGSIZE and (possibly) ENETDOWN and
ENETUNREACH.
Fixes #2608.
Ben Noordhuis [Mon, 29 Jul 2013 03:07:07 +0000 (05:07 +0200)]
src: don't use NewExternal() with unaligned strings
V8 3.20.9 enforces that external pointers are aligned on a two-byte
boundary.
We cannot portably guarantee that for the source code strings that
tools/js2c.py generates so simply stop using String::NewExternal()
altogether (and by extension String::ExternalAsciiStringResource).
Fixes the following run-time assert:
FATAL ERROR: v8::String::NewExternal() Pointer is not aligned
Ben Noordhuis [Mon, 29 Jul 2013 19:21:03 +0000 (21:21 +0200)]
v8: upgrade to v8 3.20.9
Andrew Paprocki [Mon, 29 Jul 2013 15:34:12 +0000 (17:34 +0200)]
doc: vm: fix incorrect API documentation
On timeout, an Error object is thrown, not null.
Ben Noordhuis [Mon, 29 Jul 2013 14:20:24 +0000 (16:20 +0200)]
child_process: add 'shell' option to .exec()
No test, we can't rely on an alternate shell being available.
Fixes #5935.
Fedor Indutny [Mon, 29 Jul 2013 09:33:01 +0000 (13:33 +0400)]
test: loosen timeout in https-no-reader
fix #5925
Ben Noordhuis [Sun, 28 Jul 2013 17:07:59 +0000 (19:07 +0200)]
src: remove unused tick_spinner
Ben Noordhuis [Sun, 28 Jul 2013 12:50:03 +0000 (14:50 +0200)]
test: cluster: add 'bind to privileged port' tests
Ben Noordhuis [Sun, 28 Jul 2013 10:19:34 +0000 (12:19 +0200)]
cluster: fix shared handle bind error propagation
A failed bind() was already being correctly reported in round-robin
mode. This commit fixes bind() error reporting in shared handle mode.
Fixes #5774.
Ben Noordhuis [Sun, 28 Jul 2013 09:36:12 +0000 (11:36 +0200)]
cluster: remove duplicate this.errno assignment
Ben Noordhuis [Sat, 27 Jul 2013 22:05:10 +0000 (00:05 +0200)]
doc: clarify fs.read() offset argument
Andrew Chilton [Sat, 27 Jul 2013 11:13:55 +0000 (23:13 +1200)]
doc: add nodejs.geek.nz to the community page
Rod Vagg [Sat, 27 Jul 2013 05:20:08 +0000 (15:20 +1000)]
doc: add nodejs.org.au to community listing
Maciej Małecki [Fri, 26 Jul 2013 21:48:57 +0000 (23:48 +0200)]
doc: document possible return values of os.arch()
Dav Glass [Wed, 24 Jul 2013 18:17:28 +0000 (13:17 -0500)]
doc: Fix missing backtick in debugger doc
isaacs [Wed, 24 Jul 2013 23:05:54 +0000 (16:05 -0700)]
streams: Don't emit 'end' until read() past EOF
This prevents the following sort of thing from being confusing:
```javascript
stream.on('data', function() { console.error('got data'); });
stream.pause(); // stop reading
// turns out no data is available
stream.push(null);
// Hand the stream to someone else, who does stuff...
setTimeout(function() {
// too late! 'end' is already emitted!
stream.on('end', function() { console.error('got end'); });
});
```
With this change, the `end` event is not emitted until you call `read()`
*past* the EOF null. So, a paused stream will not swallow the `end`
event and emit it before you `resume()` the stream.
Fedor Indutny [Thu, 25 Jul 2013 14:27:26 +0000 (18:27 +0400)]
openssl: use asm for sha, md5, rmd
Ben Noordhuis [Thu, 25 Jul 2013 10:24:40 +0000 (12:24 +0200)]
test: fix simple/test-setproctitle
The title shouldn't be too long; libuv's uv_set_process_title() out of
security considerations no longer overwrites envp, only argv, so the
maximum title length is possibly quite short.
Fixes #5908.
Timothy J Fontaine [Fri, 26 Jul 2013 00:03:21 +0000 (17:03 -0700)]
blog: Post for v0.10.15
Timothy J Fontaine [Fri, 26 Jul 2013 00:03:03 +0000 (17:03 -0700)]
Now working on 0.10.16
Timothy J Fontaine [Fri, 26 Jul 2013 00:02:38 +0000 (17:02 -0700)]
Merge branch 'v0.10.15-release' into v0.10
Timothy J Fontaine [Thu, 25 Jul 2013 23:26:15 +0000 (16:26 -0700)]
2013.07.25, Version 0.10.15 (Stable)
* src: fix process.getuid() return value (Ben Noordhuis)
Ben Noordhuis [Thu, 25 Jul 2013 22:24:27 +0000 (00:24 +0200)]
src: fix process.getuid() return value
And process.getgid() too.
Commit ed80638 changed fs.chown() and fs.fchown() to only accept
unsigned integers. Make process.getuid() and process.getgid() follow
suit.
This commit should unbreak npm on OS X - it's hitting the new 'uid must
be an unsigned int' check when installing as e.g. user 'nobody' (which
has an UID of -2 in /etc/passwd or
4294967294 when cast to an uid_t.)
Fixes #5904.
Ben Noordhuis [Thu, 25 Jul 2013 21:21:52 +0000 (23:21 +0200)]
doc: document tls.Server 'secureProtocol' option
Timothy J Fontaine [Thu, 25 Jul 2013 20:54:55 +0000 (13:54 -0700)]
blog: Post for v0.10.14
Timothy J Fontaine [Thu, 25 Jul 2013 20:54:16 +0000 (13:54 -0700)]
Now working on 0.10.15
Timothy J Fontaine [Thu, 25 Jul 2013 20:53:45 +0000 (13:53 -0700)]
Merge branch 'v0.10.14-release' into v0.10
Timothy J Fontaine [Thu, 25 Jul 2013 18:49:01 +0000 (11:49 -0700)]
2013.07.25, Version 0.10.14 (Stable)
* uv: Upgrade to v0.10.13
* npm: Upgrade to v1.3.5
* os: Don't report negative times in cpu info (Ben Noordhuis)
* fs: Handle large UID and GID (Ben Noordhuis)
* url: Fix edge-case when protocol is non-lowercase (Shuan Wang)
* doc: Streams API Doc Rewrite (isaacs)
* node: call MakeDomainCallback in all domain cases (Trevor Norris)
* crypto: fix memory leak in LoadPKCS12 (Fedor Indutny)
Timothy J Fontaine [Thu, 25 Jul 2013 17:48:29 +0000 (10:48 -0700)]
uv: Upgrade to v0.10.13
Fedor Indutny [Sun, 21 Jul 2013 03:11:02 +0000 (10:11 +0700)]
tls: share tls tickets key between cluster workers
fix #5871
Fedor Indutny [Sun, 21 Jul 2013 03:09:47 +0000 (10:09 +0700)]
cluster: support setting data on shared server
If `obj` given to `cluster._getServer` has `_setServerData` or
`_getServerData` methods, the data will be synchronized across workers
and stored in master.
isaacs [Wed, 24 Jul 2013 20:37:20 +0000 (13:37 -0700)]
doc: explicitly set industry logo height
isaacs [Wed, 24 Jul 2013 20:23:44 +0000 (13:23 -0700)]
npm: Upgrade to v1.3.5
Ben Noordhuis [Wed, 24 Jul 2013 20:13:43 +0000 (22:13 +0200)]
src: move NODE_MODULE_VERSION to node_version.h
Ben Noordhuis [Wed, 24 Jul 2013 16:03:53 +0000 (18:03 +0200)]
lib: macro-ify type checks
Increases the grep factor. Makes it easier to harmonize type checks
across the code base.
Ben Noordhuis [Wed, 24 Jul 2013 16:13:25 +0000 (18:13 +0200)]
tools: fix js2c macro expansion bug
If the same macro was used twice in close proximity, the second one
didn't get expanded.
Ben Noordhuis [Wed, 24 Jul 2013 10:53:28 +0000 (12:53 +0200)]
src: rename macros.py to notrace_macros.py
This incarnation of macros.py is only used to disable the (d)trace
macros. Rename it so it better reflects its purpose. A new macros.py
will be added in a follow-up commit.
Ben Noordhuis [Wed, 24 Jul 2013 16:48:48 +0000 (18:48 +0200)]
src: cares_wrap: remove two unused variables
Trevor Norris [Tue, 23 Jul 2013 23:56:22 +0000 (16:56 -0700)]
smalloc: add external to alloc with callbacks
Forgot to actually assign cb_info to the External in smalloc::Alloc()
that accepts a callback to be run in the weak callback.
Trevor Norris [Tue, 23 Jul 2013 18:02:47 +0000 (11:02 -0700)]
buffer: misc logic simplification
Includes:
* No need for `typeof` when checking undefined.
* length is coerced to uint so no need to check if < 0.
* Stay consistent and always throw `new` errors.
* Returning offset + magic number in every write is error prone. Instead
return the central write function which returns the correct offset.
Trevor Norris [Tue, 23 Jul 2013 17:43:48 +0000 (10:43 -0700)]
buffer: revert length and parent check
In a rush to implement the fix 35e0d60 I overlooked the logic that
causes 0-length buffer instantiation to automatically not assign the
parent regardless.
Ben Noordhuis [Tue, 23 Jul 2013 15:09:09 +0000 (17:09 +0200)]
src: os: use Number::New() for CPU info
The return values from uv_cpu_info() don't necessarily fit in a 32 bits
signed integer.
Fixes #5732.
Ben Noordhuis [Tue, 23 Jul 2013 11:28:14 +0000 (13:28 +0200)]
fs: uids and gids must be unsigned ints
Before this commit, fs.chown() and fs.fchown() coerced the uid and gid
arguments to signed integers which is wrong because uid_t and gid_t are
unsigned on most all platforms and IDs that don't fit in a signed
integer do exist.
This commit changes the aforementioned functions to take unsigned ints
instead. No test because we can't assume the system has [GU]IDs that
large.
This change depends on joyent/libuv@d779eb5.
Fixes #5890.
David Björklund [Thu, 4 Jul 2013 14:22:31 +0000 (16:22 +0200)]
crypto: Add test for sha.write(''); sha.end()
Trevor Norris [Tue, 23 Jul 2013 00:04:17 +0000 (17:04 -0700)]
buffer: slice on zero length buffer
SlowBuffer(0) passes NULL instead of doing malloc(0). So when someone
attempted to SlowBuffer(0).slice(0, 1) an assert would fail in
smalloc::SliceOnto.
It's important that the check go where it is because the resulting
Buffer needs to have external array data allocated. In the case a user
tries to slice a zero length Buffer it will also have NULL passed as the
data argument.
Also fixed where the .parent attribute was set for zero length Buffers.
There is no need to track the source of slice if the slice isn't
actually occurring.
isaacs [Thu, 18 Jul 2013 01:24:02 +0000 (18:24 -0700)]
stream: Simplify flowing, passive data listening
Closes #5860
In streams2, there is an "old mode" for compatibility. Once switched
into this mode, there is no going back.
With this change, there is a "flowing mode" and a "paused mode". If you
add a data listener, then this will start the flow of data. However,
hitting the `pause()` method will switch *back* into a non-flowing mode,
where the `read()` method will pull data out.
Every time `read()` returns a data chunk, it also emits a `data` event.
In this way, a passive data listener can be added, and the stream passed
off to some other reader, for use with progress bars and the like.
There is no API change beyond this added flexibility.
Wyatt Preul [Sat, 20 Jul 2013 05:56:31 +0000 (00:56 -0500)]
util: removed duplicated isArray check
Ben Noordhuis [Wed, 3 Jul 2013 02:23:36 +0000 (04:23 +0200)]
v8: reapply floating patches
Trevor Norris [Mon, 22 Jul 2013 22:53:43 +0000 (15:53 -0700)]
src: update v8 build requirements
In v8 3.20.4 build/common.gypi was moved to build/toolchain.gypi and
build/features.gypi.
Trevor Norris [Mon, 22 Jul 2013 22:26:27 +0000 (15:26 -0700)]
v8: upgrade to v8 3.20.7
Ben Noordhuis [Sat, 20 Jul 2013 19:42:20 +0000 (21:42 +0200)]
src: fix windows build error from
221c689e
Just forward declare struct sockaddr, the struct is never actually
dereferenced in src/node_internals.h.
Before this commit, it included sys/socket.h but that header doesn't
exist on Windows.
Ben Noordhuis [Sat, 20 Jul 2013 10:34:53 +0000 (12:34 +0200)]
test: move two tests from simple/ to internet/
Fixes #5876.
Ben Noordhuis [Fri, 19 Jul 2013 21:59:41 +0000 (23:59 +0200)]
bench: fix up benchmarks after internal api change
Ben Noordhuis [Fri, 19 Jul 2013 21:33:06 +0000 (23:33 +0200)]
test: fix up tests after internal api change
Ben Noordhuis [Thu, 18 Jul 2013 21:18:50 +0000 (23:18 +0200)]
src, lib: update after internal api change
Libuv now returns errors directly. Make everything in src/ and lib/
follow suit.
The changes to lib/ are not strictly necessary but they remove the need
for the abominations that are process._errno and node::SetErrno().
Ben Noordhuis [Tue, 16 Jul 2013 21:28:38 +0000 (23:28 +0200)]
src, lib: deduplicate errnoException
Ben Noordhuis [Tue, 16 Jul 2013 21:08:25 +0000 (23:08 +0200)]
src: add libuv bindings module
Exports:
* all UV_E* error codes
* a uv_err_name() binding
Ben Noordhuis [Tue, 16 Jul 2013 19:04:31 +0000 (21:04 +0200)]
deps: upgrade libuv to 3ee4d3f
Ben Noordhuis [Thu, 6 Jun 2013 02:31:12 +0000 (04:31 +0200)]
udp_wrap, tcp_wrap: add out arg to AddressToJS
Prep work for removing process._errno. The handle.getsockname() function
will return a status code in the future and set the address and port
properties on the object that's passed in from JS land.
Ben Noordhuis [Tue, 4 Jun 2013 10:45:12 +0000 (12:45 +0200)]
src: ReqWrap now optionally accepts a wrap object
Trevor Norris [Fri, 12 Jul 2013 23:29:54 +0000 (16:29 -0700)]
buffer: return offset for end of last write
Ben Noordhuis [Fri, 19 Jul 2013 20:35:23 +0000 (22:35 +0200)]
src: fix persistent handle lifecycle issue
Commit 636ca7c adds an optimization that casts strong Persistent<T>
handles directly to Local<T> handles to avoid the overhead of creating
new HandleScope-rooted Local<T> handles all the time.
One gotcha that I missed is that it's no longer legal to reference the
Local<T> after calling Persistent<T>::Dispose(). This commit addresses
that.
Ben Noordhuis [Sun, 2 Jun 2013 13:11:46 +0000 (15:11 +0200)]
src: add IsFunction() assert to MakeCallback
Helps catch bugs early on. Without it, V8 throws the fairly
unhelpful exception "TypeError: undefined is not a function" -
unhelpful because there is no stack trace.
Ben Noordhuis [Fri, 19 Jul 2013 10:46:11 +0000 (12:46 +0200)]
tools: make check-imports.sh work on bsd-likes
Trevor Norris [Fri, 12 Jul 2013 22:18:21 +0000 (15:18 -0700)]
smalloc: create separate module
It will be confusing if later on we add Buffer#dispose(), and smalloc is
its own cpp api anyways. So instead create a new require('smalloc') to
expose the previous Buffer.alloc/dispose methods, and expose copyOnto
and kMaxLength as well.
Other changes:
* Added documentation and additional tests.
* smalloc::CopyOnto has changed from using assert() to throwing errors
on bad argument values because it is not exposed to the user.
* Minor style fixes.