platform/upstream/nodejs.git
11 years agosrc: unexport node_isolate
Ben Noordhuis [Fri, 7 Jun 2013 14:47:54 +0000 (16:47 +0200)]
src: unexport node_isolate

Commit 0bba5902 accidentally (or maybe erroneously) added node_isolate
to src/node.h and src/node_object_wrap.h.

Undo that, said variable is not for public consumption. Add-on authors
should use v8::Isolate::GetCurrent() instead.

I missed that while reviewing. Mea culpa.

Fixes #5639.

11 years agoMerge remote-tracking branch 'ry/v0.10'
isaacs [Wed, 5 Jun 2013 20:38:38 +0000 (13:38 -0700)]
Merge remote-tracking branch 'ry/v0.10'

Conflicts:
ChangeLog
deps/uv/AUTHORS
deps/uv/ChangeLog
deps/uv/src/unix/linux-core.c
deps/uv/src/version.c
deps/uv/src/win/timer.c
lib/url.js
src/node_version.h
test/simple/test-url.js

11 years agonet: Destroy when not readable and not writable
isaacs [Wed, 5 Jun 2013 06:43:29 +0000 (23:43 -0700)]
net: Destroy when not readable and not writable

This is only relevant for CentOS 6.3 using kernel version 2.6.32.

On other linuxes and darwin, the `read` call gets an ECONNRESET in that
case.  On sunos, the `write` call fails with EPIPE.

However, old CentOS will occasionally send an EOF instead of a
ECONNRESET or EPIPE when the client has been destroyed abruptly.

Make sure we don't keep trying to write or read more in that case.

Fixes #5504

However, there is still the question of what libuv should do when it
gets an EOF.  Apparently in this case, it will continue trying to read,
which is almost certainly the wrong thing to do.

That should be fixed in libuv, even though this works around the issue.

11 years agoNow working on v0.10.11
isaacs [Tue, 4 Jun 2013 21:38:41 +0000 (14:38 -0700)]
Now working on v0.10.11

11 years agoblog: Release v0.10.10
isaacs [Tue, 4 Jun 2013 21:38:29 +0000 (14:38 -0700)]
blog: Release v0.10.10

11 years agoMerge branch 'v0.10.10-release' into v0.10
isaacs [Tue, 4 Jun 2013 21:38:10 +0000 (14:38 -0700)]
Merge branch 'v0.10.10-release' into v0.10

11 years ago2013.06.04, Version 0.10.10 (Stable) v0.10.10
isaacs [Tue, 4 Jun 2013 19:13:46 +0000 (12:13 -0700)]
2013.06.04, Version 0.10.10 (Stable)

* uv: Upgrade to 0.10.10

* npm: Upgrade to 1.2.25

* url: Properly parse certain oddly formed urls (isaacs)

* stream: unshift('') is a noop (isaacs)

11 years agouv: Upgrade to 0.10.10
isaacs [Tue, 4 Jun 2013 19:11:03 +0000 (12:11 -0700)]
uv: Upgrade to 0.10.10

11 years agourl: remove unused global variable
Ben Noordhuis [Tue, 21 May 2013 21:04:58 +0000 (23:04 +0200)]
url: remove unused global variable

11 years agonpm: Upgrade to 1.2.25
isaacs [Tue, 4 Jun 2013 18:42:32 +0000 (11:42 -0700)]
npm: Upgrade to 1.2.25

11 years agodoc: ChangeLog update for v0.8.24
isaacs [Tue, 4 Jun 2013 18:22:14 +0000 (11:22 -0700)]
doc: ChangeLog update for v0.8.24

11 years agoblog: 0.8 is maintenace, not stable
isaacs [Tue, 4 Jun 2013 18:19:10 +0000 (11:19 -0700)]
blog: 0.8 is maintenace, not stable

11 years agoblog: Release v0.8.24
isaacs [Tue, 4 Jun 2013 18:12:54 +0000 (11:12 -0700)]
blog: Release v0.8.24

