platform/upstream/nodejs.git
13 years agoImplement process._debugProcess
Bert Belder [Fri, 4 Nov 2011 15:23:02 +0000 (16:23 +0100)]
Implement process._debugProcess

13 years agoMake error reporting from node::DLOpen more consistent
Bert Belder [Fri, 4 Nov 2011 15:11:39 +0000 (16:11 +0100)]
Make error reporting from node::DLOpen more consistent

13 years agoWindows: ErrnoException shouldn't mix up crt and win32 errors
Bert Belder [Fri, 4 Nov 2011 15:10:48 +0000 (16:10 +0100)]
Windows: ErrnoException shouldn't mix up crt and win32 errors

13 years agoFix line endings and trailing whitespace
Bert Belder [Fri, 4 Nov 2011 15:06:48 +0000 (16:06 +0100)]
Fix line endings and trailing whitespace

13 years agourl: add '.' '+' and '-' in url protocol
Jordan Sissel [Fri, 4 Nov 2011 12:22:18 +0000 (13:22 +0100)]
url: add '.' '+' and '-' in url protocol

- Based on BNF from RFC 1738 section 5.
- Added tests to cover svn+ssh and some other examples

13 years agofs: don't use octal values, not allowed in strict mode
Ben Noordhuis [Fri, 4 Nov 2011 12:10:07 +0000 (13:10 +0100)]
fs: don't use octal values, not allowed in strict mode

13 years agotest: fix simple/net-pipe-connect-errors
Ben Noordhuis [Fri, 4 Nov 2011 04:28:30 +0000 (05:28 +0100)]
test: fix simple/net-pipe-connect-errors

When trying to connect to something that is not a UNIX socket, Linux returns
ECONNREFUSED, not ENOTSOCK.

We cannot atomically determine if the other end is a) a stale socket, or b) not
a socket at all, so let's accept both error codes.

13 years agoUpgrade libuv to 9c7ed0d
Ryan Dahl [Thu, 3 Nov 2011 23:30:58 +0000 (16:30 -0700)]
Upgrade libuv to 9c7ed0d

Fixes test-net-pipe-connect-errors.js on UNIX.
See #2001.

13 years agoreport debugger's test errors
Fedor Indutny [Thu, 3 Nov 2011 21:09:07 +0000 (03:09 +0600)]
report debugger's test errors

13 years agostdout and stderr are blocking when referring to regular files
Ryan Dahl [Thu, 3 Nov 2011 20:27:26 +0000 (13:27 -0700)]
stdout and stderr are blocking when referring to regular files

Fixes message tests.

13 years agoSocket.write should reset timeout timer.
Ryan Dahl [Thu, 3 Nov 2011 19:34:23 +0000 (12:34 -0700)]
Socket.write should reset timeout timer.

Fixes #2002.

13 years agonet: implement Server.prototype.address() for pipes
Ben Noordhuis [Tue, 1 Nov 2011 22:42:45 +0000 (23:42 +0100)]
net: implement Server.prototype.address() for pipes

13 years agotest error codes related to pipes
Maciej Małecki [Thu, 3 Nov 2011 14:13:22 +0000 (15:13 +0100)]
test error codes related to pipes

This tests passes on node v0.4, but fails on node v0.5. v0.5 seems to
generally lack error codes for various error events related to UNIX
pipes.

Fixes #2001

13 years agoRemove -Werror from V8 build
Ryan Dahl [Thu, 3 Nov 2011 17:46:16 +0000 (10:46 -0700)]
Remove -Werror from V8 build

13 years agoDowngrade V8 to 3.6.4
Ryan Dahl [Thu, 3 Nov 2011 17:34:22 +0000 (10:34 -0700)]
Downgrade V8 to 3.6.4

13 years agodocs: make fs.mkdir()'s mode argument an option.
koichik [Thu, 3 Nov 2011 11:04:22 +0000 (20:04 +0900)]
docs: make fs.mkdir()'s mode argument an option.

13 years agofs: make mkdir() default to 0777 permissions
Ben Noordhuis [Thu, 3 Nov 2011 08:35:49 +0000 (09:35 +0100)]
fs: make mkdir() default to 0777 permissions

