Граф коммитов

11159 Коммитов

Автор SHA1 Сообщение Дата
Julien Gilli 68d4bed2fd make: remove node_dtrace from cpplint excludes
PR-URL: https://github.com/joyent/node/pull/8741
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-03-16 16:20:16 -04:00
James Hartig 30666f22ca 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>
2015-03-16 16:20:16 -04:00
Steven Vercruysse e6e616fdcb 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>
2015-03-16 16:20:16 -04:00
Julien Gilli 89bf6c05e9 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>
2015-03-16 16:20:16 -04:00
Ben Noordhuis f58e59649d 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>
2015-03-16 20:56:13 +01:00
Ben Noordhuis 2551c1d2ca 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>
2015-03-16 18:02:24 +01:00
Ben Noordhuis 4f394998ba 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>
2015-03-16 18:02:01 +01:00
cjihrig eb995d6822 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>
2015-03-16 12:49:21 -04:00
Alex Yursha a28945b128 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>
2015-03-16 11:30:07 +01:00
Brian White 85a92a37ef 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>
2015-03-15 23:11:38 -04:00
cjihrig 65d0a8eca8 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
03d199276e,
5de334c230, and
da730c76e9. 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>
2015-03-15 21:44:01 -04:00
Forrest L Norvell 7d0baf1741 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>
2015-03-15 21:41:52 -04:00
Fedor Indutny 4eb8810a27 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>
2015-03-14 21:08:38 -07:00
Fedor Indutny e90ed790c3 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>
2015-03-14 09:27:52 -07:00
Chris Dickinson 056ed4b0c9 src: revert -r/--require flags
This reverts commit 7bde3f1a8f.

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>
2015-03-13 15:16:00 -07:00
FangDun Cai 7a5b023bac doc: fix vm module examples
PR-URL: https://github.com/iojs/io.js/pull/1147
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-03-13 23:14:20 +01:00
Ali Ijaz Sheikh 7bde3f1a8f 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>
2015-03-13 13:54:34 -07:00
Jeremiah Senkpiel 53e200acc2 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>
2015-03-13 16:50:11 -04:00
Shigeki Ohtsu d8c4a932c9 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>
2015-03-13 20:18:54 +09:00
Shigeki Ohtsu 82f067e60b 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>
2015-03-12 17:35:20 -07:00
Santiago Gimeno 5ecdc0314d 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>
2015-03-12 16:40:35 -07:00
Santiago Gimeno a6af709489 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>
2015-03-12 16:40:33 -07:00
Santiago Gimeno 0782c24993 test: fix readfile-zero-byte-liar test
PR-URL: https://github.com/iojs/io.js/pull/1074
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-03-12 16:40:31 -07:00
Fedor Indutny e2c9040995 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>
2015-03-12 14:29:50 -07:00
Johan Bergström 8c4f0df464 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>
2015-03-12 16:20:54 -04:00
Bert Belder 41c9daa143 build: fix incorrect set in vcbuild.bat
Thanks Shigeki Ohtsu for catching this.
2015-03-11 12:01:31 -07:00
Fedor Indutny 07c066724c 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>
2015-03-11 11:39:57 -07:00
Ben Noordhuis d33a647b4b 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>
2015-03-11 13:25:17 +01:00
skenqbx 8453fbc879 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>
2015-03-10 23:28:04 -07:00
Ben Noordhuis 60dac07b06 doc: add Malte-Thorben Bruns to .mailmap
PR-URL: https://github.com/iojs/io.js/pull/1118
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-03-10 16:37:56 +01:00
Ben Noordhuis 480b48244f 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>
2015-03-10 16:13:29 +01:00
skenqbx 80e14d736e doc: move checkServerIdentity option to tls.connect()
PR-URL: https://github.com/iojs/io.js/pull/1107
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-03-10 09:49:08 -04:00
Ryuichi Okumura 684a5878b6 doc: fix missing periods in url.markdown
PR-URL: https://github.com/iojs/io.js/pull/1115
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-03-10 09:37:31 -04:00
Fedor Indutny 8431fc53f1 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>
2015-03-09 14:48:21 -04:00
Trevor Norris 8070b1ff99 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>
2015-03-09 12:46:20 -06:00
Rod Vagg e795138d55 Working on v1.5.2 2015-03-09 11:03:44 -07:00
Rod Vagg f19e9b6a76 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
2015-03-09 11:01:40 -07:00
Rudi Cilibrasi 030a92347d 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>
2015-03-09 10:58:40 -06:00
Fedor Indutny 1a3ca8223e 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>
2015-03-09 09:25:09 -04:00
Fedor Indutny 8670613d2d 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>
2015-03-08 19:07:46 -04:00
Yazhong Liu f8c893dd39 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>
2015-03-08 14:49:06 -07:00
Jeremiah Senkpiel cf565b5516 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>
2015-03-08 14:42:09 -07:00
Alex Kocharin 4bd3620382 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>
2015-03-08 16:36:29 -04:00
Fedor Indutny fe36076c78 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>
2015-03-07 18:51:05 -05:00
Fedor Indutny 7f4c95e160 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>
2015-03-07 18:51:05 -05:00
Brendan Ashworth e763220f66 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>
2015-03-07 14:57:53 -08:00
Ben Noordhuis 528d8786ff 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>
2015-03-07 19:37:36 +01:00
Ben Noordhuis 648fc63cd1 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>
2015-03-07 19:37:14 +01:00
Evan Lucas 0f7c8ebeea 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>
2015-03-07 12:41:57 -06:00
Fedor Indutny 3b57819b58 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>
2015-03-07 07:58:31 -05:00