11 years agoblog: Release v0.10.9
isaacs [Tue, 4 Jun 2013 18:12:44 +0000 (11:12 -0700)]
blog: Release v0.10.9

11 years agosrc: replace ngx-queue.h with queue.h
Ben Noordhuis [Tue, 4 Jun 2013 10:21:58 +0000 (12:21 +0200)]
src: replace ngx-queue.h with queue.h

No functional changes, just one less entry in the LICENSE file.

11 years agosrc: wrap macros in `do {...} while (0)`
Nick Desaulniers [Tue, 4 Jun 2013 07:09:00 +0000 (00:09 -0700)]
src: wrap macros in `do {...} while (0)`

Wrapped two macros in do {...} while (0) blocks and lined up
backslashes.  Uses up semicolon in contexts where a dangling semicolon
is erroneous.

11 years agourl: Set href to null by default
isaacs [Mon, 3 Jun 2013 23:02:51 +0000 (16:02 -0700)]
url: Set href to null by default

11 years agourl: Properly parse certain oddly formed urls
isaacs [Mon, 3 Jun 2013 20:39:57 +0000 (13:39 -0700)]
url: Properly parse certain oddly formed urls

In cases where there are multiple @-chars in a url, Node currently
parses the hostname and auth sections differently than web browsers.

This part of the bug is serious, and should be landed in v0.10, and
also ported to v0.8, and releases made as soon as possible.

The less serious issue is that there are many other sorts of malformed
urls which Node either accepts when it should reject, or interprets
differently than web browsers.  For example, `http://a.com*foo` is
interpreted by Node like `http://a.com/*foo` when web browsers treat
this as `http://a.com%3Bfoo/`.

In general, *only* the `hostEndingChars` should be the characters that
delimit the host portion of the URL.  Most of the current `nonHostChars`
that appear in the hostname should be escaped, but some of them (such as
`;` and `%` when it does not introduce a hex pair) should raise an
error.

We need to have a broader discussion about whether it's best to throw in
these cases, and potentially break extant programs, or return an object
that has every field set to `null` so that any attempt to read the
hostname/auth/etc. will appear to be empty.

11 years agostream: unshift('') is a noop
isaacs [Mon, 3 Jun 2013 17:50:02 +0000 (10:50 -0700)]
stream: unshift('') is a noop

In some cases, the http CONNECT/Upgrade API is unshifting an empty
bodyHead buffer onto the socket.

Normally, stream.unshift(chunk) does not set state.reading=false.
However, this check was not being done for the case when the chunk was
empty (either `''` or `Buffer(0)`), and as a result, it was causing the
socket to think that a read had completed, and to stop providing data.

This bug is not limited to http or web sockets, but rather would affect
any parser that unshifts data back onto the source stream without being
very careful to never unshift an empty chunk.  Since the intent of
unshift is to *not* change the state.reading property, this is a bug.

Fixes #5557
Fixes LearnBoost/socket.io#1242

11 years agoMerge remote-tracking branch 'ry/v0.10'
isaacs [Fri, 31 May 2013 18:52:57 +0000 (11:52 -0700)]
Merge remote-tracking branch 'ry/v0.10'

Conflicts:
ChangeLog
src/node_version.h

11 years agoprocess: use Tock for nextTickQueue items
Trevor Norris [Thu, 30 May 2013 23:51:41 +0000 (16:51 -0700)]
process: use Tock for nextTickQueue items

v8 plays very well with constructed objects, so we're using one in the
nextTickQueue.

11 years agosrc: remove old comment code
Trevor Norris [Thu, 30 May 2013 22:09:50 +0000 (15:09 -0700)]
src: remove old comment code

Now that maxTickDepth no longer exists there's no depth index on
infoBox. Forgot to remove the comment about this.

11 years agoprocess: remove spinner
Trevor Norris [Thu, 30 May 2013 17:33:29 +0000 (10:33 -0700)]
process: remove spinner

Remove the need to call start/stop the uv_idle spinner between
MakeCallbacks. The one place where the tick processor needs to be kicked
is where a user catches uncaughtException. For that we'll now use
setImmediate, which accomplishes the same task.