Fixes #1999.

13 years agouv: upgrade to 0fb3769
Ben Noordhuis [Thu, 3 Nov 2011 02:25:11 +0000 (03:25 +0100)]
uv: upgrade to 0fb3769

13 years agov8: fix freebsd build, implement VirtualMemory class
Ben Noordhuis [Thu, 3 Nov 2011 02:23:59 +0000 (03:23 +0100)]
v8: fix freebsd build, implement VirtualMemory class

13 years agofix process.uptime() on windows
Igor Zinkovsky [Thu, 3 Nov 2011 01:27:43 +0000 (18:27 -0700)]
fix process.uptime() on windows

13 years agoprocess.kill to use uv_kill
Igor Zinkovsky [Wed, 2 Nov 2011 22:06:48 +0000 (15:06 -0700)]
process.kill to use uv_kill

13 years agohttp: emit Error object after .abort()
Ben Noordhuis [Thu, 3 Nov 2011 00:20:54 +0000 (01:20 +0100)]
http: emit Error object after .abort()

It was emitting the net.Socket object due to misuse of the arguments object.

Fixes #1399.

13 years agoupgrade libuv to e1bee05ecdbffbe9de37830530ad2ae2f1fb41c8
Igor Zinkovsky [Wed, 2 Nov 2011 23:51:26 +0000 (16:51 -0700)]
upgrade libuv to e1bee05ecdbffbe9de37830530ad2ae2f1fb41c8

13 years agoRemove separation of libuv tests
Ryan Dahl [Wed, 2 Nov 2011 23:26:43 +0000 (16:26 -0700)]
Remove separation of libuv tests

13 years agodocs: http: link to relevant net.Socket methods
Ben Noordhuis [Wed, 2 Nov 2011 23:21:25 +0000 (00:21 +0100)]
docs: http: link to relevant net.Socket methods

13 years agoignore undefined messages in the debugger repl
Fedor Indutny [Wed, 2 Nov 2011 22:38:38 +0000 (04:38 +0600)]
ignore undefined messages in the debugger repl

fixes #1995

13 years agotest: add ChildProcess.prototype.killed test case
Ben Noordhuis [Wed, 2 Nov 2011 17:37:34 +0000 (18:37 +0100)]
test: add ChildProcess.prototype.killed test case

13 years agochild_process: in a new `ChildProcess` set `killed` to false
Maciej Małecki [Wed, 2 Nov 2011 16:52:47 +0000 (17:52 +0100)]
child_process: in a new `ChildProcess` set `killed` to false

This behavior is consistent with what v0.4 does.

13 years agoAdd missing copyright headers
Ryan Dahl [Wed, 2 Nov 2011 17:00:57 +0000 (10:00 -0700)]
Add missing copyright headers

13 years agodocs: http: fix docs for the 'close' event
Ben Noordhuis [Wed, 2 Nov 2011 16:24:53 +0000 (17:24 +0100)]
docs: http: fix docs for the 'close' event

13 years agoRevert "Upgrade V8 to 3.7.1"
Ben Noordhuis [Wed, 2 Nov 2011 15:58:08 +0000 (16:58 +0100)]
Revert "Upgrade V8 to 3.7.1"

This reverts commit 92f5a5d3caf01f382f90c235e9057590a5e76870.

V8 3.7.1 in debug mode on ia32 has a curious race-like bug where an fs.Stats
object is not fully formed until some time after it's created. This is easy
to demonstrate by running `make test-debug`.

V8 3.7.0 does not exhibit this behaviour so back we go.

Fixes #1981.

13 years agofix pummel/test-net-throttle on windows
Igor Zinkovsky [Tue, 1 Nov 2011 23:30:42 +0000 (16:30 -0700)]
fix pummel/test-net-throttle on windows

13 years agodoc: fix links
Maciej Małecki [Tue, 1 Nov 2011 19:52:35 +0000 (20:52 +0100)]
doc: fix links

Changes:

  * 'http://github.com' => 'https://github.com'
  * 'https://github.com/ry/node' => 'https://github.com/joyent/node'
  * 'https://github.com/ry/http-parser' =>
    'https://github.com/joyent/http-parser'
  * old issue links
  * wiki link

