platform/upstream/nodejs.git
9 years agodoc: fix typo in CHANGELOG
Mathieu Darse [Sat, 21 Mar 2015 13:37:47 +0000 (14:37 +0100)]
doc: fix typo in CHANGELOG

PR-URL: https://github.com/iojs/io.js/pull/1230
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agonode: ensure that streams2 won't `.end()` stdin
Fedor Indutny [Sat, 21 Mar 2015 23:19:04 +0000 (16:19 -0700)]
node: ensure that streams2 won't `.end()` stdin

Stdin is purely read-only stream. Although, `net.Socket` might be used
to create it if stdin is in fact a Pipe or TCP socket, the
`stream.Duplex` should not try to call `.end()` on it.

Fix: https://github.com/iojs/io.js/issues/1068
PR-URL: https://github.com/iojs/io.js/pull/1233
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agotest: fix crypto-binary-default bad crypto check
Brendan Ashworth [Fri, 13 Mar 2015 08:42:21 +0000 (01:42 -0700)]
test: fix crypto-binary-default bad crypto check

This commit fixes a small bug introduced in 671fbd5
that caused the test to not be run. crypto was properly
checked, but since tls was not imported, a TypeError
would be thrown in the `try {} catch {}` block and
falsely reported as no crypto.

This is now fixed.

PR-URL: https://github.com/iojs/io.js/pull/1141
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agodoc: call js function in null context
Ben Noordhuis [Wed, 11 Mar 2015 13:19:21 +0000 (14:19 +0100)]
doc: call js function in null context

It's good practice now to call JS functions that don't execute in a
specific scope with v8::Null() as the receiver.  Update the addons
documentation.

PR-URL: https://github.com/iojs/io.js/pull/1125
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: don't use `using namespace v8`
Ben Noordhuis [Wed, 11 Mar 2015 13:14:18 +0000 (14:14 +0100)]
doc: don't use `using namespace v8`

Wholesale importing an entire namespace with `using namespace` is a bad
practice.  Remove it from the addons documentation and replace it with
proper `using` directives.  Wrap code in a namespace while we are here.

PR-URL: https://github.com/iojs/io.js/pull/1125
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: replace v8::Handle<T> with v8::Local<T>
Ben Noordhuis [Wed, 11 Mar 2015 13:03:02 +0000 (14:03 +0100)]
doc: replace v8::Handle<T> with v8::Local<T>

v8::Handle is on its way out, to be replaced with v8::Local.  Update the
addons documentation accordingly.

PR-URL: https://github.com/iojs/io.js/pull/1125
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: remove unnecessary v8::HandleScopes
Ben Noordhuis [Wed, 11 Mar 2015 12:56:37 +0000 (13:56 +0100)]
doc: remove unnecessary v8::HandleScopes

Remove unnecessary v8::HandleScope uses from the addons documentation.

C++ API callbacks run in an implicit v8::HandleScope, there is no need
to declare one in the callback function.

PR-URL: https://github.com/iojs/io.js/pull/1125
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: remove uses of v8::Isolate::GetCurrent()
Ben Noordhuis [Wed, 11 Mar 2015 12:41:32 +0000 (13:41 +0100)]
doc: remove uses of v8::Isolate::GetCurrent()

v8::Isolate::GetCurrent() is slated for deprecation.  Replace its uses
in the addons documentation with v8::Object::GetIsolate(), etc.

PR-URL: https://github.com/iojs/io.js/pull/1125
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agotest: add setTimeout/setInterval multi-arg tests
Ben Noordhuis [Fri, 20 Mar 2015 16:35:52 +0000 (17:35 +0100)]
test: add setTimeout/setInterval multi-arg tests

It turns out we have little to no test coverage for setTimeout() and
setInterval() calls with optional arguments.  Now we do.

PR-URL: https://github.com/iojs/io.js/pull/1221
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agolib: don't penalize setInterval() common case
Ben Noordhuis [Fri, 20 Mar 2015 16:20:43 +0000 (17:20 +0100)]
lib: don't penalize setInterval() common case

The common case is where setInterval() is called with two arguments,
the callback and the timeout.  Specifying optional arguments in
the parameter list forces common case calls to go through an arguments
adaptor stack frame.

PR-URL: https://github.com/iojs/io.js/pull/1221
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agolib: don't penalize setTimeout() common case
Ben Noordhuis [Fri, 20 Mar 2015 15:55:19 +0000 (16:55 +0100)]
lib: don't penalize setTimeout() common case

The common case is where setTimeout() is called with two arguments,
the callback and the timeout.  Specifying optional arguments in the
parameter list forces common case calls to go through an arguments
adaptor stack frame.

PR-URL: https://github.com/iojs/io.js/pull/1221
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agosrc: reset signal handler to SIG_DFL on FreeBSD
Fedor Indutny [Fri, 20 Mar 2015 05:03:34 +0000 (22:03 -0700)]
src: reset signal handler to SIG_DFL on FreeBSD

FreeBSD has a nasty bug with SA_RESETHAND reseting the SA_SIGINFO,
that is in turn set for a libthr wrapper. This leads to a crash.
Work around the issue by manually setting SIG_DFL in the signal
handler.

Fix: https://github.com/joyent/node/issues/9326
PR-URL: https://github.com/iojs/io.js/pull/1218
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agomodule: allow require('.')
Michaël Zasso [Wed, 18 Mar 2015 07:38:00 +0000 (08:38 +0100)]
module: allow require('.')

Previously, the minimal argument to require the current directory was
require('./'). This commits allows to skip the trailing slash.

Fixes: https://github.com/iojs/io.js/issues/1178
PR-URL: https://github.com/iojs/io.js/pull/1185
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agoWorking on v1.6.2
Rod Vagg [Fri, 20 Mar 2015 02:24:09 +0000 (13:24 +1100)]
Working on v1.6.2

