platform/upstream/nodejs.git
10 years agowin: fix ObjectWrap for latest v8
Scott Blomquist [Tue, 29 Oct 2013 18:43:31 +0000 (11:43 -0700)]
win: fix ObjectWrap for latest v8

We need to keep ObjectWrap around for module authors (we think), but
v8 3.21 broke node_object_wrap.h with respect to MSVC. Coincidentally,
we no longer use ObjectWrap at all in core, and native modules might
as well use their own entirely internal implementation if they need it.

10 years agosrc: Remove unused refs to node_object_wrap.h
Scott Blomquist [Thu, 24 Oct 2013 20:10:43 +0000 (13:10 -0700)]
src: Remove unused refs to node_object_wrap.h

Turns out that we don't use node_object_wrap.h any more in core,
and, with v8 3.21, it's breaking our Windows build. Removing refs
to it everywhere (and adding node.h in one case where it was the
only way node.h was being included), we have restored the Windows
build.

10 years agosrc: accept passphrase when crypto signing with private key
Thom Seddon [Fri, 4 Oct 2013 11:59:38 +0000 (12:59 +0100)]
src: accept passphrase when crypto signing with private key

Previous behaviour was to drop to an openssl prompt
("Enter PEM pass phrase:") when supplying a private key with a
passphrase. This change adds a fourth, optional, paramter that
will be used as the passphrase.
To include this parameter in a backwards compatible way it was
necessary to expose the previously undocumented (and unexposed)
feature of being able to explitly setting the output encoding.

10 years agodgram: send() can accept strings
Trevor Norris [Mon, 28 Oct 2013 21:58:37 +0000 (14:58 -0700)]
dgram: send() can accept strings

Strings passed to Socket#send() will be passed to Buffer and parsed as
UTF8.

10 years agoMerge remote-tracking branch 'ry/v0.10'
isaacs [Mon, 28 Oct 2013 21:12:00 +0000 (14:12 -0700)]
Merge remote-tracking branch 'ry/v0.10'

10 years agonpm@1.3.13
isaacs [Mon, 28 Oct 2013 21:10:47 +0000 (14:10 -0700)]
npm@1.3.13

10 years agovm: Copy missing properties from context
isaacs [Sat, 26 Oct 2013 01:56:25 +0000 (18:56 -0700)]
vm: Copy missing properties from context

This addresses a current shortcoming of the V8 SetNamedPropertyHandler
function.

It does not provide a way to intercept Object.defineProperty(..) calls.
As a result, these properties are not copied onto the contextified
sandbox when a new global property is added via either a function
declaration or a Object.defineProperty(global, ...) call.

Note that any function declarations or Object.defineProperty() globals
that are created asynchronously (in a setTimeout, callback, etc.) will
happen AFTER the call to copy properties, and thus not be caught.

The way to properly fix this is to add some sort of a
Object::SetNamedDefinePropertyHandler() function that takes a callback,
which receives the property name and property descriptor as arguments.

Luckily, such situations are rare, and asynchronously-added globals
weren't supported by Node's VM module until 0.12 anyway.  But, this
should be fixed properly in V8, and this copy function should be removed
once there is a better way.

Fix #6416

10 years agohttp: remove MethodToString()
Ben Noordhuis [Mon, 28 Oct 2013 12:44:41 +0000 (13:44 +0100)]
http: remove MethodToString()

The list of supported HTTP methods is available in JS land now so there
is no longer any need to pass a stringified version of the method to the
parser callback, it can look up the method name for itself.

Saves a call to v8::Eternal::Get() in the common case and a costly
v8::String::NewFromOneByte() in the uncommon case.

10 years agohttp: expose supported methods
Ben Noordhuis [Mon, 28 Oct 2013 12:35:33 +0000 (13:35 +0100)]
http: expose supported methods

Expose the list of supported HTTP methods as a property on the 'http'
module object.

Fixes #6422.

10 years agodoc: fs: clarify fs.symlink Windows specific args
Phillip Alexander [Sat, 26 Oct 2013 20:13:56 +0000 (13:13 -0700)]
doc: fs: clarify fs.symlink Windows specific args