13 years agowindows: enable pending accepts knob
Igor Zinkovsky [Tue, 1 Nov 2011 08:35:48 +0000 (01:35 -0700)]
windows: enable pending accepts knob

13 years agouv: upgrade to 90b0b7d
Ben Noordhuis [Tue, 1 Nov 2011 21:11:58 +0000 (22:11 +0100)]
uv: upgrade to 90b0b7d

13 years agoos: rename getNetworkInterfaces() to networkInterfaces()
Ben Noordhuis [Tue, 1 Nov 2011 16:23:17 +0000 (17:23 +0100)]
os: rename getNetworkInterfaces() to networkInterfaces()

13 years agonode: remove `process.compile`
Maciej Małecki [Tue, 1 Nov 2011 14:16:16 +0000 (15:16 +0100)]
node: remove `process.compile`

It was deprecated before v0.4.

13 years agoprocess: fix process.nextTick() error case regression
Ben Noordhuis [Tue, 1 Nov 2011 15:30:41 +0000 (16:30 +0100)]
process: fix process.nextTick() error case regression

Patch and test by Koichi Kobayashi.

13 years agotest: fix test/message/undefined_reference_in_new_context.js
koichik [Tue, 1 Nov 2011 10:30:19 +0000 (19:30 +0900)]
test: fix test/message/undefined_reference_in_new_context.js

after 4d4900f, stack trace was changed.

13 years agodoc: Correct blatantly wrong futimes documentation
isaacs [Mon, 31 Oct 2011 23:31:37 +0000 (16:31 -0700)]
doc: Correct blatantly wrong futimes documentation

13 years agoprocess: optimize process.nextTick()
Ben Noordhuis [Mon, 31 Oct 2011 21:31:12 +0000 (22:31 +0100)]
process: optimize process.nextTick()

33% performance boost on large nextTick queues.

13 years agobench: add process.nextTick() benchmark
Ben Noordhuis [Mon, 31 Oct 2011 20:58:22 +0000 (21:58 +0100)]
bench: add process.nextTick() benchmark

13 years agotls, https: add passphrase option
koichik [Wed, 26 Oct 2011 17:34:56 +0000 (02:34 +0900)]
tls, https: add passphrase option

Fixes #1925.

13 years agodocs: tty: remove tty.open() documentation
Ben Noordhuis [Sun, 30 Oct 2011 20:22:46 +0000 (21:22 +0100)]
docs: tty: remove tty.open() documentation

13 years agocore: fix off-by-one error in node::DLOpen()
Ben Noordhuis [Sun, 30 Oct 2011 16:33:42 +0000 (17:33 +0100)]
core: fix off-by-one error in node::DLOpen()

Fixes loading of modules that use the NODE_MODULE macro on POSIX platforms.

13 years agodocs: addons: fix example
Ben Noordhuis [Sun, 30 Oct 2011 16:15:10 +0000 (17:15 +0100)]
docs: addons: fix example

13 years agofix for --harmony_block_scoping
koichik [Sun, 30 Oct 2011 15:49:20 +0000 (00:49 +0900)]
fix for --harmony_block_scoping

Fixes #1969.

13 years agodocs: fix option's name of cluster.startMaster()
koichik [Sun, 30 Oct 2011 02:40:31 +0000 (11:40 +0900)]
docs: fix option's name of cluster.startMaster()

13 years agouv: upgrade to 70381ce
Ben Noordhuis [Sun, 30 Oct 2011 01:56:51 +0000 (02:56 +0100)]
uv: upgrade to 70381ce

13 years agoevents: separate maxListeners and _events
Siddharth Mahendraker [Sun, 23 Oct 2011 11:19:45 +0000 (14:19 +0300)]
events: separate maxListeners and _events

Fixes #1479.
Fixes #1923.

13 years agofix pummel/test-child-process-spawn-loop.js on windows
Igor Zinkovsky [Sat, 29 Oct 2011 01:30:03 +0000 (18:30 -0700)]
fix pummel/test-child-process-spawn-loop.js on windows

