Commit Graph

10236 Commits (b26dd4e5ab9192bad72b9dc61fa4ad2d8f215da2)

Author SHA1 Message Date
Fedor Indutny 9f36c0d235 gyp: do not rm unused openssl syms on osx/linux
fix #8026

Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-07-31 11:52:01 +04:00
Julien Gilli 0381cf5698 tests: fix internet/test-dns.js
internet/test-dns.js assumes that ::1 always resolves to "localhost" on
all platforms. This is not what happens in reality. Some platforms
resolve it to "ip6-localhost" too. There doesn't seem to be any consensus
on what's the right thing to do. However, most sane platforms will use
either one of these two values.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-07-30 15:10:05 -07:00
Yazhong Liu 7166b55015 repl: fix overwrite for this._prompt
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-29 12:53:05 +04:00
Fedor Indutny f310c0f16b Merge remote-tracking branch 'origin/v0.10' into master
Conflicts:
	doc/api/buffer.markdown
	lib/_stream_readable.js
	lib/assert.js
	lib/buffer.js
	lib/child_process.js
	lib/http.js
	lib/string_decoder.js
	lib/zlib.js
	node.gyp
	test/simple/test-buffer.js
	test/simple/test-https-foafssl.js
	test/simple/test-stream2-compatibility.js
	test/simple/test-tls-server-verify.js
2014-07-29 12:51:27 +04:00
Fedor Indutny 38f6fcd822 buffer: fix sign overflow in `readUIn32BE`
`|` operation takes precendence on `+`, which will result in
`new Buffer('ffffffff', 16).readUInt32BE(0)` returning `-1` instead of
`ffffffff`.
2014-07-29 12:34:49 +04:00
Julien Gilli ef3c4ed3dd tests: fix process.kill pid test.
Prevent test-process-kill-pid.js tests suite from sending SIGHUP
to its process group, which was causing the test runner to terminate.

Fix jenkins' jobs for nodejs-master.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-07-28 18:13:04 -07:00
cjihrig e1fb1b58f9 cluster: enable error/message events using .worker
Between 0.11.1 and 0.11.2, the message and error events stopped
being usable via the cluster.worker object. This commit makes
them usable again. Closes #7998.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-28 18:44:36 +04:00
Sam Roberts 832ec1cd50 process: throw TypeError if kill pid not a number
Currently, invalid usage such as:

    process.kill('SIGTERM')
    process.kill(null)
    process.kill(undefined);

all coerce the pid to 0, and signal the current process.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-28 18:30:26 +04:00
Fedor Indutny 9a63a1d89b deps: backport 60c316 from v8 trunk
Original commit message:

    Extend the interceptor setter ASSERT to support the JSGlobalProxy case.

    BUG=v8:3463
    LOG=n
    R=dcarney@chromium.org

    Review URL: https://codereview.chromium.org/415973004

    git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

    Signed-off-by: Fedor Indutny <fedor@indutny.com>

fix #7969
2014-07-25 02:44:24 +04:00
cjihrig 61ddad1314 querystring: do not add sep for empty array
Currently, stringification of an empty array outputs a single
separator character. This commit causes an empty array to output
the empty string.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-24 00:41:51 +04:00
Fedor Indutny 338ba2bc80 test: fix test-https-foafssl 2014-07-23 23:55:24 +04:00
Fedor Indutny 93390ffc20 test: fix test-tls-server-verify
fix #7963
2014-07-23 23:51:14 +04:00
Jackson Tian e1ce8ba639 net: add remoteFamily for socket
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-23 23:44:57 +04:00
Shigeki Ohtsu 2bb4867312 tls: fix to send TLS Alert before socket destroyed
When TLS Alert is occured in handshake, ClearOut only write it into
wbio and does not flush to socket. TLS Alert should be written to
socket with EncOut before socket is destroyed within its error
callback.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-23 23:43:58 +04:00
Maciej Małecki 300dd3499c gyp: fix ARM build
According to V8 changelog, `armv7` config variable was replaced by
`arm_version`, with value either '7', '6' or 'default'.