9 years ago2015-03-20 io.js v1.6.1 Release v1.6.1
Rod Vagg [Fri, 20 Mar 2015 02:19:18 +0000 (13:19 +1100)]
2015-03-20 io.js v1.6.1 Release

Notable Changes:

* path: New type-checking on path.resolve()
  <https://github.com/iojs/io.js/pull/1153> uncovered some edge-cases
  being relied upon in the wild, most notably path.dirname(undefined).
  Type-checking has been loosened for path.dirname(), path.basename(),
  and path.extname(), (Colin Ihrig)
  <https://github.com/iojs/io.js/pull/1216>.
* querystring: Internal optimizations in querystring.parse() and
  querystring.stringify() <https://github.com/iojs/io.js/pull/847>
  prevented Number literals from being properly converted via
  querystring.escape() <https://github.com/iojs/io.js/pull/1208>,
  exposing a blind-spot in the test suite. The bug and the tests have
  now been fixed (Jeremiah Senkpiel)
  <https://github.com/iojs/io.js/pull/1213>.

9 years agoquerystring: fix broken stringifyPrimitive
Jeremiah Senkpiel [Fri, 20 Mar 2015 01:33:04 +0000 (21:33 -0400)]
querystring: fix broken stringifyPrimitive

stringifyPrimitive has always failed to stringify numbers since its
introduction in 422d3c9. This went uncaught due to encodeURIComponent's
string coercion.

Fixes: https://github.com/iojs/io.js/issues/1208
PR-URL: https://github.com/iojs/io.js/pull/1213
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Brian White <mscdex@mscdex.net>
9 years agoquerystring: parse numbers correctly
Jeremiah Senkpiel [Thu, 19 Mar 2015 22:51:55 +0000 (18:51 -0400)]
querystring: parse numbers correctly

Fixes a number parsing regression introduced in 85a92a3

Fixes: https://github.com/iojs/io.js/issues/1208
PR-URL: https://github.com/iojs/io.js/pull/1213
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Brian White <mscdex@mscdex.net>
9 years agopath: reduce type checking on some methods
cjihrig [Fri, 20 Mar 2015 00:55:31 +0000 (20:55 -0400)]
path: reduce type checking on some methods

a465840313f548b913eb2bd8ea3d26c2ab5dcebb added strict type
checking for the methods in the path module. However, dirname(),
basename(), and extname() actually had some undocumented uses
in the wild. This commit loosens the type checking on those
methods.

Fixes: https://github.com/iojs/io.js/issues/1215
PR-URL: https://github.com/iojs/io.js/pull/1216
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agobuild: make check aliases test
Johan Bergström [Thu, 19 Mar 2015 22:15:54 +0000 (09:15 +1100)]
build: make check aliases test

A common convention in auto* is to call make check rather than
make test. Let one alias the other

PR-URL: https://github.com/iojs/io.js/pull/1211
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoconfigure: use cc and c++ as defaults on os x
Ben Noordhuis [Thu, 19 Mar 2015 21:57:11 +0000 (22:57 +0100)]
configure: use cc and c++ as defaults on os x

Commit 8b2363d ("configure: use gcc and g++ as CC and CXX defaults")
switches the CC and CXX defaults but it turns out that GYP uses cc
and c++ as defaults on OS X.

It also made the configure script complain about old compilers because
the xcode gcc identifies as v4.2.1, whereas cc is less ambiguous about
it being a clang hybrid.

PR-URL: https://github.com/iojs/io.js/pull/1210
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agosmalloc: don't mix malloc() and new char[]
Ben Noordhuis [Thu, 19 Mar 2015 12:35:47 +0000 (13:35 +0100)]
smalloc: don't mix malloc() and new char[]

It's technically undefined behavior to mix malloc with delete[] and
new char[] with free().  smalloc was using new char[] in one place and
malloc() in another but in both cases the memory was freed with free().

PR-URL: https://github.com/iojs/io.js/pull/1205
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agoWorking on v1.6.1
Chris Dickinson [Thu, 19 Mar 2015 18:28:03 +0000 (11:28 -0700)]
Working on v1.6.1

9 years ago2015-03-19 io.js v1.6.0 Release v1.6.0
Chris Dickinson [Thu, 19 Mar 2015 18:12:05 +0000 (11:12 -0700)]
2015-03-19 io.js v1.6.0 Release

Notable Changes:

* node: a new -r or --require command-line option can be used to
  pre-load modules at start-up (Ali Ijaz Sheikh)
* querystring: parse() and stringify() are now faster (Brian White)
* http: the http.ClientRequest#flush() method has been deprecated and
  replaced with http.ClientRequest#flushHeaders() to match the same
  change now in Node.js v0.12 as per
  https://github.com/joyent/node/pull/9048 (Yosuke Furukawa)
* net: allow server.listen() to accept a String option for port, e.g.
  { port: "1234" }, to match the same option being accepted in
  net.connect() as of https://github.com/joyent/node/pull/9268 (Ben
  Noordhuis)
* tls: further work on the reported memory leak although there appears
  to be a minor leak remaining for the use-case in question, track
  progress at https://github.com/iojs/io.js/issues/1075.
* v8: backport a fix for an integer overflow when --max_old_space_size
  values above 4096 are used (Ben Noordhuis)
* platforms: the io.js CI system now reports passes on FreeBSD and
  SmartOS (_Solaris_).
* npm: upgrade npm to 2.7.1. See the npm CHANGELOG.md for details.
  https://github.com/npm/npm/blob/master/CHANGELOG.md#v271-2015-03-05