10 years agodoc: improve module documentation
Ryan Graham [Sat, 26 Oct 2013 05:03:02 +0000 (22:03 -0700)]
doc: improve module documentation

Expands on when to use module.exports vs. exports. This is a recurring
question on mailing list and continues to confuse new devs.

10 years agodoc: fix missing backtick in 2e16037
Sam Roberts [Fri, 25 Oct 2013 20:16:50 +0000 (13:16 -0700)]
doc: fix missing backtick in 2e16037

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Fri, 25 Oct 2013 18:26:05 +0000 (11:26 -0700)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
ChangeLog
deps/uv/ChangeLog
deps/uv/include/uv-darwin.h
deps/uv/src/unix/fsevents.c
deps/uv/src/unix/process.c
deps/uv/src/version.c
doc/api/addons.markdown
doc/api/cluster.markdown
doc/api/http.markdown
lib/http.js
lib/tls.js
src/node_crypto.cc
src/node_http_parser.cc
src/node_version.h
src/pipe_wrap.cc
src/v8abbr.h
src/v8ustack.d
test/simple/test-http-pipeline-flood.js

10 years agodoc: streams: document default objectMode setting
Brian White [Thu, 24 Oct 2013 02:43:23 +0000 (22:43 -0400)]
doc: streams: document default objectMode setting

10 years agodebugger: Fix bug in sb() with unnamed script
Maxim Bogushevich [Tue, 22 Oct 2013 07:27:02 +0000 (17:27 +1000)]
debugger: Fix bug in sb() with unnamed script

setBreakpoint() cause error when unnamed script is loaded

10 years agonpm@1.3.12
isaacs [Thu, 24 Oct 2013 16:21:59 +0000 (09:21 -0700)]
npm@1.3.12

10 years agobuild: fix test-gc weakref build rule
Ben Noordhuis [Wed, 23 Oct 2013 11:42:53 +0000 (13:42 +0200)]
build: fix test-gc weakref build rule

Make the build rule depend on the build artifact (weakref.node) itself
rather than the directory it's built in.  Depending on the directory
means that a build failure won't trigger a rebuild on the next
invocation because the directory's timestamp has been updated.