11 years agoNow working on v0.10.10
isaacs [Thu, 30 May 2013 18:28:07 +0000 (11:28 -0700)]
Now working on v0.10.10

11 years agoMerge branch 'v0.10.9-release' into v0.10
isaacs [Thu, 30 May 2013 18:27:50 +0000 (11:27 -0700)]
Merge branch 'v0.10.9-release' into v0.10

11 years ago2013.05.30, Version 0.10.9 (Stable) v0.10.9
isaacs [Thu, 30 May 2013 17:31:07 +0000 (10:31 -0700)]
2013.05.30, Version 0.10.9 (Stable)

* npm: Upgrade to 1.2.24

* uv: Upgrade to v0.10.9

* repl: fix JSON.parse error check (Brian White)

* tls: proper .destroySoon (Fedor Indutny)

* tls: invoke write cb only after opposite read end (Fedor Indutny)

* tls: ignore .shutdown() syscall error (Fedor Indutny)

11 years agonpm: Upgrade to 1.2.24
isaacs [Thu, 30 May 2013 17:19:45 +0000 (10:19 -0700)]
npm: Upgrade to 1.2.24

11 years agoprocess: remove max tick check for domains
Trevor Norris [Thu, 30 May 2013 08:38:19 +0000 (01:38 -0700)]
process: remove max tick check for domains

maxTickDepth checks have been removed for domains and replaced with a
flag that checks if the last callback threw. If it did then execution of
the remaining tickQueue is deferred to the spinner.

This is to prevent domains from entering a continuous loop when an error
callback also throws an error.

11 years agoprocess: remove maxTickDepth from _tickCallback
Trevor Norris [Wed, 29 May 2013 22:19:34 +0000 (15:19 -0700)]
process: remove maxTickDepth from _tickCallback

Removes the check for maxTickDepth for non-domain callbacks. So a user
can starve I/O by setting a recursive nextTick.

The domain case is more complex and will be addressed in another commit.

11 years agoprocess: relocate needSpinner calls
Trevor Norris [Wed, 29 May 2013 21:52:10 +0000 (14:52 -0700)]
process: relocate needSpinner calls

It's only necessary to request the spinner once tickDone has been
called, and not on every nextTick.

11 years agovm: fix race condition in watchdog cleanup
Andrew Paprocki [Tue, 28 May 2013 17:16:16 +0000 (13:16 -0400)]
vm: fix race condition in watchdog cleanup

Previous code was calling uv_loop_delete() directly on a running loop,
which led to race condition aborts/segfaults within libuv.  This change
changes the watchdog thread to call uv_run() with UV_RUN_ONCE so that
the call exits after either the timer times out or uv_async_send() is
called from the main thread in Watchdog::Destroy().  The timer/async
handles are then closed and uv_run() with UV_RUN_DEFAULT is called so
that libuv has a chance to cleanup before the thread exits.  The main
thread meanwhile calls uv_thread_join() and then uv_loop_delete() to
complete the cleanup.

11 years agodoc: remove `bufferSize` option
Kiyoshi Nomo [Wed, 22 May 2013 14:22:21 +0000 (23:22 +0900)]
doc: remove `bufferSize` option

`bufferSize` option has been removed in b0f6789.

11 years agoevents: define properties on prototype
Ryunosuke SATO [Sat, 25 May 2013 20:03:02 +0000 (05:03 +0900)]
events: define properties on prototype

Speeds up EventEmitter object construction by about 15-20%.

11 years agorepl: fix JSON.parse error check
Brian White [Sun, 26 May 2013 16:26:39 +0000 (12:26 -0400)]
repl: fix JSON.parse error check

Before this, entering something like:

> JSON.parse('066');

resulted in the "..." prompt instead of displaying the expected
"SyntaxError: Unexpected number"

11 years agobuffer: return `this` in fill() for chainability
Brian White [Wed, 29 May 2013 03:36:26 +0000 (23:36 -0400)]
buffer: return `this` in fill() for chainability

