Commit Graph

9519 Commits (82c2084b4ebb431153b54e598c70ced74217af79)

Author SHA1 Message Date
Ben Noordhuis 56c5806da3 doc: document os.loadavg() behavior on windows
The load average is a very UNIX-y concept.  That's why os.loadavg()
always returns zeros on Windows.  Mention that in the documentation.
2013-10-14 12:14:51 +02:00
Jason Gerfen 7f66e44dc1 crypto: add SPKAC support
Implements new class 'Certificate' within crypto object for working
with SPKAC's (signed public key & challenge) natively.
2013-10-13 10:31:20 +02:00
Rod Vagg 684dd28a6c util: format as Error if instanceof Error 2013-10-15 10:30:58 +02:00
Ben Noordhuis 45885a1e8c cluster: fix premature 'disconnect' event
Don't emit the 'disconnect' event until all workers have gone away.
Before this commit, the event was emitted when all open handles were
closed, which usually - but not always - amounts to the same thing.

Fixes #6346.
2013-10-14 11:46:09 +02:00
Ben Noordhuis 527cae22ff cares_wrap: remove superfluous 'this' keyword 2013-10-14 11:07:14 +02:00
Trevor Norris 7503e4c882 lint: fix a cpplint error
Added a NOLINT so that cpplint won't complain about some code.
2013-10-11 12:25:42 -07:00
Trevor Norris 8a295cd520 buffer: add buf.toArrayBuffer() API 2013-10-11 12:17:23 -07:00
Trevor Norris fe0bf6b7ac buffer: check data is not null
Because it's possible for the data within a Buffer instance to be
altered after instantiation, or in case a user attempts to do something
like the following:

Buffer.prototype.fill.call({}, 10, 0, 10);

It doesn't result in a segfault.
2013-10-11 11:57:05 -07:00
Glen Mailer 66b8c3c5a0 assert: indicate if exception message is generated
AssertionError.generatedMessage is now true when
AssertionError.message was generated from expected and actual

Fixes #5836, #6206
2013-10-11 10:15:03 -07:00
Dave Pacheco 720675e7db test: use proper findjsobjects output format
Closes #6329
2013-10-10 15:45:25 -07:00
Ben Noordhuis ff1efdd6ee doc: net: remove bad net.Server description
net.Server is not an instance of net.Socket so don't say it is.
2013-10-10 14:34:16 +02:00
Ben Noordhuis 51cdce8322 doc: addon: fix object instantiation examples
* Extend examples to show how to handle non-constructor invocation in
  constructor callback functions.

* Fix up examples to initialize member variables at object construction.

* Fix up a few naming inconsistencies.

Fixes #5701.
2013-10-10 14:09:39 +02:00
isaacs 9c65387673 blog: Remove wp-to-markdown script 2013-10-09 14:00:32 -07:00
Ben Noordhuis 9777890f5d tls: fix premature connection termination
Destroying the TLS session implies destroying the underlying socket but
before this commit, that was done with net.Socket#destroy() rather than
net.Socket#destroySoon().  The former closes the connection right away,
even when there is still data to write.  In other words, sometimes the
final TLS record got truncated.

Fixes #6107.
2013-10-09 19:25:47 +02:00
Dave Pacheco 98c57c7c07 dtrace: backport two byte string fix
This is a partial backport of 5921158

Re #6309
Closes #6319
2013-10-09 08:49:39 -07:00
Dave Pacheco 2b9e3fb183 mdb_v8: remove useless check 2013-10-08 13:49:22 -07:00
Dave Pacheco 5921158cbe dtrace, mdb_v8: support more string, frame types
This change makes several improvements to the ustack helper and MDB
support:

- ustack helper and MDB: add support for two-byte strings
  (necessary to print many filenames in stacktraces in 0.10 and later).
- ustack helper: fix position numbers, which were off by a factor of two
- ustack helper: fix frames with undefined Scripts (e.g., "RegExp")
- ustack helper: add stub frames
- MDB: add support for sliced strings
- MDB: sync up with changes from the illumos version of the module