9 years agodeps: upgrade to openssl-1.0.1m
Shigeki Ohtsu [Thu, 19 Mar 2015 14:04:41 +0000 (23:04 +0900)]
deps: upgrade to openssl-1.0.1m

All sources are just extracted from tarball into deps/openssl/openssl.

change all openssl/include/openssl/*.h to include resolved symbolic
links and openssl/crypto/opensslconf.h to refer config/opensslconf.h

sha256-x86_64.pl does not exist in the origin openssl distribution. It
was copied from sha512-x86_64.pl and both sha256/sha512 scripts were
modified so as to generates only one asm file specified as its key
hash length.

`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid`
(and perhaps others) are requiring .686.

removed vpaesni-x86_64.asm in x64-win32-masm - it is no longer used.

Fixes: https://github.com/iojs/io.js/issues/1186
PR-URL: https://github.com/iojs/io.js/pull/1206
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: fix a broken collaborator github link
Aleksanteri Negru-Vode [Thu, 19 Mar 2015 13:21:33 +0000 (15:21 +0200)]
doc: fix a broken collaborator github link

PR-URL: https://github.com/iojs/io.js/pull/1204
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agobuffer: removing duplicate code
Thorsten Lorenz [Fri, 13 Mar 2015 19:24:01 +0000 (15:24 -0400)]
buffer: removing duplicate code

- using an overload of Alloc that does the same that was being done
  inside `Buffer::New`

The overload we now call inside `smalloc.cc` takes care of the same as
the code that was removed:

    if (length == 0)
      return Alloc(env, obj, nullptr, length, type);

    char* data = static_cast<char*>(malloc(length));
    if (data == nullptr) {
      FatalError("node::smalloc::Alloc(v8::Handle<v8::Object>, size_t,"
                  " v8::ExternalArrayType)", "Out Of Memory");
    }

    Alloc(env, obj, data, length, type);

PR-URL: https://github.com/iojs/io.js/pull/1144
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agosrc: add -r/--require flags for preloading modules
Ali Ijaz Sheikh [Tue, 17 Feb 2015 22:37:37 +0000 (14:37 -0800)]
src: add -r/--require flags for preloading modules

This patch adds a command line option (-r/--require) that allows one
to provide modules on the command line that will be 'required' during
node startup. This can be useful for debugging, tracing, memory leak
analysis etc. to be preloaded without explicit changes to the user
script. The option can be repeated to preload multiple modules.

PR-URL: https://github.com/iojs/io.js/pull/881
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agotest: cache lazy properties, fix style nits
Rod Vagg [Wed, 18 Mar 2015 22:27:26 +0000 (09:27 +1100)]
test: cache lazy properties, fix style nits

inFreeBSDJail involves an execSync() and is used by localhost_ipv4 so
will be unnecessarily expensive, so cache both values and reuse
rather than re-evaluate each time.

Renamed localhost_ipv4 to localhostIPv4 for style consistency.

PR-URL: https://github.com/iojs/io.js/pull/1196
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agotest: double timeout in tls-wrap-timeout.js
Fedor Indutny [Thu, 19 Mar 2015 03:15:06 +0000 (20:15 -0700)]
test: double timeout in tls-wrap-timeout.js

The test is timing dependent, ensure that it won't fail on the busy CI
boxes.

Fix: https://github.com/iojs/io.js/issues/1200
PR-URL: https://github.com/iojs/io.js/pull/1201
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agobuild: remove incorrect argument in vcbuild.bat
Jeremiah Senkpiel [Thu, 19 Mar 2015 01:03:14 +0000 (21:03 -0400)]
build: remove incorrect argument in vcbuild.bat

This change had been incorrectly committed in f19e9b6

PR-URL: https://github.com/iojs/io.js/pull/1198
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agolib: don't error in repl when cwd doesn't exist
Ben Noordhuis [Wed, 18 Mar 2015 21:31:16 +0000 (22:31 +0100)]
lib: don't error in repl when cwd doesn't exist

The current working directory may not exist when the REPL starts up.
Don't treat that as an error because it's still possible to do many
useful things.  This is like the previous commit but for the REPL.

Fixes: https://github.com/iojs/io.js/issues/1184
PR-URL: https://github.com/iojs/io.js/pull/1194
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agosrc: don't error at startup when cwd doesn't exist
Ben Noordhuis [Wed, 18 Mar 2015 21:11:14 +0000 (22:11 +0100)]
src: don't error at startup when cwd doesn't exist

The current working directory may not exist when iojs starts up.  Don't
treat that as an error because it's still possible to do many useful
things, like evaluating a command line script or starting a REPL.

This commit also fixes an age-old Windows bug where process.argv[0] was
not properly expanded, that's why the parallel/test-process-argv-0 test
gets an update as well.

Fixes: https://github.com/iojs/io.js/issues/1184
PR-URL: https://github.com/iojs/io.js/pull/1194
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agotest: Introduce knowledge of FreeBSD jails
Johan Bergström [Tue, 17 Mar 2015 01:06:48 +0000 (12:06 +1100)]
test: Introduce knowledge of FreeBSD jails

FreeBSD jails act differently than your average vm or similar
application container. All routing passes through one ip address,
which makes things like localhost or 0.0.0.0 resolve differently.

Introduce a helper that allows us to verify if we're in a jail
and another one for returning an ip address for localhost.

Also, skip one test instead of trading additional complexity
in common.js for one specific user scenario.

PR-URL: https://github.com/iojs/io.js/pull/1167
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: fix crypto bio integer wraparound on 32 bits
Ben Noordhuis [Wed, 18 Mar 2015 18:20:23 +0000 (19:20 +0100)]
src: fix crypto bio integer wraparound on 32 bits

Fix a bug where a size_t was negated and passed to a function that takes
an int64_t.  It works by accident when sizeof(size_t) == sizeof(int64_t)
but it causes the value to underflow when size_t is a 32 bits type.

v8::Isolate::AdjustAmountOfExternalAllocatedMemory() is the function I'm
talking about.  The goal of that call is to tell V8 that some memory has
been freed but due to that underflow, we were actually reporting that we
had just allocated gigabytes of memory.  It set off a garbage collector
frenzy and essentially brought the VM to a standstill.

Fixes: https://github.com/iojs/io.js/issues/1188
PR-URL: https://github.com/iojs/io.js/pull/1192
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agodoc: add yosuke-furukawa as collaborator
Yosuke Furukawa [Wed, 18 Mar 2015 00:33:39 +0000 (09:33 +0900)]
doc: add yosuke-furukawa as collaborator

PR-URL: https://github.com/iojs/io.js/pull/1183
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
9 years agodoc: update test section in CONTRIBUTING.md
Ben Noordhuis [Tue, 17 Mar 2015 19:46:32 +0000 (20:46 +0100)]
doc: update test section in CONTRIBUTING.md

test/simple no longer exists, tell contributors to add their tests to
test/parallel.

PR-URL: https://github.com/iojs/io.js/pull/1181
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: add petkaantonov as collaborator
Petka Antonov [Tue, 17 Mar 2015 19:53:57 +0000 (21:53 +0200)]
doc: add petkaantonov as collaborator

PR-URL: https://github.com/iojs/io.js/pull/1179
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: cjihrig <cjihrig@gmail.com>
9 years agodoc: add silverwind as collaborator
Roman Reiss [Tue, 17 Mar 2015 18:24:31 +0000 (19:24 +0100)]
doc: add silverwind as collaborator

PR-URL: https://github.com/iojs/io.js/pull/1176
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: add jbergstroem as collaborator
Johan Bergström [Tue, 17 Mar 2015 17:52:48 +0000 (04:52 +1100)]
doc: add jbergstroem as collaborator

PR-URL: https://github.com/iojs/io.js/pull/1175
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agoconfigure: use gcc and g++ as CC and CXX defaults
Ben Noordhuis [Tue, 17 Mar 2015 15:36:36 +0000 (16:36 +0100)]
configure: use gcc and g++ as CC and CXX defaults

It matches what GYP's Makefile generator does and it should improve
compiler detection because cc and c++ are not always gcc and g++.

Fixes: https://github.com/iojs/io.js/issues/1173
PR-URL: https://github.com/iojs/io.js/pull/1174
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agodoc: fix typo in buffer module documentation
Alex Yursha [Tue, 17 Mar 2015 10:28:36 +0000 (13:28 +0300)]
doc: fix typo in buffer module documentation

PR-URL: https://github.com/iojs/io.js/pull/1169
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobenchmark: add output format option [csv]
Brendan Ashworth [Tue, 10 Feb 2015 03:36:52 +0000 (19:36 -0800)]
benchmark: add output format option [csv]

This commit adds an `OUTPUT_FORMAT` environment variable option for
all benchmark tests that allow either 'csv' or 'default' output. Default
output has been left unchanged, and csv output prints out the csv
headers along with the csv formatted per-test output, each test also
seperated by a newline.

It can be used like the following:
$ OUTPUT_FORMAT=csv iojs benchmark/common.js http

Not specifying the OUTPUT_FORMAT env var will default to 'default'.
Specifying a bad value will throw an error.

PR-URL: https://github.com/iojs/io.js/pull/777
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobenchmark: add plot_csv R graphing script
Brendan Ashworth [Tue, 10 Feb 2015 04:25:47 +0000 (20:25 -0800)]
benchmark: add plot_csv R graphing script

This commit adds a graphing script (in R) for graphing the CSV output
of a benchmark. It can be run like this:

```
$ OUTPUT_FORMAT=csv iojs benchmark/http/client-request-body.js >
data.csv
$ ./benchmark/plot_csv.R data.csv graph.png bytes type
```

This will graph the output to `graph.png`, using the output's `bytes`
value as X and the result value for each as Y. Output will be grouped
by `type`.

Running as the example yields a beautiful graph like this:
http://pbrd.co/1vBhUfy.

PR-URL: https://github.com/iojs/io.js/pull/777
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agov8: fix --max_old_space_size=4096 integer overflow
Ben Noordhuis [Mon, 9 Feb 2015 07:00:32 +0000 (23:00 -0800)]
v8: fix --max_old_space_size=4096 integer overflow

See https://code.google.com/p/v8/issues/detail?id=3857 for the bug
report and https://codereview.chromium.org/897543002 for the CL.

PR-URL: https://github.com/iojs/io.js/pull/1166
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agohttp: add flushHeaders and deprecate flush
Yosuke Furukawa [Sat, 14 Mar 2015 07:24:07 +0000 (16:24 +0900)]
http: add flushHeaders and deprecate flush

PR-URL: https://github.com/iojs/io.js/pull/1156
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agomake: remove node_dtrace from cpplint excludes
Julien Gilli [Mon, 17 Nov 2014 20:00:11 +0000 (12:00 -0800)]
make: remove node_dtrace from cpplint excludes

PR-URL: https://github.com/joyent/node/pull/8741
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agonet: use cached peername to resolve remote fields
James Hartig [Tue, 10 Mar 2015 20:48:19 +0000 (16:48 -0400)]
net: use cached peername to resolve remote fields

Allows socket.remote* properties to still be accessed even after the
socket is closed.

Fixes: https://github.com/joyent/node/issues/9287
PR-URL: https://github.com/joyent/node/pull/9366
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agodoc: fix '\\' typos on Windows
Steven Vercruysse [Sun, 15 Mar 2015 11:29:18 +0000 (12:29 +0100)]
doc: fix '\\' typos on Windows

This commit changes the Windows examples in path.markdown to
correctly display '\\'.

PR-URL: https://github.com/joyent/node/pull/9412
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agobuild: allow custom PackageMaker path
Julien Gilli [Wed, 11 Mar 2015 18:45:57 +0000 (11:45 -0700)]
build: allow custom PackageMaker path

Make PACKAGEMAKER customizable because PackageMaker is not necessarily
installed in /Developer on OSX anymore.

PR-URL: https://github.com/joyent/node/pull/9377
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
9 years agolib: remove broken NODE_MODULE_CONTEXTS feature
Ben Noordhuis [Mon, 16 Mar 2015 11:34:39 +0000 (12:34 +0100)]
lib: remove broken NODE_MODULE_CONTEXTS feature

This feature has no tests and has been broken for ages, see for example
https://github.com/iojs/io.js/pull/1160.  Don't bother fixing it, it's
pretty much broken by design and there can't be too many users because
it's almost undocumented.  A quick Google search suggests that it causes
more grief than joy to the few that do use it.  Remove it.

PR-URL: https://github.com/iojs/io.js/pull/1162
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agosrc: use Number::New() for heapTotal/heapUsed
Ben Noordhuis [Fri, 13 Mar 2015 20:54:40 +0000 (21:54 +0100)]
src: use Number::New() for heapTotal/heapUsed

With --max_old_space_size=12345 it's possible to create a JS heap that
is larger than what fits in an unsigned int so use Number::New() rather
than Integer::NewFromUnsigned().

Performance-wise, it doesn't matter much.  If V8 can fit the double in
a SMI, it will.

PR-URL: https://github.com/iojs/io.js/pull/1148
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agosrc: don't create js string twice on error
Ben Noordhuis [Fri, 13 Mar 2015 18:15:18 +0000 (19:15 +0100)]
src: don't create js string twice on error

Rewrite ErrnoException() so that it doesn't turn the file path into a
string twice.

PR-URL: https://github.com/iojs/io.js/pull/1148
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agopath: add type checking for path inputs
cjihrig [Sat, 14 Mar 2015 02:21:47 +0000 (22:21 -0400)]
path: add type checking for path inputs

This commit adds type checking of path inputs to exported methods
in the path module. The exception is _makeLong(), which seems to
explicitly support any data type.

Fixes: https://github.com/iojs/io.js/issues/1139
PR-URL: https://github.com/iojs/io.js/pull/1153
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agodoc: reflect new require('events') behaviour
Alex Yursha [Thu, 26 Feb 2015 21:47:35 +0000 (00:47 +0300)]
doc: reflect new require('events') behaviour

We don't need to do `require('events').EventEmitter` any longer.

PR-URL: https://github.com/iojs/io.js/pull/975
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agoquerystring: optimize parse and stringify
Brian White [Thu, 19 Feb 2015 14:53:04 +0000 (09:53 -0500)]
querystring: optimize parse and stringify

parse optimizations:

* Move try-catch to separate function to keep entire function from
being deoptimized.
* Use key array lookup instead of using hasOwnProperty.
* Avoid decoding known empty strings.
* Avoid possibly unnecessary switch to slower decoder for values if
key decoding throws.

stringify optimizations:

* Use manual loop for default encoder instead of encodeURIComponent.
* Use string concatenation instead of joining an array of strings.
* Avoid caching result of typeof.

PR-URL: https://github.com/iojs/io.js/pull/847
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodeps: make node-gyp work with io.js
cjihrig [Fri, 27 Feb 2015 18:40:58 +0000 (13:40 -0500)]
deps: make node-gyp work with io.js

Every npm version bump requires a few patches to be floated on
node-gyp for io.js compatibility. These patches are found in
03d199276e21c1fa08d8df14eeb654c90cc5aa20,
5de334c23096492014a097ff487f07ad8eaee6d2, and
da730c76e98fb9fd18dac445dafbbec74d79f802. This commit squashes
them into a single commit.

PR-URL: https://github.com/iojs/io.js/pull/990
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: upgrade npm to 2.7.1
Forrest L Norvell [Fri, 13 Mar 2015 09:07:27 +0000 (02:07 -0700)]
deps: upgrade npm to 2.7.1

PR-URL: https://github.com/iojs/io.js/pull/1142
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agotls: re-enable `.writev()` on TLSWrap
Fedor Indutny [Sat, 14 Mar 2015 05:41:26 +0000 (22:41 -0700)]
tls: re-enable `.writev()` on TLSWrap

Fix the `parallel/test-tls-over-http-tunnel.js` on Windows by
re-enabling the accidentally disabled `.writev()` method on TLSWrap.

It appears that there is some subtle issue with shutdown timing and it
manifests itself when the chunks are written in separate packets. This
leads to concurrent `shutdown`/`destroy`, which breaks the test.

PR-URL: https://github.com/iojs/io.js/pull/1155
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agotls: fix leak on `DoWrite()` errors
Fedor Indutny [Sat, 14 Mar 2015 04:40:48 +0000 (21:40 -0700)]
tls: fix leak on `DoWrite()` errors

It is very unlikely to happen, but still the write request should be
disposed in case of immediate failure.

PR-URL: https://github.com/iojs/io.js/pull/1154
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: revert -r/--require flags
Chris Dickinson [Fri, 13 Mar 2015 21:57:11 +0000 (14:57 -0700)]
src: revert -r/--require flags

This reverts commit 7bde3f1a8f53d82992a8fed73e5f93159bb400b3.

The added test (test/parallel/test-preload.js) fails on Windows.

PR-URL: https://github.com/iojs/io.js/pull/1150
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: fix vm module examples
FangDun Cai [Fri, 13 Mar 2015 21:07:31 +0000 (05:07 +0800)]
doc: fix vm module examples

PR-URL: https://github.com/iojs/io.js/pull/1147
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: add -r/--require flags for preloading modules
Ali Ijaz Sheikh [Tue, 17 Feb 2015 22:37:37 +0000 (14:37 -0800)]
src: add -r/--require flags for preloading modules

-r/--require can be used to preload modules on node startup. The option
takes a single module name. The option can be repeated as necessary to
preload multiple modules.

This patch allows 'vendors' (such a cloud host) to inject functionality
that gets executed at application startup without requiring an explicit
require from the user's application. This can be useful to load vendor
specific application monitoring APIs transparently.

PR-URL: https://github.com/iojs/io.js/pull/881
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agotest: fix test-http-content-length
Jeremiah Senkpiel [Fri, 13 Mar 2015 19:26:27 +0000 (15:26 -0400)]
test: fix test-http-content-length

Previously the test did not allow the last request to complete.

Fixes: https://github.com/iojs/io.js/pull/1137
PR-URL: https://github.com/iojs/io.js/pull/1145
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agocrypto: add deprecated ValiCert CA for cross cert
Shigeki Ohtsu [Fri, 13 Mar 2015 00:55:29 +0000 (09:55 +0900)]
crypto: add deprecated ValiCert CA for cross cert

The host of melissadata.net has a cross root certification between
Starfield Class 2 and ValiCert Class 2. OpenSSL-1.0.1 only looks up
a cert chain to the deprecated ValiCert Class 2 CA and causes
untrusted error. We add it for a short-term remedy and it is to be
removed after upgrading OpenSSSL-1.0.2 and applying private patches
to support alternative cert chains.
See #402 and #589.

Fixes: https://github.com/iojs/io.js/issues/923
PR-URL: https://github.com/iojs/io.js/pull/1135
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: fix ext commands to be double quoted
Shigeki Ohtsu [Thu, 12 Mar 2015 01:16:26 +0000 (10:16 +0900)]
test: fix ext commands to be double quoted

Paths used on the Windows command line need to be enclosed in double
quotes, or they'll be parsed incorrectly when there are spaces in the
path.

PR-URL: https://github.com/iojs/io.js/pull/1122
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agotest: add test for reading a large file through a pipe
Santiago Gimeno [Fri, 6 Mar 2015 13:08:29 +0000 (14:08 +0100)]
test: add test for reading a large file through a pipe

PR-URL: https://github.com/iojs/io.js/pull/1074
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agofs: use stat.st_size only to read regular files
Santiago Gimeno [Thu, 5 Mar 2015 17:33:38 +0000 (18:33 +0100)]
fs: use stat.st_size only to read regular files

Using st_size to read non-regular files can lead to not reading all the
data.

PR-URL: https://github.com/iojs/io.js/pull/1074
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agotest: fix readfile-zero-byte-liar test
Santiago Gimeno [Thu, 12 Mar 2015 09:46:15 +0000 (10:46 +0100)]
test: fix readfile-zero-byte-liar test

PR-URL: https://github.com/iojs/io.js/pull/1074
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agosrc: do not leak handles on debug and exit
Fedor Indutny [Thu, 12 Mar 2015 21:19:16 +0000 (14:19 -0700)]
src: do not leak handles on debug and exit

Ensure HandleScope is created before creating any new handles (which
`Context::Scope` and `Environment::GetCurrent` does).

PR-URL: https://github.com/iojs/io.js/pull/1133
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Brian White <mscdex@mscdex.net>
9 years agov8: fix build on solaris platforms
Johan Bergström [Fri, 6 Mar 2015 03:50:32 +0000 (14:50 +1100)]
v8: fix build on solaris platforms

`v8/3c7e4403` introduced a different cast which broke building on
Illumos. Revert to previous behavior for V8_OS_SOLARIS. Found on
SmartOS while building with gcc 4.9.0.

V8-Issue: https://code.google.com/p/v8/issues/detail?id=3935
V8-Patch: https://codereview.chromium.org/990063002
PR-URL: https://github.com/iojs/io.js/pull/1079
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agobuild: fix incorrect set in vcbuild.bat
Bert Belder [Wed, 11 Mar 2015 19:01:31 +0000 (12:01 -0700)]
build: fix incorrect set in vcbuild.bat

Thanks Shigeki Ohtsu for catching this.

9 years agobuffer: align chunks on 8-byte boundary
Fedor Indutny [Wed, 11 Mar 2015 14:17:53 +0000 (07:17 -0700)]
buffer: align chunks on 8-byte boundary

When slicing global pool - ensure that the underlying buffer's data ptr
is 8-byte alignment to do not ruin expectations of 3rd party C++ addons.

NOTE: 0.10 node.js always returned aligned pointers and io.js should do
this too for compatibility.

PR-URL: https://github.com/iojs/io.js/pull/1126
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agodoc: make tools/update-authors.sh cross-platform
Ben Noordhuis [Wed, 11 Mar 2015 01:50:45 +0000 (02:50 +0100)]
doc: make tools/update-authors.sh cross-platform

And by cross-platform I mean Linux and OS X.  The awk script is not
compatible with BSD awk, that's why this commit changes it to perl.

Update the .mailmap to remove some duplicates and regenerate the
AUTHORS file.

Fixes: https://github.com/iojs/io.js/issues/1120
PR-URL: https://github.com/iojs/io.js/pull/1121
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agohttps: don't overwrite servername option
skenqbx [Mon, 9 Mar 2015 20:00:24 +0000 (21:00 +0100)]
https: don't overwrite servername option

PR-URL: https://github.com/iojs/io.js/pull/1110
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: add Malte-Thorben Bruns to .mailmap
Ben Noordhuis [Tue, 10 Mar 2015 15:18:24 +0000 (16:18 +0100)]
doc: add Malte-Thorben Bruns to .mailmap

PR-URL: https://github.com/iojs/io.js/pull/1118
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agolib: allow server.listen({ port: "1234" })
Ben Noordhuis [Tue, 10 Mar 2015 11:33:38 +0000 (12:33 +0100)]
lib: allow server.listen({ port: "1234" })

net.connect() accepts `{ port: "1234" }` (i.e. a string) as of commit
9d2b89d06 ("net: allow port 0 in connect()") but net.Server#listen()
did not, creating a minor inconsistency.  This commit rectifies that.

Fixes: https://github.com/iojs/io.js/issues/1111
PR-URL: https://github.com/iojs/io.js/pull/1116
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agodoc: move checkServerIdentity option to tls.connect()
skenqbx [Mon, 9 Mar 2015 13:46:22 +0000 (14:46 +0100)]
doc: move checkServerIdentity option to tls.connect()

PR-URL: https://github.com/iojs/io.js/pull/1107
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: fix missing periods in url.markdown
Ryuichi Okumura [Tue, 10 Mar 2015 11:46:59 +0000 (20:46 +0900)]
doc: fix missing periods in url.markdown

PR-URL: https://github.com/iojs/io.js/pull/1115
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agotls_wrap: proxy handle methods in prototype
Fedor Indutny [Mon, 9 Mar 2015 14:50:29 +0000 (10:50 -0400)]
tls_wrap: proxy handle methods in prototype

Set proxied methods wrappers in `TLSWrap` prototype instead of doing it
on every socket allocation. Should speed up things a bit and will
certainly make heapsnapshot less verbose.

PR-URL: https://github.com/iojs/io.js/pull/1108
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agobuffer: Don't assign .parent if none exists
Trevor Norris [Mon, 9 Mar 2015 18:28:31 +0000 (12:28 -0600)]
buffer: Don't assign .parent if none exists

The .parent property of the allocated buffer should remain undefined in
the case that it's not a slice. Also included test to verify this.

PR-URL: https://github.com/iojs/io.js/pull/1109
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agoWorking on v1.5.2
Rod Vagg [Mon, 9 Mar 2015 18:03:44 +0000 (11:03 -0700)]
Working on v1.5.2

9 years ago2015-03-09 io.js v1.5.1 Release v1.5.1
Rod Vagg [Mon, 9 Mar 2015 17:58:40 +0000 (10:58 -0700)]
2015-03-09 io.js v1.5.1 Release

Notable changes:

* tls: The reported TLS memory leak has been at least partially
  resolved via various commits in this release. Current testing indicated
  that there may still be some leak problems. Progress being tracked at:
  https://github.com/iojs/io.js/issues/1075
* http: Fixed an error reported at
  https://github.com/joyent/node/issues/9348 and
  https://github.com/npm/npm/issues/7349
  Pending data was not being fully read upon an 'error' event leading to
  an assertion failure on socket.destroy().
  (Fedor Indutny) https://github.com/iojs/io.js/pull/1103

9 years agobenchmark: chunky http client benchmark variation
Rudi Cilibrasi [Tue, 30 Dec 2014 06:40:08 +0000 (22:40 -0800)]
benchmark: chunky http client benchmark variation

PR-URL: https://github.com/iojs/io.js/pull/228
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agohttp_client: ensure empty socket on error
Fedor Indutny [Mon, 9 Mar 2015 00:30:01 +0000 (20:30 -0400)]
http_client: ensure empty socket on error

Read all pending data out of the socket on `error` event and ensure that
no `data`/`end` handlers will be invoked on `socket.destroy()`.
Otherwise following assertion happens:

    AssertionError: null == true
        at TLSSocket.socketOnData (_http_client.js:308:3)
        at TLSSocket.emit (events.js:107:17)
        at TLSSocket.Readable.read (_stream_readable.js:373:10)
        at TLSSocket.socketCloseListener (_http_client.js:229:10)
        at TLSSocket.emit (events.js:129:20)
        at TCP.close (net.js:476:12)

Fix: https://github.com/joyent/node/issues/9348
PR-URL: https://github.com/iojs/io.js/pull/1103
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Nicu Micleușanu <micnic90@gmail.com>
9 years agonode_crypto_bio: adjust external memory size
Fedor Indutny [Fri, 6 Mar 2015 19:58:24 +0000 (14:58 -0500)]
node_crypto_bio: adjust external memory size

Adjust V8's external memory size when allocating buffers for TLS data to
ensure that V8 has enough information to trigger the GC at right time.

PR-URL: https://github.com/iojs/io.js/pull/1085
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: fix confusion markdown in util.markdown
Yazhong Liu [Sun, 8 Mar 2015 06:26:15 +0000 (14:26 +0800)]
doc: fix confusion markdown in util.markdown

PR-URL: https://github.com/iojs/io.js/pull/1097
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agofs: fix .write() not coercing non-string values
Jeremiah Senkpiel [Sun, 8 Mar 2015 20:19:56 +0000 (16:19 -0400)]
fs: fix .write() not coercing non-string values

Fixes: https://github.com/iojs/io.js/issues/1098
PR-URL: https://github.com/iojs/io.js/pull/1102
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agourl: remove redundant assignment in url.parse
Alex Kocharin [Sun, 8 Mar 2015 01:11:37 +0000 (04:11 +0300)]
url: remove redundant assignment in url.parse

PR-URL: https://github.com/iojs/io.js/pull/1095
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Nicu Micleușanu <micnic90@gmail.com>
9 years agostream_base: WriteWrap::New/::Dispose
Fedor Indutny [Sat, 7 Mar 2015 21:42:02 +0000 (16:42 -0500)]
stream_base: WriteWrap::New/::Dispose

Encapsulate allocation/disposal of `WriteWrap` instances into the
`WriteWrap` class itself.

PR-URL: https://github.com/iojs/io.js/pull/1090
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotls: do not leak WriteWrap objects
Fedor Indutny [Sat, 7 Mar 2015 16:41:22 +0000 (11:41 -0500)]
tls: do not leak WriteWrap objects

Kill WriteWrap instances that are allocated in `tls_wrap.cc` internally.

Fix: https://github.com/iojs/io.js/issues/1075
PR-URL: https://github.com/iojs/io.js/pull/1090
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: update clang version prerequisite
Brendan Ashworth [Sat, 7 Mar 2015 22:41:44 +0000 (14:41 -0800)]
doc: update clang version prerequisite

See commit `4877ec0`, where it now warns on a clang++ version older than
3.4.

PR-URL: https://github.com/iojs/io.js/pull/1094
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: fix memory leak in fs.writeSync error path
Ben Noordhuis [Sat, 7 Mar 2015 18:08:41 +0000 (19:08 +0100)]
src: fix memory leak in fs.writeSync error path

The SYNC_CALL macro returns on error, bypassing the delete[] call.

Mea culpa, it looks like I introduced this memory leak back in 2013,
in commit d2b80b8a ("src: clean up FSReqWrap").

PR-URL: https://github.com/iojs/io.js/pull/1092
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agosrc: fix mismatched delete[] in src/node_file.cc
Ben Noordhuis [Sat, 7 Mar 2015 17:24:27 +0000 (18:24 +0100)]
src: fix mismatched delete[] in src/node_file.cc

Fix a bad delete of a pointer that was allocated with placement new.
Casting the pointer was not the right solution because there was at
least one non-placement new constructor call.

This commit rewrites FSReqWrap to be more explicit about ownership of
the auxiliary data and removes a number of egregious const_casts.
The ASYNC_DEST_CALL macro also gets significantly slimmed down.

PR-URL: https://github.com/iojs/io.js/pull/1092
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agodoc: replace article "an" with "a" in net docs
Evan Lucas [Sat, 7 Mar 2015 18:37:20 +0000 (12:37 -0600)]
doc: replace article "an" with "a" in net docs

PR-URL: https://github.com/iojs/io.js/pull/1093
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agocrypto: fix leak in SafeX509ExtPrint
Fedor Indutny [Sat, 7 Mar 2015 03:51:03 +0000 (22:51 -0500)]
crypto: fix leak in SafeX509ExtPrint

`ASN1_item_d2i`'s return value must be freed by the owner.

Fix: https://github.com/iojs/io.js/issues/1075
PR-URL: https://github.com/iojs/io.js/pull/1087
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: add missing Context::Scope
Ben Noordhuis [Fri, 6 Mar 2015 05:25:28 +0000 (06:25 +0100)]
src: add missing Context::Scope

Add a Context::Scope that was overlooked in commit 583a868
("stream_wrap: add HandleScope's in uv callbacks").

PR-URL: https://github.com/iojs/io.js/pull/1084
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agoWorking on v1.5.1
Rod Vagg [Fri, 6 Mar 2015 22:04:22 +0000 (14:04 -0800)]
Working on v1.5.1

9 years ago2015-03-06 io.js v1.5.0 Release v1.5.0
Rod Vagg [Fri, 6 Mar 2015 21:59:02 +0000 (13:59 -0800)]
2015-03-06 io.js v1.5.0 Release

Notable changes:

* buffer: New `Buffer#indexOf()` method, modelled off `Array#indexOf()`.
  Accepts a String, Buffer or a Number. Strings are interpreted as UTF8.
  (Trevor Norris) https://github.com/iojs/io.js/pull/561
* fs: `options` object properties in `'fs'` methods no longer perform a
  `hasOwnProperty()` check, thereby allowing options objects to have
  prototype properties that apply. (Jonathan Ong)
  https://github.com/iojs/io.js/pull/635
* tls: A likely TLS memory leak was reported by PayPal. Some of the recent
  changes in stream_wrap appear to be to blame. The initial fix is in
  https://github.com/iojs/io.js/pull/1078, you can track the progress
  toward closing the leak at
  https://github.com/iojs/io.js/issues/1075 (Fedor Indutny).
* npm: Upgrade npm to 2.7.0. See npm CHANGELOG.md:
  https://github.com/npm/npm/blob/master/CHANGELOG.md#v270-2015-02-26
  for details including why this is a semver-minor when it could have
  been semver-major.
* TC: Colin Ihrig (@cjihrig) resigned from the TC due to his desire to do
  more code and fewer meetings.

9 years agodeps: make node-gyp work with io.js
cjihrig [Fri, 27 Feb 2015 18:40:58 +0000 (13:40 -0500)]
deps: make node-gyp work with io.js

Every npm version bump requires a few patches to be floated on
node-gyp for io.js compatibility. These patches are found in
03d199276e21c1fa08d8df14eeb654c90cc5aa20,
5de334c23096492014a097ff487f07ad8eaee6d2, and
da730c76e98fb9fd18dac445dafbbec74d79f802. This commit squashes
them into a single commit.

PR-URL: https://github.com/iojs/io.js/pull/990
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: upgrade npm to 2.7.0
Forrest L Norvell [Fri, 6 Mar 2015 08:57:32 +0000 (02:57 -0600)]
deps: upgrade npm to 2.7.0

PR-URL: https://github.com/iojs/io.js/pull/1080
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>