11 years agotls: proper .destroySoon
Fedor Indutny [Thu, 30 May 2013 09:35:24 +0000 (13:35 +0400)]
tls: proper .destroySoon

1. Emit `sslOutEnd` only when `_internallyPendingBytes() === 0`.
2. Read before checking `._halfRead`, otherwise we'll see only previous
   value, and will invoke `._write` callback improperly.
3. Wait for both `end` and `finish` events in `.destroySoon`.
4. Unpipe encrypted stream from socket to prevent write after destroy.

11 years agouv: upgrade to v0.11.4
Bert Belder [Wed, 29 May 2013 23:09:54 +0000 (01:09 +0200)]
uv: upgrade to v0.11.4

11 years agobuffer: guard against integer overflow
Ben Noordhuis [Sun, 26 May 2013 19:42:23 +0000 (21:42 +0200)]
buffer: guard against integer overflow

11 years agobuffer: simplify ReadFloatGeneric offset checks
Ben Noordhuis [Sun, 26 May 2013 19:41:20 +0000 (21:41 +0200)]
buffer: simplify ReadFloatGeneric offset checks

11 years agoos: use IsBigEndian() in GetEndianness() function
Ben Noordhuis [Sun, 26 May 2013 19:21:57 +0000 (21:21 +0200)]
os: use IsBigEndian() in GetEndianness() function

11 years agobuffer: guard against pointer aliasing issues
Ben Noordhuis [Sun, 26 May 2013 19:17:35 +0000 (21:17 +0200)]
buffer: guard against pointer aliasing issues

11 years agosrc: add endianness helper functions
Ben Noordhuis [Sun, 26 May 2013 18:32:37 +0000 (20:32 +0200)]
src: add endianness helper functions

11 years agosrc: simplify HandleWrap initialization
Ben Noordhuis [Sun, 26 May 2013 18:04:17 +0000 (20:04 +0200)]
src: simplify HandleWrap initialization

11 years agosrc: replace c-style casts with c++-style casts
Ben Noordhuis [Sun, 26 May 2013 15:06:45 +0000 (17:06 +0200)]
src: replace c-style casts with c++-style casts

11 years agoMerge remote-tracking branch 'origin/v0.10'
Ben Noordhuis [Wed, 29 May 2013 21:12:11 +0000 (23:12 +0200)]
Merge remote-tracking branch 'origin/v0.10'

Conflicts:
deps/uv/ChangeLog
deps/uv/src/unix/stream.c
deps/uv/src/version.c
lib/tls.js

11 years agodoc: sending dgram handles only works on unix
Ben Noordhuis [Wed, 29 May 2013 14:35:00 +0000 (16:35 +0200)]
doc: sending dgram handles only works on unix

11 years agohttps: Add `secureProtocol` docs
Daniel G. Taylor [Wed, 15 May 2013 19:16:09 +0000 (13:16 -0600)]
https: Add `secureProtocol` docs

Add `secureProtocol` parameter docs to the https.request method.

11 years agotls: Add `secureProtocol` docs
Daniel G. Taylor [Wed, 15 May 2013 19:14:20 +0000 (13:14 -0600)]
tls: Add `secureProtocol` docs

Add `secureProtocol` parameter docs to the tls.connect method.

11 years agouv: Upgrade to v0.10.9
isaacs [Tue, 28 May 2013 19:10:14 +0000 (12:10 -0700)]
uv: Upgrade to v0.10.9

11 years agotls: invoke write cb only after opposite read end
Fedor Indutny [Mon, 27 May 2013 10:44:33 +0000 (14:44 +0400)]
tls: invoke write cb only after opposite read end

Stream's `._write()` callback should be invoked only after it's opposite
stream has finished processing incoming data, otherwise `finish` event
fires too early and connection might be closed while there's some data
to send to the client.

see #5544

11 years agotls: ignore .shutdown() syscall error
Fedor Indutny [Tue, 28 May 2013 13:50:38 +0000 (17:50 +0400)]
tls: ignore .shutdown() syscall error

