platform/upstream/nodejs.git
9 years agodeps: upgrade npm to 2.7.6
Forrest L Norvell [Fri, 10 Apr 2015 12:56:01 +0000 (05:56 -0700)]
deps: upgrade npm to 2.7.6

PR-URL: https://github.com/iojs/io.js/pull/1390
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agoreadline: fix calling constructor without new
Alex Kocharin [Thu, 9 Apr 2015 15:55:26 +0000 (18:55 +0300)]
readline: fix calling constructor without new

Previously, we detected options object based on amount of arguments
supplied. But if we're calling readline without new operator,
constructor gets re-called and will always have 4 arguments.

PR-URL: https://github.com/iojs/io.js/pull/1385
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotools: add to install deps/openssl/config/archs
Shigeki Ohtsu [Wed, 8 Apr 2015 08:56:52 +0000 (17:56 +0900)]
tools: add to install deps/openssl/config/archs

PR-URL: https://github.com/iojs/io.js/pull/1377
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: generate opensslconf.h for architectures
Shigeki Ohtsu [Thu, 9 Apr 2015 08:56:16 +0000 (17:56 +0900)]
deps: generate opensslconf.h for architectures

PR-URL: https://github.com/iojs/io.js/pull/1377
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: add Makefile to generate opensslconf.h
Shigeki Ohtsu [Thu, 9 Apr 2015 08:49:27 +0000 (17:49 +0900)]
deps: add Makefile to generate opensslconf.h

This Makefile executes ../openssl/Configure {target} and copy
generated `../openssl/crypto/opensslconf.h` into
`archs/{target}/opensslconf.h`. with the target list that is defined
in ARCS. Several files are copied for backup and cleared so as not to
change the files in `../openssl`.

This also applies four fixes as below by using perl script so as to
meet iojs build requirements.

- all architectures
Remove define of OPENSSL_CPUID_OBJ because it is defined in
openssl.gypi so as to avoid build error with --openssl-no-asm

- VC-WIN32 and VC-WIN64A
OPENSSL_NO_DYNAMIC_ENGINE is needed for building static
library. OPENSSL_NO_CAPIENG is needed to avoid build errors on
Win. See the comments in `deps/openssl/openssl/engines/e_capi.c` for
detail.

- linux-x32
This fix was made by comparing define values of opensslconf.h which
was generated `Configure linux-x32' in openssl-1.0.2a

- darwin64-x86_64-cc
The current openssl release does not use RC4 asm since it explicitly
specified as `$asm=~s/rc4\-[^:]+//;` in
https://github.com/openssl/openssl/blob/OpenSSL_1_0_1-stable/Configure#L584
But iojs has used RC4 asm on MacOS for long time. Fix type of RC4_INT
into `unsigned int` in opensslconf.h of darwin64-x86_64-cc to work on
the RC4 asm.

PR-URL: https://github.com/iojs/io.js/pull/1377
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: make opensslconf.h include each target arch
Shigeki Ohtsu [Thu, 9 Apr 2015 08:46:08 +0000 (17:46 +0900)]
deps: make opensslconf.h include each target arch

In OpenSSL, opensslconf.h was generated by Configure script with
specifying a target argument, where it includes several defines that
depend on OS and architecture platform.

In iojs, we statically mapped --dest-os and --dest-cpu options in
configure to the target of Configure in OpenSSL and make
`deps/openssl/conf/openssconf.h` so as to include each file
according to its target by checking pre-defined compiler macros.

Included opnesslconf.h files for supported target architectures can
be generated by `Makefile` and stored under
`archs/{target}/opensslconf.h`. The Makefile alos fixes several
defines to meet iojs build requirements.

Here is a map table of configure options in iojs, target arch of
Configure in OpenSSL and CI support.

| --dest-os | --dest-cpu | OpenSSL target arch  | CI  |
| --------- | ---------- | -------------------- | --- |
| linux     | ia32       | linux-elf            | o   |
| linux     | x32        | patched linux-x86_64 | -   |
| linux     | x64        | linux-x86_64         | o   |
| linux     | arm        | linux-armv4          | o   |
| linux     | arm64      | N/A                  | -   |
| mac       | ia32       | darwin-i386-cc       | o   |
| mac       | x64        | darwin64-x86-cc      | o   |
| win       | ia32       | VC-WIN32             | -   |
| win       | x64        | VC-WIN64A            | o   |
| solaris   | ia32       | solaris-x86-gcc      | o   |
| solaris   | x64        | solaris64-x86_64-gcc | o   |
| freebsd   | ia32       | BSD-x86              | o   |
| freebsd   | x64        | BSD-x86_64           | o   |
| openbsd   | ia32       | BSD-x86              | -   |
| openbsd   | x64        | BSD-x86_64           | -   |
| others    | others     | linux-elf            | -   |

 --dest-os and --dest-cpu are mapped to pre-defined macros.

| --dest-os          | pre-defined macro         |
| ------------------ | ------------------------- |
| win                | _WIN32                    |
| win(64bit)         | _WIN64                    |
| mac                | __APPLE__ && __MACH__     |
| solaris            | __sun                     |
| freebsd            | __FreeBSD__               |
| openbsd            | __OpenBSD__               |
| linux (not andorid)| __linux__ && !__ANDROID__ |
| android            | __ANDROID__               |

| --dest-cpu | pre-defined macro |
| ---------- | ----------------- |
| arm        | __arm__           |
| arm64      | __aarch64__       |
| ia32       | __i386__          |
| ia32(win)  | _M_IX86           |
| mips       | __mips__          |
| mipsel     | __MIPSEL__        |
| x32        | __ILP32__         |
| x64        | __x86_64__        |
| x64(win)   | _M_X64            |

These are the list which is not implemented yet.

| --dest-os | --dest-cpu | OpenSSL target arch  | CI  |
| --------- | ---------- | -------------------- | --- |
| linux     | mips       | linux-mips32,linux-mips64,linux64-mips64? | --- |
| linux     | mipsel     | ?                    | --- |
| android   | ia32       | android-x86          | --- |
| android   | arm        | android-armv7        | --- |
| android   | mips       | android-mips         | --- |
| android   | mipsel     | ?                    | --- |