Detect ARMv7 and ARMv6 CPUs and default to 'default'.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-23 23:42:22 +04:00
cjihrig ea89fdfec4 child_process: do not access stderr when stdio set to 'ignore'
Currently, checkExecSyncError() attempts to access the contents
of stderr. When stdio is set to 'ignore', this causes a crash.
This commit adds a check on the access of stderr. Closes #7966.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-23 23:39:28 +04:00
Sam Roberts 96b166f291 doc: console.trace takes a message format
Documentation claimed it accepted a single label argument, as time and
timeEnd do, which was incorrect.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-23 23:09:41 +04:00
Fedor Indutny 2f0017aa53 deps: update http_parser to 2.3.0 2014-07-23 23:08:46 +04:00
Dean McNamee ba09409479 src: export additional startup functions
This allows embedders enough control to initialize node, run the
event loop, and cleanly exit (including calling handlers).

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-23 22:47:05 +04:00
Fedor Indutny eba7aae107 gyp: fix post-mortem in v0.11
Expose missing constants and keep symbols on OSX.
2014-07-23 18:56:49 +04:00
Fedor Indutny 4c48df5a35 gyp: fix post-mortem in v0.11
Expose missing constants and keep symbols on OSX.
2014-07-23 16:25:50 +04:00
Fedor Indutny 3530fa9cd0 deps: backport 4ed5fde4f from v8 upstream
Original commit message:

    Fix x64 MathMinMax for negative untagged int32 arguments.

    An untagged int32 has zeros in the upper half even if it is negative.
    Using cmpq to compare such numbers will incorrectly ignore the sign.

    BUG=164442
    R=mvstanton@chromium.org

    Review URL: https://chromiumcodereview.appspot.com/11665007

    git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@13273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-18 14:57:18 +04:00
Fedor Indutny 1d3d8c0e55 gyp: do not let `v8dbg_` slip away on osx
Pass `-force_load` to linker when linking to `libv8_base` to preserve
`v8dbg_` symbols, which are useful for debugging.
2014-07-17 15:16:29 +04:00
Brian White 857975d5e7 tls_wrap: remove unused variable
Closes #7957.
2014-07-16 21:46:26 -07:00
Fedor Indutny 9d9fc3fa30 lib: jslint string_decoder.js 2014-07-15 12:43:59 +04:00
Chris Dickinson a96d6603b3 stream2: flush extant data on read of ended stream
A ReadableStream with a base64 StringDecoder backed by only
one or two bytes would fail to output its partial data before
ending. This fix adds a check to see if the `read` was triggered
by an internal `flow`, and if so, empties any remaining data.

fixes #7914.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-15 12:38:23 +04:00
Ryan Graham 04d6fc2c3f cluster: include settings object in 'setup' event
Emits on every call to cluster.setupMaster(), even if no new settings
are given. This is because calling cluster.setupMaster() without
arguments (or with an empty options object) results in the settings
being restored to their defaults.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-15 00:12:43 +04:00
Ryan Graham b96e38ac3a cluster: allow multiple calls to setupMaster()
Only attributes of 'cluster.settings' will be modified after the first
call, leaving all other cluster initialization alone. Each call that
includes a 'settings' argument triggers a 'setup' event to be emitted.

Instead of each call resetting all values to their defaults, use the
current settings (if any) as the default. This retains setupMaster's
support how cluster.fork() uses setupMaster() to ensure
cluster.settings has been populated.

Update example in docs to use current node coding style and include
an example of progressive configuration.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-15 00:12:43 +04:00
Fedor Indutny b692493766 test: fix regress-GH-1726 2014-07-13 23:15:52 +04:00
Dean McNamee da30c0084a src: pass the v8::Context to CreateEnvironment
Pass in the v8::Context, instead of creating it
within CreateEnvironment.  This allows callers
to use a pre-existing context.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-13 23:07:46 +04:00
cjihrig c4e5fde362 child_process: copy spawnSync() cwd option to proper buffer
The spawnSync() cwd option was being copied to the incorrect
location. This commit copies to the correct location.