Quote from SSL_shutdown man page:

  The output of SSL_get_error(3) may be misleading,
  as an erroneous SSL_ERROR_SYSCALL may be flagged even though
  no error occurred.

Also, handle all other errors to prevent assertion in `ClearError()`.

11 years agoMerge remote-tracking branch 'ry/v0.10'
isaacs [Sat, 25 May 2013 00:16:08 +0000 (17:16 -0700)]
Merge remote-tracking branch 'ry/v0.10'

Conflicts:
AUTHORS
ChangeLog
configure
deps/uv/ChangeLog
deps/uv/src/unix/darwin.c
deps/uv/src/unix/stream.c
deps/uv/src/version.c
deps/v8/src/isolate.cc
deps/v8/src/version.cc
lib/http.js
src/node_version.h

11 years agodoc: add link to Brazilian Node community
Rafael Henrique Moreira [Sat, 25 May 2013 03:49:49 +0000 (03:49 +0000)]
doc: add link to Brazilian Node community

Add a link to the Brazilian community portal.

11 years agodoc: remove broken links on community page
Rafael Henrique Moreira [Sat, 25 May 2013 04:01:25 +0000 (04:01 +0000)]
doc: remove broken links on community page

Links to Node Manual and Node Bits both are broken, so this commit
removes them from the community page.

11 years agoblog: Post for v0.10.8
isaacs [Fri, 24 May 2013 22:45:59 +0000 (15:45 -0700)]
blog: Post for v0.10.8

11 years agoNow working on 0.10.9
isaacs [Fri, 24 May 2013 22:45:46 +0000 (15:45 -0700)]
Now working on 0.10.9

11 years agoMerge branch 'v0.10.8-release' into v0.10
isaacs [Fri, 24 May 2013 22:44:04 +0000 (15:44 -0700)]
Merge branch 'v0.10.8-release' into v0.10

11 years ago2013.05.24, Version 0.10.8 (Stable) v0.10.8
isaacs [Fri, 24 May 2013 21:45:24 +0000 (14:45 -0700)]
2013.05.24, Version 0.10.8 (Stable)

* v8: update to 3.14.5.9

* uv: upgrade to 0.10.8

* npm: Upgrade to 1.2.23

* http: remove bodyHead from 'upgrade' events (Nathan Zadoks)

* http: Return true on empty writes, not false (isaacs)

* http: save roundtrips, convert buffers to strings (Ben Noordhuis)

* configure: respect the --dest-os flag consistently (Nathan Rajlich)

* buffer: throw when writing beyond buffer (Trevor Norris)

* crypto: Clear error after DiffieHellman key errors (isaacs)

* string_bytes: strip padding from base64 strings (Trevor Norris)

11 years agodoc: Minor fixup in http doc re bodyHead
isaacs [Fri, 24 May 2013 22:06:03 +0000 (15:06 -0700)]
doc: Minor fixup in http doc re bodyHead

11 years agotls: retry writing after hello parse error
Fedor Indutny [Fri, 24 May 2013 21:02:34 +0000 (01:02 +0400)]
tls: retry writing after hello parse error

When writing bad data to EncryptedStream it'll first get to the
ClientHello parser, and, only after it will refuse it, to the OpenSSL.
But ClientHello parser has limited buffer and therefore write could
return `bytes_written` < `incoming_bytes`, which is not the case when
working with OpenSSL.

After such errors ClientHello parser disables itself and will
pass-through all data to the OpenSSL. So just trying to write data one
more time will throw the rest into OpenSSL and let it handle it.

11 years agonpm: Upgrade to 1.2.23
isaacs [Fri, 24 May 2013 21:41:43 +0000 (14:41 -0700)]
npm: Upgrade to 1.2.23

11 years agouv: upgrade to 0.10.8
isaacs [Fri, 24 May 2013 21:41:00 +0000 (14:41 -0700)]
uv: upgrade to 0.10.8

11 years agohttp: remove bodyHead from 'upgrade' events
Nathan Zadoks [Fri, 24 May 2013 17:34:38 +0000 (19:34 +0200)]
http: remove bodyHead from 'upgrade' events