Supported target arch list in OpenSSL can be obtained by typing
`deps/openssl/openssl/Configure LIST`.

This also contains to add two new defines for all platform in the
bottom for GOST and Padlock engines are not included in iojs.

PR-URL: https://github.com/iojs/io.js/pull/1377
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agolib: reduce process.binding() calls
Brendan Ashworth [Tue, 7 Apr 2015 08:37:13 +0000 (01:37 -0700)]
lib: reduce process.binding() calls

This commit better handles calls to process.binding() in lib/ by
no longer lazy loading the bindings (the load times themselves are
rather miniscule compared to the load time of V8) and never reloading
the bindings (which is 172 times slower than referencing a variable with
the same value).

PR-URL: https://github.com/iojs/io.js/pull/1367
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: properly indent http.Agent keepAlive options
Jeremiah Senkpiel [Thu, 9 Apr 2015 14:56:02 +0000 (10:56 -0400)]
doc: properly indent http.Agent keepAlive options

Fixes: https://github.com/iojs/io.js/issues/1300
PR-URL: https://github.com/iojs/io.js/pull/1384
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agotest: increase timeouts on ARM
Roman Reiss [Tue, 7 Apr 2015 18:41:07 +0000 (20:41 +0200)]
test: increase timeouts on ARM

This commit introduces platform-specific test timeouts for the ARM
architectures. ARMv6 is notoriously slow so gets very large timeouts on
both the timeout value for each test, as well as certain problematic
individual tests. ARMv7 and ARMv8 also get slightly increased headroom.

PR-URL: https://github.com/iojs/io.js/pull/1366
Fixes: https://github.com/iojs/io.js/issues/1343
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobenchmark: don't check wrk in non-http benchmark
Jackson Tian [Wed, 8 Apr 2015 08:14:54 +0000 (16:14 +0800)]
benchmark: don't check wrk in non-http benchmark

When running a non-http benchmark, there is no need the check for the
wrk tool so move the wrk check into the http method.

PR-URL: https://github.com/iojs/io.js/pull/1368
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: update curl usage in COLLABORATOR_GUIDE
Roman Reiss [Thu, 9 Apr 2015 09:39:59 +0000 (11:39 +0200)]
doc: update curl usage in COLLABORATOR_GUIDE

Github now redirects the patch urls hosted on github.com, making it
necessary to enable curl redirect handling to obtain patches in the
merge process.

Example (before and after):
https://github.com/iojs/io.js/pull/1382.patch
https://patch-diff.githubusercontent.com/raw/iojs/io.js/pull/1382.patch

PR-URL: https://github.com/iojs/io.js/pull/1382
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: update CONTRIBUTING links.
Andrew Crites [Thu, 9 Apr 2015 06:49:08 +0000 (02:49 -0400)]
doc: update CONTRIBUTING links.

* Correct link to current collaborator list
* Correct link to Rust CoC

PR-URL: https://github.com/iojs/io.js/pull/1380
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agodoc: add TC meeting 2015-03-18 minutes
Rod Vagg [Wed, 8 Apr 2015 11:28:22 +0000 (21:28 +1000)]
doc: add TC meeting 2015-03-18 minutes

PR-URL: https://github.com/iojs/io.js/pull/1370
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: add TC meeting 2015-04-01 minutes
Rod Vagg [Wed, 8 Apr 2015 11:30:45 +0000 (21:30 +1000)]
doc: add TC meeting 2015-04-01 minutes

Closes: https://github.com/iojs/io.js/issues/1311
PR-URL: https://github.com/iojs/io.js/pull/1371
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: update AUTHORS list
Rod Vagg [Wed, 8 Apr 2015 11:35:06 +0000 (21:35 +1000)]
doc: update AUTHORS list

Update AUTHORS list using tools/update-authors.sh

PR-URL: https://github.com/iojs/io.js/pull/1372
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosmalloc: do not track external memory
Fedor Indutny [Wed, 8 Apr 2015 09:10:12 +0000 (11:10 +0200)]
smalloc: do not track external memory

The memory that was allocated outside of the `smalloc.cc` should not be
tracked using `AdjustAmountOfExternalAllocatedMemory`. There are no
potential issues except triggering V8's GC way too often.

In fact, `heap.js` is creating a buffer out of the pointer, and since it
doesn't know the size of the pointer - it just creates the maximum
possible `Buffer` instance with a no-op free callback and no hint.

PR-URL: https://github.com/iojs/io.js/pull/1375
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agolinux: fix epoll_pwait() fallback on arm64
Ben Noordhuis [Tue, 7 Apr 2015 12:22:50 +0000 (14:22 +0200)]
linux: fix epoll_pwait() fallback on arm64

arm64 doesn't have a epoll_wait() system call but a logic error stopped
libuv from falling back to epoll_pwait().