This is a back-port of commit 1189571 from the master branch that
hopefully fixes the following CI error:

    executing:  make test/gc/node_modules/weak/build/
    make: *** No rule to make target `test/gc/node_modules/weak/build/'.
    Command exited with non-zero: make test/gc/node_modules/weak/build/
    Build step 'Execute NodeJS script' marked build as failure

10 years agodoc: add nodejs.rs to the community page
Zarko Stankovic [Thu, 12 Sep 2013 18:13:32 +0000 (20:13 +0200)]
doc: add nodejs.rs to the community page

10 years agohttp client: pull last chunk on socket close
isaacs [Wed, 23 Oct 2013 20:08:06 +0000 (13:08 -0700)]
http client: pull last chunk on socket close

When the socket closes, the client's http incoming message object was
emitting an 'aborted' event if it had not yet been ended.

However, it's possible, when a response is being repeatedly paused and
resumed (eg, if piped to a slow FS write stream), that there will be a
final chunk remaining in the js-land buffer when the socket is torn
down.

When that happens, the socketCloseListener function detects that we have
not yet reached the end of the response message data, and treats this as
an abrupt abort, immediately (and forcibly) ending the incoming message
data stream, and discarding that final chunk of data.

The result is that, for example, npm will have problems because tarballs
are missing a few bytes off the end, every time.

Closes GH-6402

10 years agotest: fix up weakref.cc after v8 api change
Ben Noordhuis [Wed, 23 Oct 2013 11:45:57 +0000 (13:45 +0200)]
test: fix up weakref.cc after v8 api change

10 years agobuild: fix test-gc weakref build rule
Ben Noordhuis [Wed, 23 Oct 2013 11:42:53 +0000 (13:42 +0200)]
build: fix test-gc weakref build rule

Make the build rule depend on the build artifact (weakref.node) itself
rather than the directory it's built in.  Depending on the directory
means that a build failure won't trigger a rebuild on the next
invocation because the directory's timestamp has been updated.

10 years agosrc: update after v8 api changes
Ben Noordhuis [Tue, 22 Oct 2013 22:17:45 +0000 (15:17 -0700)]
src: update after v8 api changes

10 years agov8: upgrade 3.21.18.3
Timothy J Fontaine [Tue, 22 Oct 2013 22:14:25 +0000 (15:14 -0700)]
v8: upgrade 3.21.18.3

10 years agosrc: IsInt64() should return bool, not int
Ben Noordhuis [Wed, 23 Oct 2013 11:25:35 +0000 (13:25 +0200)]
src: IsInt64() should return bool, not int

10 years agoblog: HTTP server DoS vulnerability details
isaacs [Tue, 22 Oct 2013 17:56:03 +0000 (10:56 -0700)]
blog: HTTP server DoS vulnerability details

CVE-2013-4450

10 years agoblog: Post for v0.10.21
Timothy J Fontaine [Fri, 18 Oct 2013 22:46:02 +0000 (15:46 -0700)]
blog: Post for v0.10.21

10 years agoblog: Post for v0.8.26
Timothy J Fontaine [Fri, 18 Oct 2013 22:43:55 +0000 (15:43 -0700)]
blog: Post for v0.8.26

10 years agoNow working on 0.10.22
Timothy J Fontaine [Fri, 18 Oct 2013 22:40:32 +0000 (15:40 -0700)]
Now working on 0.10.22

10 years agoMerge branch 'v0.10.21-release' into v0.10
Timothy J Fontaine [Fri, 18 Oct 2013 22:39:56 +0000 (15:39 -0700)]
Merge branch 'v0.10.21-release' into v0.10

10 years ago2013.10.18, Version 0.10.21 (Stable) v0.10.21
Timothy J Fontaine [Fri, 18 Oct 2013 21:26:27 +0000 (14:26 -0700)]
2013.10.18, Version 0.10.21 (Stable)

* uv: Upgrade to v0.10.18

* crypto: clear errors from verify failure (Timothy J Fontaine)

* dtrace: interpret two byte strings (Dave Pacheco)

* fs: fix fs.truncate() file content zeroing bug (Ben Noordhuis)

* http: provide backpressure for pipeline flood (isaacs)

* tls: fix premature connection termination (Ben Noordhuis)

10 years agocrypto: clear errors from verify failure
Timothy J Fontaine [Fri, 18 Oct 2013 21:14:21 +0000 (14:14 -0700)]
crypto: clear errors from verify failure

OpenSSL will push errors onto the stack when a verify fails, which can
disrupt TLS and other routines if we don't clear the error stack

Fixes #6304

10 years agouv: Upgrade to v0.10.18
Timothy J Fontaine [Fri, 18 Oct 2013 20:52:15 +0000 (13:52 -0700)]
uv: Upgrade to v0.10.18

10 years agohttp: add statusMessage
Patrik Stutz [Thu, 17 Oct 2013 00:11:19 +0000 (02:11 +0200)]
http: add statusMessage

Now the status message can be set via req.statusMessage = 'msg';

10 years agohttp: provide backpressure for pipeline flood
isaacs [Wed, 16 Oct 2013 19:57:46 +0000 (12:57 -0700)]
http: provide backpressure for pipeline flood

If a client sends a lot more pipelined requests than we can handle, then
we need to provide backpressure so that the client knows to back off.
Do this by pausing both the stream and the parser itself when the
responses are not being read by the downstream client.

Backport of 085dd30

10 years agohttp_parser: expose pause/resume method for parser
Timothy J Fontaine [Mon, 14 Oct 2013 18:57:45 +0000 (11:57 -0700)]
http_parser: expose pause/resume method for parser

10 years agodoc: cluster documentation cleanup and corrections
Sam Roberts [Fri, 26 Jul 2013 01:17:38 +0000 (18:17 -0700)]
doc: cluster documentation cleanup and corrections

- fixed some incomprehensible wording ("event assigned to..."?)
- removed undocumented and unnecessary process properties from example
- corrected the docs on the default for the exec setting
- described when workers are removed from cluster.workers
- described addressType, which was documented as existing, but not what
  values it might have
- spell out more clearly the limitations of setupMaster
- describe disconnect in sufficient detail that why a child does or does
  not exit can be understood
- clarify which cluster functions and events are available on process or
  just on the worker, as well as which are not available in children,
- don't describe events as the same, when they have receive different
  arguments
- fix misleading disconnect example: since disconnect already calls
  close on all servers, doing it again in the example is a no-op, not
  the "force close" it was claimed to be
- document the error event, not catching it will kill your node
- describe suicide better, it is important, and a bit unintuitive
  (process.exit() is not suicide?)
- use worker consistently throughout, instead of child.

10 years agodoc: child_process corrections and cleanups
Sam Roberts [Fri, 26 Jul 2013 00:35:21 +0000 (17:35 -0700)]
doc: child_process corrections and cleanups

- Make explicit that .disconnected is set before the disconnect event,
  and it is not allowed to send messages after calling .disconnect(),
  even while waiting for a delayed disconect event.
- Remove obsolete claim that explicit exit is required
- Describe silent: in the options for fork()
- Describe .connected as the property it is, not just as an aside in
  the disconnect() method

10 years agocpplint: disallow if one-liners
Fedor Indutny [Wed, 16 Oct 2013 16:57:26 +0000 (20:57 +0400)]
cpplint: disallow if one-liners

10 years agocpplint: disallow comma-first in C++
Fedor Indutny [Wed, 16 Oct 2013 16:34:39 +0000 (20:34 +0400)]
cpplint: disallow comma-first in C++

10 years agodns: set hostname property on error object
Ben Noordhuis [Tue, 15 Oct 2013 11:01:23 +0000 (13:01 +0200)]
dns: set hostname property on error object

Make debugging and logging easier: when a DNS lookup for a hostname
fails, set the hostname as a property on the error object.

Fixes #5393.

10 years agodns: rename domain to hostname
Ben Noordhuis [Tue, 15 Oct 2013 10:51:12 +0000 (12:51 +0200)]
dns: rename domain to hostname

A follow-up commit will save the domain name on the request object but
we can't call that property 'domain' because that gets intercepted by
src/node.cc and lib/domain.js to implement the node.js feature of the
same name.

To avoid confusion, rename all variables called 'domain' to 'hostname'.

10 years agodebugger: fix SIGUSR1 bootstrap race condition
Ben Noordhuis [Wed, 16 Oct 2013 00:54:24 +0000 (02:54 +0200)]
debugger: fix SIGUSR1 bootstrap race condition

Before this commit, the SIGUSR1 signal handler wasn't installed until
late in the bootstrapping process and we were prone to miss signals
sent by other processes.

This commit installs an early-boot signal handler that merely records
the fact that we received a signal.  Once the debugger infrastructure
is in place, the signal is re-raised, kickstarting the debugger.

Among other things, this means that simple/test-debugger-client is
now _much_ less likely to fail.

10 years agodebugger: make busy loops SIGUSR1-interruptible
Ben Noordhuis [Tue, 15 Oct 2013 21:32:18 +0000 (23:32 +0200)]
debugger: make busy loops SIGUSR1-interruptible

Commit 30e5366b ("core: Use a uv_signal for debug listener") changed
SIGUSR1 handling from a signal handler to libuv's uv_signal_*()
functionality to fix a race condition (and possible hang) in the
signal handler.

While a good change in itself, it made it impossible to interrupt
long running scripts.  When a script is stuck in a busy loop, control
never returns to the event loop, which in turn means the signal
callback - and therefore the debugger - is never invoked.

This commit changes SIGUSR1 handling back to a normal signal handler
but one that treads _very_ carefully.

10 years agohttp: provide backpressure for pipeline flood
isaacs [Thu, 10 Oct 2013 22:00:05 +0000 (15:00 -0700)]
http: provide backpressure for pipeline flood

If a client sends a lot more pipelined requests than we can handle, then
we need to provide backpressure so that the client knows to back off.
Do this by pausing both the stream and the parser itself when the
responses are not being read by the downstream client.

Fix GH-6214

10 years agohttp_parser: expose pause/resume method for parser
Timothy J Fontaine [Sun, 13 Oct 2013 00:47:35 +0000 (17:47 -0700)]
http_parser: expose pause/resume method for parser

10 years agodoc: crypto: document SPKAC additions
Jason Gerfen [Tue, 15 Oct 2013 14:31:14 +0000 (08:31 -0600)]
doc: crypto: document SPKAC additions

Document the SPKAC functionality that was added in commit 7bf46ba.

10 years agocrypto: add SPKAC support
Jason Gerfen [Thu, 10 Oct 2013 20:24:53 +0000 (13:24 -0700)]
crypto: add SPKAC support

Implements new class 'Certificate' within crypto object for working
with SPKAC's (signed public key & challenge) natively.

10 years agodoc: http: reword IncomingMessage 'close' event
Ben Noordhuis [Wed, 16 Oct 2013 10:32:47 +0000 (12:32 +0200)]
doc: http: reword IncomingMessage 'close' event

The bit that says "before response.end() was called or able to flush"
doesn't apply to incoming streams.

Fixes #6359.

10 years agodoc: http: add cross-links for easier clicking
Ben Noordhuis [Wed, 16 Oct 2013 10:20:25 +0000 (12:20 +0200)]
doc: http: add cross-links for easier clicking

Make it a little easier to navigate the http module documentation by
turning class names and methods into links to the appropriate section.

10 years agoRevert "doc: crypto: document SPKAC additions"
isaacs [Tue, 15 Oct 2013 22:59:05 +0000 (15:59 -0700)]
Revert "doc: crypto: document SPKAC additions"

This reverts commit aa94450b31a28d6251df3b88fdd652ddd1e67a69.

10 years agoRevert "crypto: add SPKAC support"
isaacs [Tue, 15 Oct 2013 22:58:58 +0000 (15:58 -0700)]
Revert "crypto: add SPKAC support"

This reverts commit 7f66e44dc1e90e7abda2a9ed02d7e8163e1f6358.

10 years agodoc: crypto: document SPKAC additions
Jason Gerfen [Tue, 15 Oct 2013 14:31:14 +0000 (08:31 -0600)]
doc: crypto: document SPKAC additions

Document the SPKAC functionality that was added in commit 7f66e44.

10 years agodoc: expand os.loadavg() section
Ben Noordhuis [Tue, 15 Oct 2013 08:01:50 +0000 (10:01 +0200)]
doc: expand os.loadavg() section

Add a short explanation of what the load average is and why it's
unavailable on Windows.

Also sneak in a fix for a typo that I introduced in commit 56c5806.

10 years agodoc: document os.loadavg() behavior on windows
Ben Noordhuis [Mon, 14 Oct 2013 11:15:00 +0000 (12:15 +0100)]
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.

10 years agocrypto: add SPKAC support
Jason Gerfen [Thu, 10 Oct 2013 20:24:53 +0000 (13:24 -0700)]
crypto: add SPKAC support

Implements new class 'Certificate' within crypto object for working
with SPKAC's (signed public key & challenge) natively.

10 years agoutil: format as Error if instanceof Error
Rod Vagg [Tue, 15 Oct 2013 01:26:18 +0000 (12:26 +1100)]
util: format as Error if instanceof Error

10 years agocluster: fix premature 'disconnect' event
Ben Noordhuis [Mon, 14 Oct 2013 09:38:53 +0000 (11:38 +0200)]
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.

10 years agocares_wrap: remove superfluous 'this' keyword
Ben Noordhuis [Mon, 14 Oct 2013 09:07:14 +0000 (11:07 +0200)]
cares_wrap: remove superfluous 'this' keyword

10 years agolint: fix a cpplint error
Trevor Norris [Fri, 4 Oct 2013 03:43:35 +0000 (20:43 -0700)]
lint: fix a cpplint error

Added a NOLINT so that cpplint won't complain about some code.

10 years agobuffer: add buf.toArrayBuffer() API
Trevor Norris [Fri, 11 Oct 2013 18:44:56 +0000 (11:44 -0700)]
buffer: add buf.toArrayBuffer() API

10 years agobuffer: check data is not null
Trevor Norris [Fri, 11 Oct 2013 18:11:36 +0000 (11:11 -0700)]
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.

10 years agoassert: indicate if exception message is generated
Glen Mailer [Wed, 11 Sep 2013 16:18:25 +0000 (17:18 +0100)]
assert: indicate if exception message is generated

AssertionError.generatedMessage is now true when
AssertionError.message was generated from expected and actual

Fixes #5836, #6206

10 years agotest: use proper findjsobjects output format
Dave Pacheco [Thu, 10 Oct 2013 16:41:59 +0000 (09:41 -0700)]
test: use proper findjsobjects output format

Closes #6329

10 years agodoc: net: remove bad net.Server description
Ben Noordhuis [Thu, 10 Oct 2013 12:34:15 +0000 (14:34 +0200)]
doc: net: remove bad net.Server description

net.Server is not an instance of net.Socket so don't say it is.

10 years agodoc: addon: fix object instantiation examples
Ben Noordhuis [Thu, 10 Oct 2013 12:09:38 +0000 (14:09 +0200)]
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.

10 years agoblog: Remove wp-to-markdown script
isaacs [Mon, 9 Sep 2013 11:31:05 +0000 (12:31 +0100)]
blog: Remove wp-to-markdown script

10 years agotls: fix premature connection termination
Ben Noordhuis [Wed, 9 Oct 2013 15:46:17 +0000 (17:46 +0200)]
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.

10 years agodtrace: backport two byte string fix
Dave Pacheco [Fri, 4 Oct 2013 22:02:42 +0000 (15:02 -0700)]
dtrace: backport two byte string fix

This is a partial backport of 5921158

Re #6309
Closes #6319

10 years agomdb_v8: remove useless check
Dave Pacheco [Mon, 7 Oct 2013 21:20:00 +0000 (14:20 -0700)]
mdb_v8: remove useless check

10 years agodtrace, mdb_v8: support more string, frame types
Dave Pacheco [Mon, 7 Oct 2013 20:17:49 +0000 (13:17 -0700)]
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

10 years agozlib: fix write request reference counting
Ben Noordhuis [Sat, 5 Oct 2013 17:48:33 +0000 (19:48 +0200)]
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.

10 years agofs: fix fs.truncate() file content zeroing bug
Ben Noordhuis [Tue, 8 Oct 2013 09:25:22 +0000 (11:25 +0200)]
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.

10 years agov8: ugprade to 3.20.17.14
Timothy J Fontaine [Mon, 7 Oct 2013 17:17:04 +0000 (10:17 -0700)]
v8: ugprade to 3.20.17.14

10 years agodebugger: count space for line numbers correctly
Alex Kocharin [Sun, 6 Oct 2013 05:22:41 +0000 (09:22 +0400)]
debugger: count space for line numbers correctly

10 years agodoc: add warning to fs.exists() documentation
Ben Noordhuis [Sat, 5 Oct 2013 12:45:10 +0000 (14:45 +0200)]
doc: add warning to fs.exists() documentation

Warn against the open-if-exists anti-pattern, it's susceptible to
race conditions.

10 years agosrc: fix up after botched merge conflict
Ben Noordhuis [Thu, 3 Oct 2013 17:27:51 +0000 (19:27 +0200)]
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.

10 years agosrc: add JS start/stop methods for idle notifier
Ben Noordhuis [Thu, 3 Oct 2013 09:03:46 +0000 (11:03 +0200)]
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.

10 years agosrc: only start idle notifier when profiling
Ben Noordhuis [Thu, 3 Oct 2013 08:45:32 +0000 (10:45 +0200)]
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.

10 years agosrc: notify V8 profiler when we're idle
Ben Noordhuis [Wed, 2 Oct 2013 04:37:44 +0000 (06:37 +0200)]
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.

10 years agosrc: raise maximum file descriptor limit
Ben Noordhuis [Wed, 2 Oct 2013 10:17:57 +0000 (12:17 +0200)]
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.

10 years agodoc: link to pre-built binaries, add install note
Ben Noordhuis [Tue, 1 Oct 2013 06:35:24 +0000 (08:35 +0200)]
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.

10 years agotest: update require path after file move
Ben Noordhuis [Tue, 1 Oct 2013 00:55:30 +0000 (02:55 +0200)]
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.

10 years agodebugger: show current line, fix for #6150
Alex Kocharin [Sat, 28 Sep 2013 20:26:15 +0000 (00:26 +0400)]
debugger: show current line, fix for #6150

10 years agodebugger: repeat last command
Alex Kocharin [Sat, 28 Sep 2013 22:57:33 +0000 (02:57 +0400)]
debugger: repeat last command

Regression introduced by commit 9ef9a9d.

10 years agoblog: Post for v0.10.20
Timothy J Fontaine [Mon, 30 Sep 2013 22:06:14 +0000 (15:06 -0700)]
blog: Post for v0.10.20

10 years agoNow working on 0.10.21
Timothy J Fontaine [Mon, 30 Sep 2013 22:06:14 +0000 (15:06 -0700)]
Now working on 0.10.21

10 years agoMerge branch 'v0.10.20-release' into v0.10
Timothy J Fontaine [Mon, 30 Sep 2013 22:06:02 +0000 (15:06 -0700)]
Merge branch 'v0.10.20-release' into v0.10

10 years ago2013.09.30, Version 0.10.20 (Stable) v0.10.20
Timothy J Fontaine [Mon, 30 Sep 2013 20:52:48 +0000 (13:52 -0700)]
2013.09.30, Version 0.10.20 (Stable)

* tls: fix sporadic hang and partial reads (Fedor Indutny)
  - fixes "npm ERR! cb() never called!"

10 years agosrc: turn uv_pipe_open() failures into exceptions
Ben Noordhuis [Sat, 28 Sep 2013 08:27:11 +0000 (10:27 +0200)]
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.

10 years agotls: fix sporadic hang and partial reads
Fedor Indutny [Fri, 27 Sep 2013 19:47:13 +0000 (23:47 +0400)]
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

10 years agofs: remove duplicate !options case
Jeff Switzer [Fri, 27 Sep 2013 03:03:59 +0000 (23:03 -0400)]
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.

10 years agotest: add regression test for #6235
Timothy J Fontaine [Thu, 26 Sep 2013 17:07:18 +0000 (10:07 -0700)]
test: add regression test for #6235

10 years agov8: upgrade to 3.20.17.13
Timothy J Fontaine [Thu, 26 Sep 2013 16:18:06 +0000 (09:18 -0700)]
v8: upgrade to 3.20.17.13

fixes #6235

10 years agosrc: remove ObjectWrap dependency from core
Ben Noordhuis [Wed, 25 Sep 2013 10:57:03 +0000 (12:57 +0200)]
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.

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Tue, 24 Sep 2013 23:49:01 +0000 (16:49 -0700)]
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

10 years agoblog: add missing shasums for v0.10.19 release
Timothy J Fontaine [Tue, 24 Sep 2013 22:16:44 +0000 (15:16 -0700)]
blog: add missing shasums for v0.10.19 release

10 years agoblog: Post for v0.10.19
Timothy J Fontaine [Tue, 24 Sep 2013 22:10:22 +0000 (15:10 -0700)]
blog: Post for v0.10.19

10 years agoNow working on 0.10.20
Timothy J Fontaine [Tue, 24 Sep 2013 22:10:22 +0000 (15:10 -0700)]
Now working on 0.10.20

10 years agoMerge branch 'v0.10.19-release' into v0.10
Timothy J Fontaine [Tue, 24 Sep 2013 22:10:10 +0000 (15:10 -0700)]
Merge branch 'v0.10.19-release' into v0.10

10 years agolint: fix a few semicolons
Trevor Norris [Tue, 24 Sep 2013 21:35:30 +0000 (14:35 -0700)]
lint: fix a few semicolons