Streams2 makes this unnecessary.
An empty buffer is provided for compatibility.

11 years agoRemove .travis.yml file.
isaacs [Fri, 24 May 2013 15:57:30 +0000 (08:57 -0700)]
Remove .travis.yml file.

This leads people to dump their fork build info into the IRC channel,
which is noisy and unhelpful.

11 years agobuffer: special case empty string writes
Timothy J Fontaine [Thu, 23 May 2013 23:23:07 +0000 (16:23 -0700)]
buffer: special case empty string writes

Prior to 119354f we specifically handled passing a zero length string
to write on a buffer, restore that functionality.

11 years agohttp: Return true on empty writes, not false
isaacs [Thu, 23 May 2013 22:12:13 +0000 (15:12 -0700)]
http: Return true on empty writes, not false

Otherwise, writing an empty string causes the whole program to grind to
a halt when piping data into http messages.

This wasn't as much of a problem (though it WAS a bug) in 0.8 and
before, because our hyperactive 'drain' behavior would mean that some
*previous* write() would probably have a pending drain event, and cause
things to start moving again.

11 years agov8: re-apply floating patches
Timothy J Fontaine [Thu, 23 May 2013 20:40:40 +0000 (13:40 -0700)]
v8: re-apply floating patches

11 years agov8: fix GetLocalizedMessage usage
Timothy J Fontaine [Thu, 23 May 2013 20:57:59 +0000 (13:57 -0700)]
v8: fix GetLocalizedMessage usage

As is the backport of the abort on uncaught exception wouldn't compile
because we it was passing in `this` when it was unnecessary.

11 years agov8: update to 3.14.5.9
Timothy J Fontaine [Thu, 23 May 2013 20:39:12 +0000 (13:39 -0700)]
v8: update to 3.14.5.9

11 years agosystemtap: add tapset for node user probes
Timothy J Fontaine [Sun, 31 Mar 2013 03:56:39 +0000 (20:56 -0700)]
systemtap: add tapset for node user probes

This makes systemtap tracing prettier, you can do things like `stap -e
'probe node_http_server_request { println(probestr); }'`

11 years agodtrace: unify dtrace and systemtap interfaces
Timothy J Fontaine [Sun, 31 Mar 2013 02:51:17 +0000 (19:51 -0700)]
dtrace: unify dtrace and systemtap interfaces

11 years agotimers: use uv_now instead of Date.now
Timothy J Fontaine [Wed, 22 May 2013 18:32:54 +0000 (11:32 -0700)]
timers: use uv_now instead of Date.now

This saves a few calls to gettimeofday which can be expensive, and
potentially subject to clock drift. Instead use the loop time which
uses hrtime internally.

fixes #5497

11 years agohttp: save roundtrips, convert buffers to strings
Ben Noordhuis [Wed, 22 May 2013 19:43:35 +0000 (21:43 +0200)]
http: save roundtrips, convert buffers to strings

This commit adds an optimization to the HTTP client that makes it
possible to:

* Pack the headers and the first chunk of the request body into a
  single write().

* Pack the chunk header and the chunk itself into a single write().

Because only one write() system call is issued instead of several,
the chances of data ending up in a single TCP packet are phenomenally
higher: the benchmark with `type=buf size=32` jumps from 50 req/s to
7,500 req/s, a 150-fold increase.

This commit removes the check from e4b716ef that pushes binary encoded
strings into the slow path. The commit log mentions that:

    We were assuming that any string can be concatenated safely to
    CRLF.  However, for hex, base64, or binary encoded writes, this
    is not the case, and results in sending the incorrect response.

For hex and base64 strings that's certainly true but binary strings
are 'das Ding an sich': string.length is the same before and after
decoding.

Fixes #5528.

11 years agosrc: remove unused comment
Trevor Norris [Wed, 22 May 2013 23:09:06 +0000 (16:09 -0700)]
src: remove unused comment

Now that Context::New(Isolate*) returns Local, the removed comment is
no longer applicable that there is a Persistent which will need to be
disposed.