13 years agoUpgrade libuv to e4d6509211
Bert Belder [Fri, 28 Oct 2011 23:33:01 +0000 (01:33 +0200)]
Upgrade libuv to e4d6509211

13 years agoExport some functions from node.h
Bert Belder [Fri, 28 Oct 2011 10:08:36 +0000 (12:08 +0200)]
Export some functions from node.h

13 years agoSupport native extension loading on Windows
Bert Belder [Fri, 28 Oct 2011 09:31:34 +0000 (11:31 +0200)]
Support native extension loading on Windows

13 years agoMake node::DLOpen use uv_dlopen
Bert Belder [Fri, 28 Oct 2011 10:05:09 +0000 (12:05 +0200)]
Make node::DLOpen use uv_dlopen

13 years agoUpgrade libuv to 90e15f1110
Bert Belder [Fri, 28 Oct 2011 23:06:09 +0000 (01:06 +0200)]
Upgrade libuv to 90e15f1110

13 years agoAdd common.gypi to gyp output
Bert Belder [Fri, 28 Oct 2011 10:10:24 +0000 (12:10 +0200)]
Add common.gypi to gyp output

13 years agoWrap long lines, strip trailing whitespace
Bert Belder [Fri, 28 Oct 2011 09:34:53 +0000 (11:34 +0200)]
Wrap long lines, strip trailing whitespace

13 years agoRemove outdated comment
Bert Belder [Fri, 28 Oct 2011 09:31:43 +0000 (11:31 +0200)]
Remove outdated comment

13 years agoFix v8 build on Windows
Bert Belder [Fri, 28 Oct 2011 14:08:07 +0000 (16:08 +0200)]
Fix v8 build on Windows

There's probably a better way to fix this

13 years agofix simple/test-child-process-double-pipe on windows
Igor Zinkovsky [Fri, 28 Oct 2011 22:57:39 +0000 (15:57 -0700)]
fix simple/test-child-process-double-pipe on windows

13 years agoRevert "remove node_io_watcher"
Igor Zinkovsky [Fri, 28 Oct 2011 22:34:24 +0000 (15:34 -0700)]
Revert "remove node_io_watcher"

This reverts commit cc2ac1ccc7724b920cbc7bbb777f057ac062028c.

13 years agolinux: unbreak build if HAVE_MONOTONIC_CLOCK=0
Ben Noordhuis [Fri, 28 Oct 2011 21:29:56 +0000 (23:29 +0200)]
linux: unbreak build if HAVE_MONOTONIC_CLOCK=0

13 years agodocs: addons: fix NODE_SET_METHOD example
Ben Noordhuis [Fri, 28 Oct 2011 20:36:55 +0000 (22:36 +0200)]
docs: addons: fix NODE_SET_METHOD example

13 years agodocs: tty: stdin must be initialized before calling setRawMode
Zachary Scott [Fri, 28 Oct 2011 18:07:06 +0000 (14:07 -0400)]
docs: tty: stdin must be initialized before calling setRawMode

13 years agodocs: fix home page link to API docs
Ben Noordhuis [Fri, 28 Oct 2011 16:22:39 +0000 (18:22 +0200)]
docs: fix home page link to API docs

13 years agozlib: compile without -ansi
Ben Noordhuis [Fri, 28 Oct 2011 15:27:47 +0000 (17:27 +0200)]
zlib: compile without -ansi

Source contains C++ / C99 comments, gcc in strict mode doesn't like that.

13 years agoremove node_io_watcher
Igor Zinkovsky [Thu, 27 Oct 2011 23:47:37 +0000 (16:47 -0700)]
remove node_io_watcher

13 years agodocs: add zlib.createXxx() functions
koichik [Wed, 26 Oct 2011 06:10:42 +0000 (15:10 +0900)]
docs: add zlib.createXxx() functions

13 years agov8: implement VirtualMemory class on SunOS
Ben Noordhuis [Thu, 27 Oct 2011 11:19:51 +0000 (11:19 +0000)]
v8: implement VirtualMemory class on SunOS

Unbreaks build on SunOS. Re-applies 4908e5bf7a9c8014eefcf344e958bf0dad95d907.