This bug was introduced in commit libuv/libuv@67bb2b5 ("linux: fix
epoll_pwait() regression with < 2.6.19") which sadly exchanged one
regression for another.

This commit is a back-port of libuv/libuv@1d8332f and should help
get the ARMv8 buildbot in better shape.

Original-PR-URL: https://github.com/libuv/libuv/pull/308
PR-URL: https://github.com/iojs/io.js/pull/1365
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agotest: double test timeout on arm machines
Ben Noordhuis [Mon, 6 Apr 2015 20:52:39 +0000 (22:52 +0200)]
test: double test timeout on arm machines

The ARM buildbots are notoriously slow.  Update the test runner to
double the per-test time limit when it's running on one of them.

PR-URL: https://github.com/iojs/io.js/pull/1357
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agozlib: make constants keep readonly
Jackson Tian [Tue, 7 Apr 2015 05:48:52 +0000 (13:48 +0800)]
zlib: make constants keep readonly

In zlib module, a dozen constants were exported to user land,
If user change the constant, maybe lead unexcepted error.

Make them readonly and freezon.

PR-URL: https://github.com/iojs/io.js/pull/1361
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
9 years agobuild: Remove building against a shared V8
Johan Bergström [Thu, 2 Apr 2015 23:13:43 +0000 (10:13 +1100)]
build: Remove building against a shared V8

This action is to encourage packagers to not build against a
shared V8 library since even minor bumps of V8 can create issues.

PR-URL: https://github.com/iojs/io.js/pull/1331
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoWorking on v1.6.5
Jeremiah Senkpiel [Mon, 6 Apr 2015 14:17:44 +0000 (10:17 -0400)]
Working on v1.6.5

9 years ago2015-04-06 io.js v1.6.4 Release v1.6.4
Jeremiah Senkpiel [Mon, 6 Apr 2015 14:09:03 +0000 (10:09 -0400)]
2015-04-06 io.js v1.6.4 Release

Notable changes:

* npm: upgrade npm to 2.7.5. See the npm CHANGELOG.md for details.
Includes two important security fixes.
https://github.com/npm/npm/blob/master/CHANGELOG.md#v275-2015-03-26
* openssl: preliminary work has been done for an upcoming upgrade to
OpenSSL 1.0.2a #1325 (Shigeki Ohtsu). See #589 for additional details.
* timers: a minor memory leak when timers are unreferenced was fixed,
alongside some related timers issues #1330 (Fedor Indutny). This
appears to have fixed the remaining leak reported in #1075.
* android: it is now possible to compile io.js for Android and related
devices #1307 (Giovanny Andres Gongora Granada).

9 years agotools: fix install source path for openssl headers
Oguz Bastemur [Mon, 6 Apr 2015 07:14:27 +0000 (09:14 +0200)]
tools: fix install source path for openssl headers

This part is broken for a very long time. We noticed the problem while
using jxcore native interface with embedded openssl. I've also sent a
pull request to node.js repo. The problem may affect a native addon
using builtin openssl. `opensslconf.h` is overwritten with
`deps/openssl/conf/opensslconf.h`

PR-URL: https://github.com/iojs/io.js/pull/1354
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
9 years agotools: remove gyp test directory
Shigeki Ohtsu [Mon, 6 Apr 2015 01:26:58 +0000 (10:26 +0900)]
tools: remove gyp test directory

gyp tests are not performed in iojs and it's size about 8M bytes. We
can check gyp tests outside of iojs and reduce the size of the
repository by removing them.

PR-URL: https://github.com/iojs/io.js/pull/1350
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agoRevert "doc: fix typo in CHANGELOG.md"
Giovanny Andres Gongora Granada [Sun, 5 Apr 2015 16:49:25 +0000 (11:49 -0500)]
Revert "doc: fix typo in CHANGELOG.md"

This reverts commit bde2b3e39724457147001e66a6dc9af1a5360805.

PR-URL: https://github.com/iojs/io.js/pull/1349
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: add Docker WG
Peter Petrov [Wed, 1 Apr 2015 13:50:05 +0000 (15:50 +0200)]
doc: add Docker WG

A new `Docker` working group is added to `WORKING_GROUPS.md`.
Also, removed the Docker images responsibility from the `Build`
group's description.

PR-URL: https://github.com/iojs/io.js/pull/1134
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: fix minor typos in COLLABORATOR_GUIDE.md
Kelsey [Wed, 1 Apr 2015 21:32:06 +0000 (14:32 -0700)]
doc: fix minor typos in COLLABORATOR_GUIDE.md

PR-URL: https://github.com/iojs/io.js/pull/1320
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: fix typo in CHANGELOG.md
Giovanny Andres Gongora Granada [Sat, 4 Apr 2015 16:30:48 +0000 (11:30 -0500)]
doc: fix typo in CHANGELOG.md

PR-URL: https://github.com/iojs/io.js/pull/1342
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agourl: fix resolving from non-file to file URLs.
Jeffrey Jagoda [Thu, 26 Mar 2015 19:34:16 +0000 (15:34 -0400)]
url: fix resolving from non-file to file URLs.

When resolving a reference URL with the 'file' scheme an no host
against a base URL without the 'file' scheme, the first path element
of the reference URL is used as the host for the target URL. This
results in an invalid target URL.

This change makes an exception for file URLs so that the host is not
mangled during URL resolution.

PR-URL: https://github.com/iojs/io.js/pull/1277
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Petka Antonov <petka_antonov@hotmail.com>
9 years agodoc: add GPG fingerprint for Fishrock123
Jeremiah Senkpiel [Thu, 2 Apr 2015 15:33:36 +0000 (11:33 -0400)]
doc: add GPG fingerprint for Fishrock123

PR-URL: https://github.com/iojs/io.js/pull/1324
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: better formatting for collaborator GPG keys
Jeremiah Senkpiel [Thu, 2 Apr 2015 15:24:40 +0000 (11:24 -0400)]
doc: better formatting for collaborator GPG keys

PR-URL: https://github.com/iojs/io.js/pull/1324
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobenchmark: add rsa/aes-gcm performance test
Shigeki Ohtsu [Thu, 2 Apr 2015 04:30:35 +0000 (13:30 +0900)]
benchmark: add rsa/aes-gcm performance test

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobenchmark: add/remove hash algorithm
Shigeki Ohtsu [Thu, 2 Apr 2015 12:33:24 +0000 (21:33 +0900)]
benchmark: add/remove hash algorithm

add sha1, sha512 algorithm and remove md5

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: refactor openssl.gyp
Shigeki Ohtsu [Tue, 3 Feb 2015 05:13:26 +0000 (14:13 +0900)]
deps: refactor openssl.gyp

Updated gyp has "else if" syntax in condition. Use this for
target_arch and OS switches. Several sources, defines, rules and
libraries variables moved to gypi files.

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotools: fix gyp to work on MacOSX without XCode
Shigeki Ohtsu [Tue, 10 Feb 2015 00:27:52 +0000 (09:27 +0900)]
tools: fix gyp to work on MacOSX without XCode

This issue has already submitted to the upstream in
https://code.google.com/p/gyp/issues/detail?id=477
Use this commit until the upstream is to be fixed.

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agogyp: fix build with python 2.6
Fedor Indutny [Mon, 13 Jan 2014 16:51:57 +0000 (16:51 +0000)]
gyp: fix build with python 2.6

Fixes: https://github.com/joyent/node/issues/6859
PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
9 years agodeps: update gyp to e1c8fcf7
Shigeki Ohtsu [Mon, 30 Mar 2015 05:33:17 +0000 (14:33 +0900)]
deps: update gyp to e1c8fcf7

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,node-gyp: optionally allow node.exe/iojs.exe to be renamed
Bert Belder [Wed, 25 Mar 2015 04:00:12 +0000 (21:00 -0700)]
win,node-gyp: optionally allow node.exe/iojs.exe to be renamed

On Windows, when node or io.js attempts to dynamically load a compiled
addon, the compiled addon tries to load node.exe or iojs.exe again -
depending on which import library the module used when it was linked.
This causes many compiled addons to break when node.exe or iojs.exe are
renamed, because when the binary has been renamed the addon DLL can't
find the (right) .exe file to load its imports from.

This patch gives compiled addon developers an option to overcome this
restriction by compiling a delay-load hook into their binary. The
delay-load hook ensures that whenever a module tries to load imports
from node.exe/iojs.exe, it'll just look at the process image, thereby
making the addon work regardless of what name the node/iojs binary has.

To enable this feature, the addon developer must set the
'win_delay_load_hook' option to 'true' in their binding.gyp file, like
this:

```
{
  'targets': [
    {
      'target_name': 'ernie',
      'win_delay_load_hook': 'true',
      ...
```

Bug: https://github.com/iojs/io.js/issues/751
Bug: https://github.com/iojs/io.js/issues/965
Upstream PR: https://github.com/TooTallNate/node-gyp/pull/599

PR-URL: https://github.com/iojs/io.js/pull/1251
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: https://github.com/iojs/io.js/pull/1266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
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.5
Forrest L Norvell [Fri, 3 Apr 2015 08:52:11 +0000 (01:52 -0700)]
deps: upgrade npm to 2.7.5

PR-URL: https://github.com/iojs/io.js/pull/1337
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agotimers: remove redundant code
Fedor Indutny [Thu, 2 Apr 2015 23:28:45 +0000 (02:28 +0300)]
timers: remove redundant code

PR-URL: https://github.com/iojs/io.js/pull/1330
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
9 years agotest: add test for a unref'ed timer leak
Fedor Indutny [Fri, 3 Apr 2015 22:08:20 +0000 (01:08 +0300)]
test: add test for a unref'ed timer leak

PR-URL: https://github.com/iojs/io.js/pull/1330
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
9 years agotimers: do not restart the interval after close
Fedor Indutny [Thu, 2 Apr 2015 22:14:08 +0000 (01:14 +0300)]
timers: do not restart the interval after close

Partially revert 776b73b24306bac0ce299df4f90b7645d5efca31.

Following code crashes after backported timer leak fixes:

```javascript
var timer = setInterval(function() {
  clearInterval(timer);
}, 10);
timer.unref();
```

Note that this is actually tested in a `test-timers-unref.js`, and is
crashing only with 776b73b24306bac0ce299df4f90b7645d5efca31.

Calling `clearInterval` leads to the crashes in case of `.unref()`ed
timers, and might lead to a extra timer spin in case of regular
intervals that was closed during the interval callback. All of these
happens because `.unref()`ed timer has it's own `_handle` and was used
after the `.close()`.

PR-URL: https://github.com/iojs/io.js/pull/1330
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
9 years agotimers: don't close interval timers when unrefd
Julien Gilli [Fri, 19 Dec 2014 00:51:08 +0000 (16:51 -0800)]
timers: don't close interval timers when unrefd

This change fixes a regression introduced by commit
0d051238be2e07e671d7d9f4f444e0cc1efadf1b, which contained a typo that
would cause every unrefd interval to fire only once.

Fixes: https://github.com/joyent/node/issues/8900
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
9 years agotimers: fix unref() memory leak
Trevor Norris [Wed, 26 Nov 2014 20:27:57 +0000 (12:27 -0800)]
timers: fix unref() memory leak

The destructor isn't being called for timers that have been unref'd.

Fixes: https://github.com/joyent/node/issues/8364
PR-URL: https://github.com/iojs/io.js/pull/1330
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agosrc: setup cluster workers before preloading
Ali Ijaz Sheikh [Mon, 30 Mar 2015 17:54:59 +0000 (10:54 -0700)]
src: setup cluster workers before preloading

We need to process cluster workers before any preload modules is
executed. Otherwise, the child processes are not correctly disovered
as clustered workers inside the preloaded modules.

Fixes: https://github.com/iojs/io.js/issues/1269
PR-URL: https://github.com/iojs/io.js/pull/1314
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agobuild: default to armv7+vfpv3 for android
Giovanny Andres Gongora Granada [Mon, 9 Mar 2015 03:19:21 +0000 (22:19 -0500)]
build: default to armv7+vfpv3 for android

Also add Android build instructions to the README.

PR-URL: https://github.com/iojs/io.js/pull/1307
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc,src: remove references to --max-stack-size
Aria Stewart [Thu, 2 Apr 2015 21:17:55 +0000 (17:17 -0400)]
doc,src: remove references to --max-stack-size

Remove obsolete references to the removed --max-stack-size switch.

PR-URL: https://github.com/iojs/io.js/pull/1327
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: drop homegrown thread pool, use libplatform
Ben Noordhuis [Thu, 2 Apr 2015 21:51:01 +0000 (23:51 +0200)]
src: drop homegrown thread pool, use libplatform

Drop the homegrown thread pool that was introduced in commit 50839a0
("v8_platform: provide default v8::Platform impl") and use one from
V8's libplatform library.  Performance is comparable and it removes
a few hundred lines of code.

The calls to v8::platform::PumpMessageLoop() are currently no-ops
because V8 does not (yet?) use v8::Platform::CallOnForegroundThread().

Packagers that link against a shared libv8 now also need to make
libv8_platform available.

PR-URL: https://github.com/iojs/io.js/pull/1329
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agodoc: add back quote to boolean variable 'true'
Kohei TAKATA [Fri, 3 Apr 2015 11:18:22 +0000 (20:18 +0900)]
doc: add back quote to boolean variable 'true'

PR-URL: https://github.com/iojs/io.js/pull/1338
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agobuild: avoid passing private flags from pmake
Johan Bergström [Fri, 3 Apr 2015 03:04:14 +0000 (14:04 +1100)]
build: avoid passing private flags from pmake

pmake introduces private flags (-J) when passing certain arguments
to it (such as -j). Filter these out before passing to gmake.

PR-URL: https://github.com/iojs/io.js/pull/1334
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agobenchmark: fix chunky client benchmark execution
Brian White [Wed, 25 Mar 2015 06:26:21 +0000 (02:26 -0400)]
benchmark: fix chunky client benchmark execution

This commit fixes a few things for this benchmark:

1. Ensures the temporary directory for the unix socket exists.
2. Prevents the client code from being run directly because the
server script is the one that calls out the client code.
3. Ensures the server is closed once the client benchmarks have
finished.
4. Since this is an http benchmark, it should be moved to the http
benchmarks subdirectory.

PR-URL: https://github.com/iojs/io.js/pull/1257
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agosrc: wrap MIN definition in infdef
Johan Bergström [Wed, 1 Apr 2015 23:37:05 +0000 (10:37 +1100)]
src: wrap MIN definition in infdef

Some platforms already define this; avoid redefining if that's
the case. Found on OpenBSD 5.6.

PR-URL: https://github.com/iojs/io.js/pull/1322
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: check in gtest, add util unit test
Ben Noordhuis [Thu, 19 Mar 2015 01:01:45 +0000 (02:01 +0100)]
deps: check in gtest, add util unit test

Check in a gypified gtest and add a simple unit test to show that the
basic infrastructure is in place.

PR-URL: https://github.com/iojs/io.js/pull/1199
Refs: https://github.com/iojs/io.js/issues/1193
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agov8: back-port openbsd/amd64 build fix
Ben Noordhuis [Wed, 1 Apr 2015 20:26:45 +0000 (22:26 +0200)]
v8: back-port openbsd/amd64 build fix

Cherry-pick https://codereview.chromium.org/856553002 from upstream.

Makes V8 on OpenBSD/amd64 pick up the right V8_INT64_C and V8_UINT64_C
macros.

PR-URL: https://github.com/iojs/io.js/pull/1318
Refs: https://github.com/iojs/io.js/pull/1312
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agodoc: add TC meeting minutes 2015-03-04
Rod Vagg [Wed, 11 Mar 2015 07:45:20 +0000 (00:45 -0700)]
doc: add TC meeting minutes 2015-03-04

PR-URL: https://github.com/iojs/io.js/pull/1123
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agobuild: Pass BSDmakefile args to gmake
Johan Bergström [Tue, 31 Mar 2015 00:17:25 +0000 (11:17 +1100)]
build: Pass BSDmakefile args to gmake

Minor convenience for platforms that doesn't have gmake installed
but prefer the habit of writing make instead of gmake.

test needs to live in .PHONY to get passed on to gmake.

PR-URL: https://github.com/iojs/io.js/pull/1298
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agolib: remove unused variables
Brian White [Sat, 28 Mar 2015 03:04:49 +0000 (23:04 -0400)]
lib: remove unused variables

PR-URL: https://github.com/iojs/io.js/pull/1290
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: fix util.isObject documentation
Jeremiah Senkpiel [Mon, 30 Mar 2015 18:34:24 +0000 (14:34 -0400)]
doc: fix util.isObject documentation

Proposed functionality fix containing prior discussion:
https://github.com/iojs/io.js/pull/822

Fixes: https://github.com/iojs/io.js/issues/743
PR-URL: https://github.com/iojs/io.js/pull/1295
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agoWorking on v1.6.4
Rod Vagg [Tue, 31 Mar 2015 11:45:25 +0000 (22:45 +1100)]
Working on v1.6.4

9 years ago2015-03-31 io.js v1.6.3 Release v1.6.3
Rod Vagg [Tue, 31 Mar 2015 11:36:59 +0000 (22:36 +1100)]
2015-03-31 io.js v1.6.3 Release

Notable changes:

 * fs: corruption can be caused by fs.writeFileSync() and append-mode
   fs.writeFile() and fs.writeFileSync() under certain circumstances,
   reported in #1058, fixed in #1063 (Olov Lassus).
 * iojs: an "internal modules" API has been introduced to allow core
   code to share JavaScript modules internally only without having to
   expose them as a public API, this feature is for core-only #848
   (Vladimir Kurchatkin).
 * timers: two minor problems with timers have been fixed:
   - Timer#close() is now properly idempotent #1288 (Petka Antonov).
   - setTimeout() will only run the callback once now after an
     unref() during the callback #1231 (Roman Reiss).
 * Windows: a "delay-load hook" has been added for compiled add-ons
   on Windows that should alleviate some of the problems that Windows
   users may be experiencing with add-ons in io.js #1251
   (Bert Belder).
 * V8: minor bug-fix upgrade for V8 to 4.1.0.27.
 * npm: upgrade npm to 2.7.4. See npm CHANGELOG.md for details.

9 years agowin,node-gyp: optionally allow node.exe/iojs.exe to be renamed
Bert Belder [Wed, 25 Mar 2015 04:00:12 +0000 (21:00 -0700)]
win,node-gyp: optionally allow node.exe/iojs.exe to be renamed

On Windows, when node or io.js attempts to dynamically load a compiled
addon, the compiled addon tries to load node.exe or iojs.exe again -
depending on which import library the module used when it was linked.
This causes many compiled addons to break when node.exe or iojs.exe are
renamed, because when the binary has been renamed the addon DLL can't
find the (right) .exe file to load its imports from.

This patch gives compiled addon developers an option to overcome this
restriction by compiling a delay-load hook into their binary. The
delay-load hook ensures that whenever a module tries to load imports
from node.exe/iojs.exe, it'll just look at the process image, thereby
making the addon work regardless of what name the node/iojs binary has.

To enable this feature, the addon developer must set the
'win_delay_load_hook' option to 'true' in their binding.gyp file, like
this:

```
{
  'targets': [
    {
      'target_name': 'ernie',
      'win_delay_load_hook': 'true',
      ...
```

Bug: https://github.com/iojs/io.js/issues/751
Bug: https://github.com/iojs/io.js/issues/965
Upstream PR: https://github.com/TooTallNate/node-gyp/pull/599

PR-URL: https://github.com/iojs/io.js/pull/1251
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: https://github.com/iojs/io.js/pull/1266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
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.4
Forrest L Norvell [Fri, 27 Mar 2015 10:56:05 +0000 (03:56 -0700)]
deps: upgrade npm to 2.7.4

9 years agodoc: add WG links in WORKING_GROUPS.md & fix nits
Farrin Reid [Tue, 10 Mar 2015 05:31:13 +0000 (22:31 -0700)]
doc: add WG links in WORKING_GROUPS.md & fix nits

Related to https://github.com/iojs/evangelism/issues/24

PR-URL: https://github.com/iojs/io.js/pull/1113
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agotest: fix race in parallel/test-vm-debug-context
Ben Noordhuis [Sun, 29 Mar 2015 18:09:22 +0000 (20:09 +0200)]
test: fix race in parallel/test-vm-debug-context

Fix a race condition in parallel/test-vm-debug-context where the 'exit'
event for the child process is emitted before the first and only 'data'
event for the child process's stderr stream.

I considered deferring the 'exit' event in lib/child_process.js until
all stdio streams have been closed but I realized that's not going to
work when the child process spins off grandchildren that keep the stdio
file descriptors alive.

Fixes: https://github.com/iojs/io.js/issues/1291
PR-URL: https://github.com/iojs/io.js/pull/1294
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agosrc: ignore ENOTCONN on shutdown race with child
Ben Noordhuis [Thu, 19 Mar 2015 22:33:52 +0000 (23:33 +0100)]
src: ignore ENOTCONN on shutdown race with child

On AIX, OS X and the BSDs, calling shutdown() on one end of a pipe
when the other end has closed the connection fails with ENOTCONN.

The sequential/test-child-process-execsync test failed sporadically
because of a race between the parent and the child where one closed
its end of the pipe before the other got around to calling shutdown()
on its end of the pipe.

Libuv is not the right place to handle that because it can't tell if
the ENOTCONN error is genuine but io.js can.

Refs: https://github.com/libuv/libuv/pull/268
PR-URL: https://github.com/iojs/io.js/pull/1214
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agosrc: fix minor memleak in preload-modules
Ali Ijaz Sheikh [Wed, 25 Mar 2015 19:19:46 +0000 (12:19 -0700)]
src: fix minor memleak in preload-modules

Free the preload_modules array once we are done with it.

PR-URL: https://github.com/iojs/io.js/pull/1265
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: decouple sidebar scrolling
Roman Reiss [Thu, 26 Mar 2015 18:35:37 +0000 (19:35 +0100)]
doc: decouple sidebar scrolling

This lets the doc sidebar have its own scrolling container, making the
page easier to navigate in cases where previously the menu was scrolled
far off.

PR-URL: https://github.com/iojs/io.js/pull/1274
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agodeps: upgrade v8 to 4.1.0.27
Ben Noordhuis [Fri, 27 Mar 2015 22:06:05 +0000 (23:06 +0100)]
deps: upgrade v8 to 4.1.0.27

PR-URL: https://github.com/iojs/io.js/pull/1289
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agostreams: use strict on _stream_wrap
Brendan Ashworth [Thu, 26 Mar 2015 22:20:27 +0000 (15:20 -0700)]
streams: use strict on _stream_wrap

A Mostly Harmless™ change to enable 'use strict' mode in _stream_wrap, bringing it in line with /all/ the other modules.

PR-URL: https://github.com/iojs/io.js/pull/1279
Reviewed-By: Brian White (@mscdex) <mscdex@mscdex.net>
Reviewed-By: Roman Reiss (@silverwind) <me@silverwind.io>
Reviewed-By: Yosuke Furukawa (@yosuke-furukawa)
<yosuke.furukawa@gmail.com>

9 years agotimers: make Timer.close idempotent
Petka Antonov [Fri, 27 Mar 2015 18:43:25 +0000 (20:43 +0200)]
timers: make Timer.close idempotent

fixes #1287

PR-URL: https://github.com/iojs/io.js/pull/1288
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: fix spelling error in feature flags
Phillip Lamplugh [Fri, 27 Mar 2015 17:16:32 +0000 (10:16 -0700)]
doc: fix spelling error in feature flags

PR-URL: https://github.com/iojs/io.js/pull/1286
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodebugger: don't spawn child process in remote mode
Jackson Tian [Fri, 27 Mar 2015 02:28:24 +0000 (10:28 +0800)]
debugger: don't spawn child process in remote mode

When debug in remote mode with host:port or pid, the interface
spawn child process also. If the debugger agent is running, will
get following output:

```
< Error: listen EADDRINUSE :::5858
<     at Object.exports._errnoException (util.js:734:11)
<     at exports._exceptionWithHostPort (util.js:757:20)
<     at Agent.Server._listen2 (net.js:1155:14)
<     at listen (net.js:1181:10)
<     at Agent.Server.listen (net.js:1268:5)
<     at Object.start (_debug_agent.js:21:9)
<     at startup (node.js:68:9)
<     at node.js:799:3
```

This fix won't spawn child process and no more error message was
shown.

When use `iojs debug`, the tip information just like this:

```
Usage: iojs debug script.js
```

This fix will display the advance usage also:

```
Usage: iojs debug script.js
       iojs debug <host>:<port>
       iojs debug -p <pid>
```

Fixes: https://github.com/iojs/io.js/issues/889
PR-URL: https://github.com/iojs/io.js/pull/1282
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: reduce sequential/test-fs-watch flakiness
Roman Reiss [Thu, 26 Mar 2015 19:01:17 +0000 (20:01 +0100)]
test: reduce sequential/test-fs-watch flakiness

The fs.watch test's write events sometimes aren't produced on OS X,
possibly because of a fsevents race condition. This patch gives delays
the writing a total of 20ms, which makes the test pass consistently.

PR-URL: https://github.com/iojs/io.js/pull/1275
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agojs2c: fix module id generation on windows
Ben Noordhuis [Fri, 27 Mar 2015 00:07:07 +0000 (01:07 +0100)]
js2c: fix module id generation on windows

Fix a regression that was introduced in commit 2db758c ("iojs: introduce
internal modules") where the computed id for "config.gypi" on Windows
was not "config" but an empty string.

With an empty string, the build succeeds but the binary is unusable:
startup.processConfig() in src/node.js chokes on the missing .config
property.

PR-URL: https://github.com/iojs/io.js/pull/1281
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
9 years agosrc: don't lazy-load timer globals
Ben Noordhuis [Thu, 26 Mar 2015 22:56:26 +0000 (23:56 +0100)]
src: don't lazy-load timer globals

Don't lazy-load setInterval(), setTimeout(), etc.  Most applications are
going to need them and routing every call through NativeModule.require()
and Function#apply() is not exactly efficient.

PR-URL: https://github.com/iojs/io.js/pull/1280
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agoRevert "doc: clarify real name requirement"
Jeremiah Senkpiel [Thu, 26 Mar 2015 19:03:11 +0000 (15:03 -0400)]
Revert "doc: clarify real name requirement"

This reverts commit 4e9bf93e9c645f33446f7d47005868ffcb3d281e.

PR-URL: https://github.com/iojs/io.js/pull/1276
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agowin,node-gyp: make delay-load hook optional
Bert Belder [Thu, 26 Mar 2015 03:53:35 +0000 (20:53 -0700)]
win,node-gyp: make delay-load hook optional

The delay-load hook that was landed in 3d46fef to make compiled addons
work on Windows regardless of the iojs.exe/node.exe filename causes
issues with a small amount of compiled addons.

Therefore this patch makes it an opt-in feature. An addon may set the
'win_delay_load_hook' option to 'true' in its binding.gyp to enable this
feature.

Example:

```
{
  'targets': [
    {
      'target_name': 'ernie',
      'win_delay_load_hook': 'true',
      ...
```

Refs: https://github.com/iojs/io.js/pull/1251
PR-URL: https://github.com/iojs/io.js/pull/1266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotimers: cleanup interval handling
Jeremiah Senkpiel [Thu, 26 Mar 2015 15:52:36 +0000 (11:52 -0400)]
timers: cleanup interval handling

Uses `null` as the false-y value for `_repeat` as like other properties.
Removes un-reachable statement in setInterval’s `wrapper()`.

PR-URL: https://github.com/iojs/io.js/pull/1272
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotimers: assure setTimeout callback only runs once
Roman Reiss [Sat, 21 Mar 2015 16:39:35 +0000 (17:39 +0100)]
timers: assure setTimeout callback only runs once

Calling this.unref() during the callback of SetTimeout caused the
callback to get executed twice because unref() didn't expect to be
called during that time and did not stop the ref()ed Timeout but
did start a new timer. This commit prevents the new timer creation
when the callback was already called.

Fixes: https://github.com/iojs/io.js/issues/1191
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
PR-URL: https://github.com/iojs/io.js/pull/1231

9 years agotls_wrap: fix this incredibly stupid leak
Fedor Indutny [Wed, 25 Mar 2015 03:21:32 +0000 (20:21 -0700)]
tls_wrap: fix this incredibly stupid leak

Always call `Done` on the WriteWrap, and ensure that `EncOut` will
consume all data in clear_in_ and invoke queued callbacks.

Fix: https://github.com/iojs/io.js/issues/1075
PR-URL: https://github.com/iojs/io.js/pull/1244
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotls_wrap: fix BIO leak on SSL error
Fedor Indutny [Tue, 24 Mar 2015 03:07:03 +0000 (20:07 -0700)]
tls_wrap: fix BIO leak on SSL error

Fix: https://github.com/iojs/io.js/issues/1075
PR-URL: https://github.com/iojs/io.js/pull/1244
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoiojs: introduce internal modules
Vladimir Kurchatkin [Sat, 14 Feb 2015 19:53:34 +0000 (22:53 +0300)]
iojs: introduce internal modules

Internal modules can be used to share private code between
public modules without risk to expose private APIs to the
user.

PR-URL: https://github.com/iojs/io.js/pull/848
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: fix format docs discrepancy
Brendan Ashworth [Wed, 25 Mar 2015 05:44:08 +0000 (22:44 -0700)]
doc: fix format docs discrepancy

Only objects and symbols use `util.inspect`, others are simply
concatenated.

Fixes: https://github.com/iojs/io.js/issues/935
PR-URL: https://github.com/iojs/io.js/pull/1255
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agostring_decoder: optimize write()
Brian White [Thu, 19 Mar 2015 21:31:34 +0000 (17:31 -0400)]
string_decoder: optimize write()

By limiting property getting/setting to only where they are
absolutely necessary, we can achieve greater performance
especially with small utf8 inputs and any size base64 inputs.

PR-URL: https://github.com/iojs/io.js/pull/1209
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Nicu Micleușanu <micnic90@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agowin,node-gyp: allow node.exe/iojs.exe to be renamed
Bert Belder [Wed, 25 Mar 2015 04:00:12 +0000 (21:00 -0700)]
win,node-gyp: allow node.exe/iojs.exe to be renamed

On Windows, when node or io.js attempts to dynamically load a compiled
addon, the compiled addon tries to load node.exe or iojs.exe again -
depending on which import library the module used when it was linked.
This makes it impossible to rename node.exe or iojs.exe, because when
that happens the module can't find its dependencies.

With this patch, a delay-load hook is added to all modules that are
compiled with node-gyp. The delay-load hook ensures that whenever a
module tries to load imports from node.exe/iojs.exe, it'll just refer
back to the process image, thus making it possible to rename the
iojs/node binary.

Bug: https://github.com/iojs/io.js/issues/751
Bug: https://github.com/iojs/io.js/issues/965
Upstream PR: https://github.com/TooTallNate/node-gyp/pull/599

PR-URL: https://github.com/iojs/io.js/pull/1251
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agofs: fix corruption in writeFile and writeFileSync
Olov Lassus [Thu, 5 Mar 2015 00:03:34 +0000 (01:03 +0100)]
fs: fix corruption in writeFile and writeFileSync

1. writeFileSync bumps position incorrectly, causing it to drift in
iteration three and onwards.

2. Append mode files will get corrupted in the middle if writeFile or
writeFileSync iterates multiple times, unless running on Linux. position
starts out as null so first write is OK, but then position will refer to
a location inside an existing file, corrupting that data. Linux ignores
position for append mode files so it doesn't happen there.

This commit fixes these two related issues by bumping position correctly
and by always using null as the position argument to write/writeSync for
append mode files.

PR-URL: https://github.com/iojs/io.js/pull/1063
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodoc: clarify real name requirement
Roman Reiss [Tue, 24 Mar 2015 21:53:31 +0000 (22:53 +0100)]
doc: clarify real name requirement

CONTRIBUTING.md didn't make our rule for requiring real names from
contributors clear enough. This commit shall clarify that part.

Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
PR-URL: https://github.com/iojs/io.js/pull/1250

9 years agodoc: document repl on-demand module loading
Roman Reiss [Tue, 24 Mar 2015 21:06:27 +0000 (22:06 +0100)]
doc: document repl on-demand module loading

Fixes: https://github.com/iojs/io.js/issues/992
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
PR-URL: https://github.com/iojs/io.js/pull/1249

9 years agolib: add missing `new` for errors lib/*.js
Mayhem [Tue, 24 Mar 2015 14:15:57 +0000 (15:15 +0100)]
lib: add missing `new` for errors lib/*.js

Not including `new` adds a useless frame and removes a potentially
useful frame.

PR-URL: https://github.com/iojs/io.js/pull/1246
Reviewed-By: Petka Antonov <petka_antonov@hotmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agoassert: simplify logic of testing buffer equality
Alex Yursha [Tue, 17 Mar 2015 14:12:51 +0000 (17:12 +0300)]
assert: simplify logic of testing buffer equality

Delegate buffer equality check to `buffer.equals()`

PR-URL: https://github.com/iojs/io.js/pull/1171
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Christian Vaagland Tellnes <christian@tellnes.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.3
Forrest L Norvell [Fri, 20 Mar 2015 08:40:50 +0000 (01:40 -0700)]
deps: upgrade npm to 2.7.3

PR-URL: https://github.com/iojs/io.js/pull/1219
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agosrc: remove unnecessary environment lookups
Ben Noordhuis [Sun, 22 Mar 2015 23:38:42 +0000 (00:38 +0100)]
src: remove unnecessary environment lookups

Remove some unnecessary environment lookups and delete a few superfluous
HandleScope variables.

PR-URL: https://github.com/iojs/io.js/pull/1238
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agosrc: make accessors immune to context confusion
Ben Noordhuis [Sun, 22 Mar 2015 23:26:59 +0000 (00:26 +0100)]
src: make accessors immune to context confusion

It's possible for an accessor or named interceptor to get called with
a different execution context than the one it lives in, see the test
case for an example using the debug API.

This commit fortifies against that by passing the environment as a
data property instead of looking it up through the current context.

Fixes: https://github.com/iojs/io.js/issues/1190 (again)
PR-URL: https://github.com/iojs/io.js/pull/1238
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agoWorking on v1.6.3
Rod Vagg [Mon, 23 Mar 2015 05:28:45 +0000 (16:28 +1100)]
Working on v1.6.3

9 years ago2015-03-23 io.js v1.6.2 Release v1.6.2
Rod Vagg [Mon, 23 Mar 2015 05:26:28 +0000 (16:26 +1100)]
2015-03-23 io.js v1.6.2 Release

Notable Changes:

* Windows: The ongoing work in improving the state of Windows support
  has resulted in full test suite passes once again. As noted in the
  release notes for v1.4.2, CI system and configuration problems
  prevented it from properly reporting problems with the Windows
  tests, the problems with the CI and the codebase appear to have been
  fully resolved.
* FreeBSD: A kernel bug impacting io.js/Node.js was discovered and a
  patch has been introduced to prevent it causing problems for io.js
  (Fedor Indutny) #1218.
* module: you can now require('.') instead of having to require('./'),
  this is considered a bugfix (Michaël Zasso) #1185.
* v8: updated to 4.1.0.25 including patches for --max_old_space_size
  values above 4096 and Solaris support, both of which are already
  included in io.js.

9 years agoutil: Check input to util.inherits
Connor Peet [Mon, 23 Mar 2015 00:45:16 +0000 (20:45 -0400)]
util: Check input to util.inherits

PR-URL: https://github.com/iojs/io.js/pull/1240
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Petka Antonov <petka_antonov@hotmail.com>
9 years agodeps: upgrade v8 to 4.1.0.25
Johan Bergström [Sat, 21 Mar 2015 01:31:48 +0000 (12:31 +1100)]
deps: upgrade v8 to 4.1.0.25

PR-URL: https://github.com/iojs/io.js/pull/1224
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>