Fixes #6309
Closes #6318
2013-10-08 13:48:53 -07:00
Ben Noordhuis 406846fcc5 zlib: fix write request reference counting
Keep track of the reference count, don't make the wrapper object weak
when there are pending write requests.  Fixes a regression from c79d516.
2013-10-08 08:20:43 -07:00
Ben Noordhuis b011811a9f fs: fix fs.truncate() file content zeroing bug
fs.truncate() and its synchronous sibling are implemented in terms of
open() + ftruncate().  Unfortunately, it opened the target file with
mode 'w' a.k.a. 'write-only and create or truncate at open'.

The subsequent call to ftruncate() then moved the end-of-file pointer
from zero to the requested offset with the net result of a file that's
neatly truncated at the right offset and filled with zero bytes only.

This bug was introduced in commit 168a5557 but in fairness, before that
commit fs.truncate() worked like fs.ftruncate() so it seems we've never
had a working fs.truncate() until now.

Fixes #6233.
2013-10-08 11:35:12 +02:00
Timothy J Fontaine 711ec07d34 v8: ugprade to 3.20.17.14 2013-10-07 10:18:13 -07:00
Alex Kocharin 5b230007ad debugger: count space for line numbers correctly 2013-10-06 13:15:07 +02:00
Ben Noordhuis d97ea06d88 doc: add warning to fs.exists() documentation
Warn against the open-if-exists anti-pattern, it's susceptible to
race conditions.
2013-10-05 14:54:57 +02:00
Ben Noordhuis 58729f1bcd src: fix up after botched merge conflict
Mea culpa, I didn't properly resolve a merge conflict in the last two
commits.  The resulting segmentation fault only happened on Linux and
only sometimes.

Fixes #6306.
2013-10-03 19:28:01 +02:00
Ben Noordhuis f649626c6f src: add JS start/stop methods for idle notifier
The previous commit changes the profiler idle notifier so that it only
gets started when a --prof or --prof_lazy argument is specified on the
command line.

This commit adds two internal methods to the process object that allows
one to start and stop the idle notifier programmatically.
2013-10-03 16:50:54 +02:00
Ben Noordhuis 9566fe82cd src: only start idle notifier when profiling
The previous commit adds a notifier that tells the V8 profiler when
node.js is idle, i.e. when it's about to start sleeping in the
platform's equivalent of epoll_wait().

This commit adds a heuristic that only starts the notifier when the
V8 profiler is started from the command line.
2013-10-03 16:50:54 +02:00
Ben Noordhuis 57231d5286 src: notify V8 profiler when we're idle
Inform V8's CPU profiler when we're idle.  The profiler is
sampling-based but not all samples are created equal; mark the wall
clock time spent in epoll_wait() and friends so profiling tools can
filter it out.  The samples still end up in v8.log but with state=IDLE
rather than state=EXTERNAL.
2013-10-03 16:50:54 +02:00
Ben Noordhuis 6820054d2d src: raise maximum file descriptor limit
Do a binary search for the maximum RLIMIT_NOFILE.  Works around the
low, low limits on certain high, high-priced devices from Cupertino, CA.
2013-10-03 16:27:29 +02:00
Ben Noordhuis b7f36e187d doc: link to pre-built binaries, add install note
lLnk to http://nodejs.org/download/ and add a short primer on how to
extract the tarballs.

Fixes #6292.
2013-10-01 08:37:32 +02:00
Ben Noordhuis f311963ff9 test: update require path after file move
Commit 204228b moved a few slow tests to pummel but I forgot to update
the require() path in pummel/test-debugger-repl-break-in-module.  Mea
culpa.
2013-10-01 02:55:32 +02:00
Alex Kocharin 028e652a73 debugger: show current line, fix for #6150 2013-10-01 11:17:34 +02:00
Alex Kocharin 60a1dbddd2 debugger: repeat last command
Regression introduced by commit 9ef9a9d.
2013-10-01 11:13:58 +02:00
Timothy J Fontaine a63079f34c blog: Post for v0.10.20 2013-09-30 15:06:14 -07:00
Timothy J Fontaine d537992d57 Now working on 0.10.21 2013-09-30 15:06:14 -07:00
Timothy J Fontaine 451497c81e Merge branch 'v0.10.20-release' into v0.10 2013-09-30 15:06:02 -07:00
Timothy J Fontaine d7234c8d50 2013.09.30, Version 0.10.20 (Stable)
* tls: fix sporadic hang and partial reads (Fedor Indutny)
  - fixes "npm ERR! cb() never called!"