13 years agoUpgrade V8 to 3.7.1
Ryan Dahl [Thu, 27 Oct 2011 07:48:23 +0000 (00:48 -0700)]
Upgrade V8 to 3.7.1

13 years agocluster: Add some docs, improve cluster.isWorker()
Tj Holowaychuk [Wed, 26 Oct 2011 23:21:08 +0000 (16:21 -0700)]
cluster: Add some docs, improve cluster.isWorker()

Fixes #1949.

13 years agonode cluster is now a module instead of CLI interface
Ryan Dahl [Wed, 26 Oct 2011 20:41:31 +0000 (13:41 -0700)]
node cluster is now a module instead of CLI interface

This is to make room for master process plugins instead of adding CLI
options as proposed in #1879.

13 years agoAdd test cases for #1944.
Nathan Rajlich [Wed, 26 Oct 2011 19:45:51 +0000 (12:45 -0700)]
Add test cases for #1944.

13 years agoMore bulletproof `util.inspect()` function.
Nathan Rajlich [Wed, 26 Oct 2011 06:56:07 +0000 (23:56 -0700)]
More bulletproof `util.inspect()` function.

Use the *real* versions of the Date and RegExp functions, from the
prototype. This defends against code like:

  var d = new Date()
  d.toUTCString = null
  util.inspect(d)
    // TypeError: toUTCString is not a function

Fixes #1944.

13 years agoAdd test case for #1941.
Nathan Rajlich [Wed, 26 Oct 2011 18:22:16 +0000 (11:22 -0700)]
Add test case for #1941.

Add test for the false-positives from #1942.
Fix test-sys.js.

13 years agoDon't use `instanceof` in lib/util.js "is" checks.
Nathan Rajlich [Wed, 26 Oct 2011 04:42:23 +0000 (21:42 -0700)]
Don't use `instanceof` in lib/util.js "is" checks.

While using `instanceof`, these functions could easily be faked with something
like:  Object.create(Date.prototype)

So let's just not use it at all. A little slower, but these functions are only
used in the REPL / for debugging so it's OK.

Fixes #1941.
Fixes #1942.

13 years agoReturn IPv4 addresses before IPv6 addresses from getaddrinfo
Ryan Dahl [Wed, 26 Oct 2011 19:27:31 +0000 (12:27 -0700)]
Return IPv4 addresses before IPv6 addresses from getaddrinfo

13 years agoAdd docs for the type checking functions in `util.js`.
Nathan Rajlich [Wed, 26 Oct 2011 18:10:23 +0000 (11:10 -0700)]
Add docs for the type checking functions in `util.js`.

13 years agoAdd test case for the util.js type checking functions.
Nathan Rajlich [Wed, 26 Oct 2011 18:10:15 +0000 (11:10 -0700)]
Add test case for the util.js type checking functions.

13 years agoExport the type checking functions from `util.js`.
Nathan Rajlich [Wed, 26 Oct 2011 18:09:01 +0000 (11:09 -0700)]
Export the type checking functions from `util.js`.

As per discussion at:
http://groups.google.com/group/nodejs-dev/browse_thread/thread/b08970166e4670cf

13 years agoDon't compile in node_dtrace.cc when not supported
Ryan Dahl [Wed, 26 Oct 2011 18:31:12 +0000 (11:31 -0700)]
Don't compile in node_dtrace.cc when not supported

13 years agodocs: update email address
Zachary Scott [Wed, 26 Oct 2011 17:40:15 +0000 (13:40 -0400)]
docs: update email address

13 years agodocs: update socket.io url
Zachary Scott [Wed, 26 Oct 2011 17:07:40 +0000 (13:07 -0400)]
docs: update socket.io url

13 years agotls: add address(), remoteAddress/remotePort
koichik [Wed, 26 Oct 2011 12:12:23 +0000 (21:12 +0900)]
tls: add address(), remoteAddress/remotePort

Fixes #758.
Fixes #1055.

13 years agotls: does not emit 'end' from EncryptedStream
koichik [Tue, 25 Oct 2011 09:57:06 +0000 (18:57 +0900)]
tls: does not emit 'end' from EncryptedStream