11 years agosrc: upgrade to new v8 api
Trevor Norris [Wed, 22 May 2013 20:04:41 +0000 (13:04 -0700)]
src: upgrade to new v8 api

Small change that Context::New requires an isolate and returns Local
instead of Persistent.

11 years agov8: reapply floating patches
Ben Noordhuis [Mon, 8 Apr 2013 18:34:11 +0000 (20:34 +0200)]
v8: reapply floating patches

11 years agov8: upgrade to v3.19.3
Trevor Norris [Wed, 22 May 2013 19:56:12 +0000 (12:56 -0700)]
v8: upgrade to v3.19.3

11 years agotest: Fix test-deprecation-flags
isaacs [Wed, 22 May 2013 18:42:38 +0000 (11:42 -0700)]
test: Fix test-deprecation-flags

Test typos missed in util deprecation commit

11 years agodoc: the build requires gcc 4.2 or newer
Ben Noordhuis [Wed, 22 May 2013 11:47:29 +0000 (13:47 +0200)]
doc: the build requires gcc 4.2 or newer

11 years agoconfigure: respect the --dest-os flag consistently
Nathan Rajlich [Tue, 21 May 2013 16:26:42 +0000 (09:26 -0700)]
configure: respect the --dest-os flag consistently

Consider a user on his Mac, who wants to cross-compile for his Linux ARM device:

    ./configure --dest-cpu=arm --dest-os=linux

Before this patch, for example, DTrace probes would incorrectly attempt to be
enabled because the configure script is running on a MacOS machine, even though
we're trying to compile a binary for `linux`.

With this patch, the `--dest-os` flag is respected throughout the configure
script, thus leaving DTrace probes disabled in this cross-compiling scenario.

11 years agonet: use timers._unrefActive for internal timeouts
Timothy J Fontaine [Fri, 17 May 2013 22:07:28 +0000 (15:07 -0700)]
net: use timers._unrefActive for internal timeouts

11 years agotimers: internal unref'd timer for api timeouts
Timothy J Fontaine [Fri, 17 May 2013 22:04:24 +0000 (15:04 -0700)]
timers: internal unref'd timer for api timeouts

When an internal api needs a timeout, they should use
timers._unrefActive since that won't hold the loop open. This solves
the problem where you might have unref'd the socket handle but the
timeout for the socket was still active.

11 years agoutil: Add debuglog, deprecate console lookalikes
isaacs [Tue, 21 May 2013 22:22:05 +0000 (15:22 -0700)]
util: Add debuglog, deprecate console lookalikes

11 years agobuffer: throw when writing beyond buffer
Trevor Norris [Mon, 20 May 2013 21:37:55 +0000 (14:37 -0700)]
buffer: throw when writing beyond buffer

Previously one could write anywhere in a buffer pool if they accidently
got their offset wrong. Mainly because the cc level checks only test
against the parent slow buffer and not against the js object properties.
So now we check to make sure values won't go beyond bounds without
letting the dev know.

11 years agoMerge remote-tracking branch ry/v0.10 into master
isaacs [Mon, 20 May 2013 21:43:14 +0000 (14:43 -0700)]
Merge remote-tracking branch ry/v0.10 into master

Conflicts:
AUTHORS
ChangeLog
src/node_crypto.cc
src/node_version.h

11 years agocrypto: Clear error after DiffieHellman key errors
isaacs [Sat, 18 May 2013 00:19:12 +0000 (17:19 -0700)]
crypto: Clear error after DiffieHellman key errors

Fixes #5499

11 years agostring_bytes: strip padding from base64 strings
Trevor Norris [Mon, 20 May 2013 19:35:31 +0000 (12:35 -0700)]
string_bytes: strip padding from base64 strings

Because of variations in different base64 implementation, it's been
decided to strip all padding from the end of a base64 string and
calculate its size from that.

11 years agotls: add localAddress and localPort properties
Ben Noordhuis [Mon, 20 May 2013 13:14:30 +0000 (15:14 +0200)]
tls: add localAddress and localPort properties