Closes #7824

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-12 12:46:16 +03:00
Fedor Indutny 7f86baf5c7 child_process: handle writeUtf8String error
When handling `writeUtf8String` error, return after emitting it.
Otherwise a runtime failure can occur.

fix #7923
2014-07-12 12:35:26 +03:00
cjihrig b87ca794e3 lib: remove and restructure calls to isNaN()
Switch condition order to check for null before calling isNaN().
Also remove two unnecessary calls to isNaN() that are already
covered by calls to isFinite(). This commit targets v0.10, as
opposed to #7891, which targets master (suggested by
@bnoordhuis). Closes #7840.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:21:50 +03:00
Ryan Graham 9452ea2ef5 doc: re-org child_process into async/sync
Cleaner separation between the traditional non-blocking functions and
the new blocking variants.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:20:33 +03:00
Ryan Graham a7b14f7a89 test: Remove references to customFds
Option has been deprecated since v0.5.11

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:07:08 +03:00
Ryan Graham feac62d8d6 doc: remove customFds mentions
The feature has been marked as deprecated since v0.5.11.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:07:07 +03:00
Ryan Graham 245469587c lib: noisy deprecation of child_process customFds
Use a util.deprecate wrapper to issue warnings like any other
deprecated API. The option has been marked as deprecated in the docs
since v0.5.11.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:07:07 +03:00
Andrew Oppenlander e1fec22f97 streams: set default hwm properly for Duplex
Default highWaterMark is now set properly when using stream Duplex's
writableObjectMode and readableObjectMode options.

Added condition to the already existing split objectMode test to ensure
the highWaterMark is being set to the correct default value on both the
ReadableState and WritableState for readableObjectMode and
writableObjectMode.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 13:28:55 +03:00
Fedor Indutny 832d4db5f2 contextify: remove useless header file
fix #7910
2014-07-08 21:43:48 +03:00
John Albietz fc6eae8da2 readme: added g++ requirement
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-07 14:19:23 +03:00
Robert Kowalski 46ccb201cb module: don't require fs several times
As we are going to need fs in any case, just require it at the
beginning of the file.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-07 13:40:22 +03:00
Maurice Butler 71fc4d9486 doc: added X.json to the LOAD_AS_FILE sudo code
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-07 12:00:10 +03:00
Sam Roberts e2f2a20279 doc: fix console.assert docs, message is a format
Documentation for console.assert incorrectly described message as a
single message, but it is a format.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-07 08:44:40 +03:00
Ed Umansky df205360f5 net: reset `errorEmitted` on reconnect
Fix for `error` events emitting only once when reconnecting
a single instance of net.Socket.

Fixes joyent/node#7888

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-03 15:06:33 +04:00
Trevor Norris 803c3f0aa0 lint: fix indentation 2014-07-02 21:02:36 -07:00
Andrius Bentkus a382c9a97c udp: make it possible to receive empty udp packets
A udp packet can have 0 content. In that case nread will be equal to 0,
but addr != NULL.

Add test case for empty data gram packets and fixed test that checked
for OOB when length == 0.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-07-02 20:59:27 -07:00
Fedor Indutny 11337db35f deps: cherry-pick eca441b2 from OpenSSL
Original commit message:

    bn_exp.c: fix x86_64-specific crash with one-word modulus.

    PR: #3397

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-03 00:46:17 +04:00
Fedor Indutny 20247064b6 deps: cherry-pick eca441b2 from OpenSSL
Original commit message:

    bn_exp.c: fix x86_64-specific crash with one-word modulus.

    PR: #3397

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-03 00:45:00 +04:00
Fedor Indutny e345253562 tls: better error reporting at cert validation
fix #7417

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-03 00:41:39 +04:00
Trevor Norris 449ffecbb0 configure: fix v8 overriding commands on build
V8 seems to ignore the default value for want_separate_host_toolset and
would override it at build time. Instead always explicitly set the value.

Fixes #7833
2014-07-02 13:32:11 -07:00