de09168 and 4cdf9d4 breaks `test/pummel/test-https-large-response.js`.
It is never finished.

Fixes #1936.

13 years agobuild: fix sunos gyp build, include platform file
Ben Noordhuis [Wed, 26 Oct 2011 05:11:20 +0000 (05:11 +0000)]
build: fix sunos gyp build, include platform file

13 years agosunos: don't use exceptions
Ben Noordhuis [Wed, 26 Oct 2011 05:09:18 +0000 (05:09 +0000)]
sunos: don't use exceptions

Don't use exceptions in platform functions. Fix a resource leak
(leaked kstat handle) while we're at it.

13 years agogyp: support older bash versions
Ben Noordhuis [Wed, 26 Oct 2011 04:59:31 +0000 (04:59 +0000)]
gyp: support older bash versions

Older bash versions in `sh -c` mode don't parse `export FOO=42` constructs,
they bail out with a "FOO is not an identifier" error message.

This was fixed somewhere between bash 4.1.0 and 4.1.5 but let's support the
older versions anyway.

13 years agouv: upgrade to 0cb2213
Ben Noordhuis [Tue, 25 Oct 2011 22:05:24 +0000 (00:05 +0200)]
uv: upgrade to 0cb2213

13 years agofix test-http-curl-chunk-problem.js and test-pipe-file-to-http.js on windows
Igor Zinkovsky [Tue, 25 Oct 2011 20:47:21 +0000 (13:47 -0700)]
fix test-http-curl-chunk-problem.js and test-pipe-file-to-http.js on windows

13 years agohttp: fix gcc 3.x build, don't use always_inline
Ben Noordhuis [Tue, 25 Oct 2011 19:18:41 +0000 (19:18 +0000)]
http: fix gcc 3.x build, don't use always_inline

13 years agotest: spawn process.argv[0], not 'node'
Ben Noordhuis [Tue, 25 Oct 2011 00:23:07 +0000 (02:23 +0200)]
test: spawn process.argv[0], not 'node'

'node' may or may not be on the path and may or may not be the version we are
running the test suite for.

13 years agoDirectly export the Stream constructor.
Nathan Rajlich [Mon, 24 Oct 2011 21:52:10 +0000 (14:52 -0700)]
Directly export the Stream constructor.

Also setting up a circular reference back to the
stream as `Stream.Stream`, for backwards-compatibility.

Fixes #1933

13 years agoRemove resume and pause events
Ryan Dahl [Mon, 24 Oct 2011 18:55:02 +0000 (11:55 -0700)]
Remove resume and pause events

Too complex; unnecessary.

13 years agoClose #1929 zlib Respond to 'resume' events properly
isaacs [Mon, 24 Oct 2011 19:48:58 +0000 (12:48 -0700)]
Close #1929 zlib Respond to 'resume' events properly

13 years agonet: `Server.listen`, `Server.close` and `Socket.connect` return `this`
Maciej Małecki [Sun, 23 Oct 2011 09:20:03 +0000 (11:20 +0200)]
net: `Server.listen`, `Server.close` and `Socket.connect` return `this`

Just a syntactic sugar for doing, for example:

    var server = net.createServer(function (c) {
      c.end('goodbye, cruel world!\r\n');
      server.close().on('close', function () {
        console.log('really, goodbye!');
      });
    }).listen(1337);

Fixes #1922.

13 years agodocs: improvement fs, http and https
koichik [Sat, 22 Oct 2011 14:40:15 +0000 (23:40 +0900)]
docs: improvement fs, http and https

13 years agoLint
seebees [Wed, 19 Oct 2011 23:28:44 +0000 (16:28 -0700)]
Lint

13 years agoDocumentation update
seebees [Wed, 19 Oct 2011 22:06:49 +0000 (15:06 -0700)]
Documentation update

http.markdown
  note options now align with url.parse
  added note that hostname is preferred over host.
  added auth
  added not that setting an explicit Authorization header will override basic authentication with 'auth'

https.markdown
  Made a link to http.request and noted that all http.request options are valid.

url.markdown
  added path option