Add localAddress and localPort properties to tls.CleartextStream.
Like remoteAddress and localPort, delegate to the backing net.Socket
object.

Refs #5502.

11 years agosrc: Remove superfluous static_cast
isaacs [Fri, 17 May 2013 23:58:05 +0000 (16:58 -0700)]
src: Remove superfluous static_cast

11 years agomodule: use path.sep instead of a custom solution
Robert Kowalski [Fri, 17 May 2013 18:20:20 +0000 (20:20 +0200)]
module: use path.sep instead of a custom solution

Instead of using a custom solution we can use path.sep in
Module._nodeModulePaths

11 years agoblog: Release 0.10.7
isaacs [Fri, 17 May 2013 21:38:02 +0000 (14:38 -0700)]
blog: Release 0.10.7

11 years agoNow working on 0.10.8
isaacs [Fri, 17 May 2013 21:37:44 +0000 (14:37 -0700)]
Now working on 0.10.8

11 years agoMerge branch 'v0.10.7-release' into v0.10
isaacs [Fri, 17 May 2013 21:37:28 +0000 (14:37 -0700)]
Merge branch 'v0.10.7-release' into v0.10

11 years agoMerge remote-tracking branch 'ry/v0.10' into master
isaacs [Fri, 17 May 2013 20:04:02 +0000 (13:04 -0700)]
Merge remote-tracking branch 'ry/v0.10' into master

Conflicts:
AUTHORS
ChangeLog
deps/uv/ChangeLog
deps/uv/config-unix.mk
deps/uv/src/unix/stream.c
deps/uv/src/version.c
deps/uv/uv.gyp
src/node.cc
src/node_buffer.cc
src/node_crypto.cc
src/node_version.h
src/stream_wrap.cc
src/stream_wrap.h

11 years ago2013.05.17, Version 0.10.7 (Stable) v0.10.7
isaacs [Fri, 17 May 2013 20:59:10 +0000 (13:59 -0700)]
2013.05.17, Version 0.10.7 (Stable)

* uv: upgrade to v0.10.7

* npm: Upgrade to 1.2.21

* crypto: Don't ignore verify encoding argument (isaacs)

* buffer, crypto: fix default encoding regression (Ben Noordhuis)

* timers: fix setInterval() assert (Ben Noordhuis)

11 years agodoc: Fix link to open issues on GitHub.
Brandon Frohs [Thu, 16 May 2013 14:03:25 +0000 (11:03 -0300)]
doc: Fix link to open issues on GitHub.

11 years agocrypto: Don't ignore verify encoding argument
isaacs [Fri, 17 May 2013 20:55:29 +0000 (13:55 -0700)]
crypto: Don't ignore verify encoding argument

11 years agofs_event: use cached Persistent syms instead
Trevor Norris [Thu, 16 May 2013 22:45:53 +0000 (15:45 -0700)]
fs_event: use cached Persistent syms instead

Instead of String::New every time, use a Persistent sym. This can be
accomplished in two ways:

1) Local<String> str = *persistent_str_sym;

2) Handle<String> str = persistent_str_sym;

I've chosen to use the latter method for simplicity's sake.

Other small changes include creating syms on Initialize and removing
unnecessary Local casting on return values.

11 years agosrc: add node_isolates
Trevor Norris [Thu, 16 May 2013 22:58:33 +0000 (15:58 -0700)]
src: add node_isolates

Few primitives weren't being passed node_isolate. Adding them for
consistency.

11 years agobuffer, crypto: fix default encoding regression
Ben Noordhuis [Wed, 15 May 2013 15:52:00 +0000 (17:52 +0200)]
buffer, crypto: fix default encoding regression

The default encoding is 'buffer'. When the input is a string, treat it
as 'binary'. Fixes the following assertion:

  node: ../src/string_bytes.cc:309: static size_t
  node::StringBytes::StorageSize(v8::Handle<v8::Value>, node::encoding):
  Assertion `0 && "buffer encoding specified but string provided"'
  failed.

Introduced in 64fc34b2.

Fixes #5482.