2013-09-30 13:52:48 -07:00
Ben Noordhuis 994ce4c99f src: turn uv_pipe_open() failures into exceptions
uv_pipe_open() is unlikely to fail but when it does, the failure should
not be quietly ignored.  Raise the error as an exception.

See joyent/libuv#941.
2013-09-28 10:35:57 +02:00
Fedor Indutny 671b5be6e9 tls: fix sporadic hang and partial reads
Do not decrement size in read loop, its used later, when comparing to
`bytesRead`.

fix #6270

NOTE: Original patch contributed by @roadrunner2
2013-09-27 23:47:13 +04:00
Jeff Switzer 2e13d0ce17 fs: remove duplicate !options case
I haven't actually tested this code, but was reading it due to a
post that linked to the code here:

    http://dailyjs.com/2013/09/26/libuv/

As I was reading through the code, I noticed a path that can't
be reached.

I didn't strictly follow the contributing guide:

    https://github.com/joyent/node/wiki/Contributing

but the change seems safe.

Feel free to close this out. I'm not sure if it was just an oversight
or what.
2013-09-27 09:17:55 +02:00
Timothy J Fontaine eb091458c0 test: add regression test for #6235 2013-09-26 10:07:18 -07:00
Timothy J Fontaine 85898d1967 v8: upgrade to 3.20.17.13
fixes #6235
2013-09-26 09:19:50 -07:00
Ben Noordhuis c79d5163e5 src: remove ObjectWrap dependency from core
Drop the ObjectWrap dependency in favor of an internal WeakObject class.

Let's us stop worrying about API and ABI compatibility when making
changes to the way node.js deals with weakly persistent handles
internally.
2013-09-25 19:44:53 +02:00
Timothy J Fontaine 42af62f33a Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	configure
	deps/uv/ChangeLog
	deps/uv/src/version.c
	lib/tls.js
	src/node_version.h
2013-09-24 16:49:01 -07:00
Timothy J Fontaine cfa03ad2e3 blog: add missing shasums for v0.10.19 release 2013-09-24 15:16:44 -07:00
Timothy J Fontaine 9135c7fea8 blog: Post for v0.10.19 2013-09-24 15:10:22 -07:00
Timothy J Fontaine 093efafce3 Now working on 0.10.20 2013-09-24 15:10:22 -07:00
Timothy J Fontaine cb150406c8 Merge branch 'v0.10.19-release' into v0.10 2013-09-24 15:10:10 -07:00
Trevor Norris 25dce6d62d lint: fix a few semicolons 2013-09-24 14:35:30 -07:00
Timothy J Fontaine 6b5e6a5a3e 2013.09.24, Version 0.10.19 (Stable)
* uv: Upgrade to v0.10.17

* npm: upgrade to 1.3.11

* readline: handle input starting with control chars (Eric Schrock)

* configure: add mips-float-abi (soft, hard) option (Andrei Sedoi)

* stream: objectMode transforms allow falsey values (isaacs)

* tls: prevent duplicate values returned from read (Nathan Rajlich)

* tls: NPN protocols are now local to connections (Fedor Indutny)
2013-09-24 14:10:33 -07:00
Timothy J Fontaine 55546f55d4 uv: Upgrade to v0.10.17 2013-09-24 13:46:19 -07:00
Ben Noordhuis 14687ebfc0 Revert "deps: update v8 to 3.20.17.11"
After the upgrade from 3.20.17.7 to 3.20.17.11, we've begun hitting
random assertions in V8 in memory-constrained / GC-heavy situations.

The assertions all seem to be related to heap allocations and garbage
collection but apart from that, they're all over the place.

This reverts commit 970bdccc38.
2013-09-24 16:16:04 +02:00