platform/upstream/nodejs.git
14 years agoRemove YAWS vs Apache benchmark
Ryan Dahl [Fri, 20 Aug 2010 02:24:45 +0000 (19:24 -0700)]
Remove YAWS vs Apache benchmark

http://twitter.com/bascule/status/21626934378

14 years agoMake process.nextTick worlds faster for large queues.
Tim Caswell [Fri, 20 Aug 2010 01:58:28 +0000 (18:58 -0700)]
Make process.nextTick worlds faster for large queues.

14 years agoFix race conditions in test-dgram-multicast.js
Ryan Dahl [Fri, 20 Aug 2010 01:49:27 +0000 (18:49 -0700)]
Fix race conditions in test-dgram-multicast.js

14 years agoAdd buffer_creation benchmark
Ryan Dahl [Thu, 19 Aug 2010 08:40:28 +0000 (01:40 -0700)]
Add buffer_creation benchmark

14 years agodrop obsolete TODO comment
Trent Mick [Wed, 18 Aug 2010 04:04:56 +0000 (21:04 -0700)]
drop obsolete TODO comment

14 years agorepl tab completion: insert common prefix of multiple completions
Trent Mick [Tue, 17 Aug 2010 23:53:27 +0000 (16:53 -0700)]
repl tab completion: insert common prefix of multiple completions

14 years agorepl completion: completion for arguments to "require"
Trent Mick [Tue, 17 Aug 2010 15:39:54 +0000 (08:39 -0700)]
repl completion: completion for arguments to "require"

14 years agorepl completion: comment/TODO cleanup, no functional change
Trent Mick [Thu, 12 Aug 2010 16:50:12 +0000 (09:50 -0700)]
repl completion: comment/TODO cleanup, no functional change

14 years agoMaking "root" available in both context and non-context mode.
Herbert Vojčík [Wed, 18 Aug 2010 23:37:45 +0000 (01:37 +0200)]
Making "root" available in both context and non-context mode.

14 years agoFix V8 build for old gcc
Ryan Dahl [Thu, 19 Aug 2010 05:50:12 +0000 (22:50 -0700)]
Fix V8 build for old gcc

also sent upstream: http://codereview.chromium.org/3130033/show

14 years agoFix undefined_reference_in_new_context test for own-context module loader.
Herbert Vojčík [Tue, 17 Aug 2010 20:59:14 +0000 (22:59 +0200)]
Fix undefined_reference_in_new_context test for own-context module loader.

14 years agoFix process.platform
Ryan Dahl [Wed, 18 Aug 2010 20:16:32 +0000 (13:16 -0700)]
Fix process.platform

14 years agoTests for behaviour of 'global'.
Herbert Vojčík [Wed, 18 Aug 2010 15:47:36 +0000 (17:47 +0200)]
Tests for behaviour of 'global'.

14 years agoFix sys.inspect for regex in different context.
Herbert Vojčík [Tue, 17 Aug 2010 20:49:43 +0000 (22:49 +0200)]
Fix sys.inspect for regex in different context.

14 years agoFix registerExtension for NODE_MODULE_CONTEXTS
Herbert Vojčík [Tue, 17 Aug 2010 20:19:19 +0000 (22:19 +0200)]
Fix registerExtension for NODE_MODULE_CONTEXTS

Fix of registerExtension-produced non-string module loading with own
context. Plus finishing touches to the test.

14 years agoAdd process.versions
Ryan Dahl [Tue, 17 Aug 2010 18:24:10 +0000 (11:24 -0700)]
Add process.versions

14 years agoAdd Paul Querna's io benchmarks
Ryan Dahl [Tue, 17 Aug 2010 15:43:26 +0000 (08:43 -0700)]
Add Paul Querna's io benchmarks

14 years agoMore changes to tests so they really work under context module loader.
Herbert Vojčík [Tue, 17 Aug 2010 15:21:43 +0000 (17:21 +0200)]
More changes to tests so they really work under context module loader.

Plus, getting rid of test/common.js defining things in global.

14 years agoTypo in comment.
Herbert Vojčík [Tue, 17 Aug 2010 13:38:57 +0000 (15:38 +0200)]
Typo in comment.

14 years agoUpgrade V8 to 2.3.8
Ryan Dahl [Tue, 17 Aug 2010 15:37:25 +0000 (08:37 -0700)]
Upgrade V8 to 2.3.8

14 years agoAdd TODO
Ryan Dahl [Tue, 17 Aug 2010 15:16:43 +0000 (08:16 -0700)]
Add TODO

14 years agoSimplify loading events.js
Ryan Dahl [Tue, 17 Aug 2010 15:15:46 +0000 (08:15 -0700)]
Simplify loading events.js

14 years agoFix of 'sys.common.debug' calls in tests.
Herbert Vojčík [Tue, 17 Aug 2010 10:59:36 +0000 (12:59 +0200)]
Fix of 'sys.common.debug' calls in tests.

14 years agodetect 0 length fs writes with tests
Marco Rogers [Tue, 17 Aug 2010 04:10:49 +0000 (00:10 -0400)]
detect 0 length fs writes with tests

14 years agoGet away uint/int comparision warning.
Herbert Vojčík [Mon, 16 Aug 2010 21:15:00 +0000 (23:15 +0200)]
Get away uint/int comparision warning.

14 years agoAdd --without-snapshot configure option
Ryan Dahl [Sun, 15 Aug 2010 21:27:05 +0000 (14:27 -0700)]
Add --without-snapshot configure option

14 years agoImplement net.Server.maxConnections
Ryan Dahl [Sun, 15 Aug 2010 21:01:44 +0000 (14:01 -0700)]
Implement net.Server.maxConnections

Simplify EMFILE behavior.

14 years agoFix OpenSSL 100% CPU usage on error
Illarionov Oleg [Sun, 18 Jul 2010 08:52:09 +0000 (12:52 +0400)]
Fix OpenSSL 100% CPU usage on error

14 years agoRefactor of resolveModulePath to make it clearer.
Herbert Vojčík [Sun, 15 Aug 2010 17:23:50 +0000 (19:23 +0200)]
Refactor of resolveModulePath to make it clearer.

14 years agoClean up findModulePath
Herbert Vojčík [Sun, 15 Aug 2010 00:48:06 +0000 (02:48 +0200)]
Clean up findModulePath

Separating "what to traverse" from "how to traverse and what to do with it "
in findModulePath.  It may also fix one not-yet-found bug (absolute ids
weren't loaded when dirs.length = 0).

14 years agoUsing Array.isArray for Array testing in findModulePath.
Herbert Vojčík [Sat, 14 Aug 2010 23:13:54 +0000 (01:13 +0200)]
Using Array.isArray for Array testing in findModulePath.

14 years agoRemove TODO item
Ryan Dahl [Sat, 14 Aug 2010 21:23:09 +0000 (14:23 -0700)]
Remove TODO item

14 years agoAdd freebsd's process.title support.
Vanilla Hsu [Sat, 14 Aug 2010 04:49:54 +0000 (12:49 +0800)]
Add freebsd's process.title support.

14 years agobump version v0.1.104
Ryan Dahl [Fri, 13 Aug 2010 15:06:31 +0000 (08:06 -0700)]
bump version

14 years agoFix tests
Ryan Dahl [Fri, 13 Aug 2010 15:54:40 +0000 (11:54 -0400)]
Fix tests

14 years agoRemove platform specific asserts
Ryan Dahl [Fri, 13 Aug 2010 15:13:54 +0000 (08:13 -0700)]
Remove platform specific asserts

14 years agoRevert "Upgrade V8 to 2.3.7"
Ryan Dahl [Fri, 13 Aug 2010 14:43:53 +0000 (07:43 -0700)]
Revert "Upgrade V8 to 2.3.7"

This reverts commit 083ee0f8b7a8d98d51bf2debf47d68117f13087f.

V8 build broken on cygwin:
  ./deps/v8/src/handles.h:62: instantiated from `T*
  v8::internal::Handle<T>::operator->() const [with T = v8::internal::Code]'
  ./deps/v8/src/accessors.cc:396: instantiated from here
  ./deps/v8/src/handles-inl.h:50:
  error: call of overloaded `BitCast(v8::internal::Code** const&)' is
  ambiguous
  ./deps/v8/src/utils.h:732: note: candidates are: Dest
  v8::internal::BitCast(const Source&) [with Dest = v8::internal::Code**,
  Source = v8::internal::Code**]
  ./deps/v8/src/utils.h:743:
  note:                 Dest v8::internal::BitCast(Source* const&) [with Dest
  = v8::internal::Code**, Source = v8::internal::Code*]
  scons: *** [obj/release/accessors.o] Error 1

14 years agoOne more test with a race condition fixed
Bert Belder [Fri, 13 Aug 2010 03:23:41 +0000 (05:23 +0200)]
One more test with a race condition fixed

14 years agoImplement process.title for cygwin
Bert Belder [Fri, 13 Aug 2010 01:45:51 +0000 (03:45 +0200)]
Implement process.title for cygwin

14 years agoadded dns.getHostByAddr() -- resolve an external IP address to hostname(s)
Rasmus Andersson [Thu, 12 Aug 2010 16:51:23 +0000 (18:51 +0200)]
added dns.getHostByAddr() -- resolve an external IP address to hostname(s)

14 years agoadded read and write support for process.title Darwin
Rasmus Andersson [Wed, 11 Aug 2010 23:00:02 +0000 (01:00 +0200)]
added read and write support for process.title Darwin

This will only manipulate the OS X-level process name, not the title shown
in e.g. ps.

14 years agoUpgrade V8 to 2.3.7
Ryan Dahl [Thu, 12 Aug 2010 17:11:03 +0000 (10:11 -0700)]
Upgrade V8 to 2.3.7

14 years agoDon't throw on HEAD requests
Ryan Dahl [Thu, 12 Aug 2010 17:06:52 +0000 (10:06 -0700)]
Don't throw on HEAD requests

14 years agorepl completion: multi-column display of completions
Trent Mick [Thu, 12 Aug 2010 06:14:12 +0000 (23:14 -0700)]
repl completion: multi-column display of completions

14 years agoAdded support for multiple listeners to DNS multicast datagrams.
Rasmus Andersson [Wed, 11 Aug 2010 21:03:56 +0000 (23:03 +0200)]
Added support for multiple listeners to DNS multicast datagrams.

Some platforms require SO_REUSEPORT to be set for the socket.

14 years agoFix http and net tests failing due to race condition
Bert Belder [Wed, 11 Aug 2010 23:38:42 +0000 (01:38 +0200)]
Fix http and net tests failing due to race condition

Plus some minor cosmetic corrections

14 years agoFirst pass at tab-completion in the REPL
Trent Mick [Mon, 9 Aug 2010 09:18:32 +0000 (02:18 -0700)]
First pass at tab-completion in the REPL

14 years agoImplement process.title for linux
Ryan Dahl [Wed, 11 Aug 2010 19:44:35 +0000 (12:44 -0700)]
Implement process.title for linux

14 years agoStub out process.title
Ryan Dahl [Fri, 18 Jun 2010 07:26:49 +0000 (00:26 -0700)]
Stub out process.title

14 years agoCygwin: process.execPath fix
Fedor Indutny [Wed, 11 Aug 2010 16:27:41 +0000 (23:27 +0700)]
Cygwin: process.execPath fix

14 years agoRemove -Werror from v8 SConstruct
Ryan Dahl [Wed, 11 Aug 2010 07:23:12 +0000 (00:23 -0700)]
Remove -Werror from v8 SConstruct

14 years ago[dgram] only look up hostname for the requested address family
Rasmus Andersson [Mon, 9 Aug 2010 00:53:55 +0000 (02:53 +0200)]
[dgram] only look up hostname for the requested address family

- [lib/dns.js] dns.lookup takes a new optional argument "family" which
  should be the integer 4, 6, dns.AF_INET or dns.AF_INET6. Passing a
  non-false "family" argument makes c-ares explicitly look up addresses for
  the specified family.

- [test/simple/test-c-ares.js] test explicit address family lookups

14 years agoFix race conditions in tests
Ryan Dahl [Wed, 11 Aug 2010 00:37:30 +0000 (17:37 -0700)]
Fix race conditions in tests

14 years agoClose fd on readFile(emptyfile)
Ryan Dahl [Tue, 10 Aug 2010 21:47:40 +0000 (14:47 -0700)]
Close fd on readFile(emptyfile)

14 years agoUpgrade V8 to 2.3.6
Ryan Dahl [Tue, 10 Aug 2010 16:17:11 +0000 (09:17 -0700)]
Upgrade V8 to 2.3.6

14 years agouppercase request methods
Ryan Dahl [Tue, 10 Aug 2010 04:23:52 +0000 (21:23 -0700)]
uppercase request methods

14 years agoIf no options are given to child_process.spawn, env should default to process.env
Bert Belder [Mon, 9 Aug 2010 01:31:30 +0000 (03:31 +0200)]
If no options are given to child_process.spawn, env should default to process.env

Regression.

14 years agoUnset CLOEXEC on spawn's customFds
Ryan Dahl [Mon, 9 Aug 2010 22:33:57 +0000 (15:33 -0700)]
Unset CLOEXEC on spawn's customFds

14 years agoignore test/fixtures/hello.txt created by some test(s)
Rasmus Andersson [Mon, 9 Aug 2010 00:40:54 +0000 (02:40 +0200)]
ignore test/fixtures/hello.txt created by some test(s)

14 years agoMisc. corrections and consistency changes to documentation.
Brian [Sat, 7 Aug 2010 14:11:59 +0000 (10:11 -0400)]
Misc. corrections and consistency changes to documentation.

14 years agoAdd TODO list items
Ryan Dahl [Sun, 8 Aug 2010 20:12:21 +0000 (13:12 -0700)]
Add TODO list items

14 years agoRemove completed TODO task
Ryan Dahl [Sun, 8 Aug 2010 19:13:20 +0000 (12:13 -0700)]
Remove completed TODO task

14 years agoExport Interface from readline.js
Ryan Dahl [Sun, 8 Aug 2010 18:52:31 +0000 (11:52 -0700)]
Export Interface from readline.js

14 years agospelling correction
Trent Mick [Fri, 6 Aug 2010 18:17:45 +0000 (11:17 -0700)]
spelling correction

14 years agoExpose cwd option to child_process.exec()
Bert Belder [Thu, 5 Aug 2010 04:06:46 +0000 (06:06 +0200)]
Expose cwd option to child_process.exec()

14 years agoNew api for child_process.spawn; ability to set cwd for spawn()ed process
Bert Belder [Thu, 5 Aug 2010 02:15:20 +0000 (04:15 +0200)]
New api for child_process.spawn; ability to set cwd for spawn()ed process

Tests for child_process.spawn() use new API

Test for deprecated child_process.spawn() API

14 years agoRemove module.js - put code into src/node.js
Ryan Dahl [Fri, 6 Aug 2010 19:31:41 +0000 (12:31 -0700)]
Remove module.js - put code into src/node.js

14 years agoAdded console.trace()
Tj Holowaychuk [Thu, 5 Aug 2010 17:47:26 +0000 (10:47 -0700)]
Added console.trace()

14 years agoAdded console.{time,timeEnd}()
Tj Holowaychuk [Thu, 5 Aug 2010 17:32:13 +0000 (10:32 -0700)]
Added console.{time,timeEnd}()

14 years agoconsole formatter appends extra arguments
Tj Holowaychuk [Thu, 5 Aug 2010 17:15:22 +0000 (10:15 -0700)]
console formatter appends extra arguments

This makes the console methods more "browser-like",
for example:

  console.log("foo", "bar", "baz");
  // foo bar baz

but still works with formatting

  console.log("hey %s", "tj", "whats up");

  // hey tj whats up

14 years agoquerystring.parse: handle undefined value properly
cloudhead [Thu, 5 Aug 2010 07:13:40 +0000 (03:13 -0400)]
querystring.parse: handle undefined value properly

14 years agoSupport inspecting objects with console.log
Felix Geisendörfer [Thu, 5 Aug 2010 09:38:11 +0000 (11:38 +0200)]
Support inspecting objects with console.log

If the first parameter passed into console.log() is not a string, all
parameters will be printed as formated by sys.inspect. This change
also affects console.info and console.warn.

14 years agoUpdate AUTHORS
Ryan Dahl [Wed, 4 Aug 2010 23:50:59 +0000 (16:50 -0700)]
Update AUTHORS

14 years agoPrint warning when OpenSSL not found
Ryan Dahl [Wed, 4 Aug 2010 23:07:10 +0000 (16:07 -0700)]
Print warning when OpenSSL not found

14 years agoStandardise module load order for native and registered file extensions.
Nick Stenning [Wed, 4 Aug 2010 21:55:24 +0000 (22:55 +0100)]
Standardise module load order for native and registered file extensions.

This patch standardises the load order for modules. Highest priority is trying to load exactly the file the user specified, followed by native extensions, followed by registered extra extensions, etc.

In full, if we require('foo') having registered '.coffee' as an alternative extension, we try and load the following files in order:

    foo
    foo.js
    foo.node
    foo.coffee
    foo/index.js
    foo/index.node
    foo/index.coffee

14 years agoDon't attempt to load a directory.
Nick Stenning [Wed, 4 Aug 2010 20:45:52 +0000 (21:45 +0100)]
Don't attempt to load a directory.

This patch replaces the path.exists check for module loading with a call to
fs.statSync (or fs.stat for require.async) which ensures that it's not trying
to load a directory.

14 years agobump version v0.1.103
Ryan Dahl [Wed, 4 Aug 2010 19:04:12 +0000 (12:04 -0700)]
bump version

14 years agoUpgrade V8 to 2.3.5
Ryan Dahl [Wed, 4 Aug 2010 18:46:42 +0000 (11:46 -0700)]
Upgrade V8 to 2.3.5

14 years agoFix toString('base64') bug
Ryan Dahl [Wed, 4 Aug 2010 18:38:42 +0000 (11:38 -0700)]
Fix toString('base64') bug

Thanks to Stepan Stolyarov for the test case.

14 years agoAdd node_version.h to install
Samuel Shull [Wed, 4 Aug 2010 05:25:17 +0000 (01:25 -0400)]
Add node_version.h to install

14 years agoRevert "Expose the V8 debug object process.debug"
Ryan Dahl [Wed, 4 Aug 2010 17:38:19 +0000 (10:38 -0700)]
Revert "Expose the V8 debug object process.debug"

This reverts commit d9fbb8a58071e339711e8c0ceeb31de5a645fd42.

14 years agoAllow null context in Script
Ryan Dahl [Wed, 4 Aug 2010 17:20:40 +0000 (10:20 -0700)]
Allow null context in Script

14 years agoSetBlocking should set blocking, not toggle it
isaacs [Wed, 4 Aug 2010 01:39:43 +0000 (18:39 -0700)]
SetBlocking should set blocking, not toggle it

14 years agoWhen the parent's stdio FDs are passed to a child, make them temporarily blocking.
isaacs [Tue, 3 Aug 2010 22:57:44 +0000 (15:57 -0700)]
When the parent's stdio FDs are passed to a child, make them temporarily blocking.

Many programs do not handle non-blocking stdio very well.  In particular,
man and less have serious problems with this, and since stdout isn't being
flushed after each write, the output jumps about on the screen as you page
down.  Programs that do use non-blocking stdio will set that flag themselves
(as node does).

This puts the stdio file descriptors into blocking mode before sharing them
with the child process, so that one could spawn a vim subprocess, or some
other program that depends on blocking IO.

14 years agoUpgrade V8 to 2.3.4
Ryan Dahl [Tue, 3 Aug 2010 17:33:16 +0000 (10:33 -0700)]
Upgrade V8 to 2.3.4

14 years agoClient.onend: Anticipate that the HTTP parser object is uninitialized when the client...
Ben Noordhuis [Mon, 2 Aug 2010 09:59:58 +0000 (11:59 +0200)]
Client.onend: Anticipate that the HTTP parser object is uninitialized when the client setup failed.

14 years agoExpose the V8 debug object process.debug
Ryan Dahl [Mon, 2 Aug 2010 07:39:09 +0000 (00:39 -0700)]
Expose the V8 debug object process.debug

Add one duplicate test from V8, just to make sure it works.

14 years agoImplement keep-alive for http.Client
Mikeal Rogers [Mon, 2 Aug 2010 05:22:20 +0000 (22:22 -0700)]
Implement keep-alive for http.Client

Send the 'Connection: keep-alive' header in your request to enable.

14 years agoAllow signals to be used with process.on in addition to process.addListener.
Brian [Sun, 1 Aug 2010 00:13:47 +0000 (20:13 -0400)]
Allow signals to be used with process.on in addition to process.addListener.

14 years agoDon't let path.normalize get above the root.
isaacs [Sun, 1 Aug 2010 00:55:28 +0000 (17:55 -0700)]
Don't let path.normalize get above the root.

Any path.join or path.normalize that starts with a / will not go "above" that after normalization.  This is important because /../foo is almost *always* some sort of error, and doesn't match the corollary in sh: `cd $p; pwd`

At the worse, this can be a vector for exploits, since a static file server might do path.join(docroot, path.normalize("/"+req)) to get the file.  If the normalized request path could be something like "/../../../etc/passwd" then bad things could happen.

14 years agoremove node::CheckBreak in favor of using the v8 debugger js object
Danny Coates [Sun, 1 Aug 2010 22:46:48 +0000 (16:46 -0600)]
remove node::CheckBreak in favor of using the v8 debugger js object

14 years agoUpgrade http-parser for clang compat
Ryan Dahl [Sat, 31 Jul 2010 21:32:59 +0000 (14:32 -0700)]
Upgrade http-parser for clang compat

14 years ago[v8] Remove global.print from v8natives.js (fixes issue 791)
Ryan Dahl [Fri, 30 Jul 2010 19:20:32 +0000 (12:20 -0700)]
[v8] Remove global.print from v8natives.js (fixes issue 791)

Review URL: http://codereview.chromium.org/3045016

14 years agoFix style
Ryan Dahl [Fri, 30 Jul 2010 17:54:43 +0000 (10:54 -0700)]
Fix style

14 years agoBuffer: graciously handle padding in base64-encoded input.
Ben Noordhuis [Fri, 30 Jul 2010 12:01:03 +0000 (14:01 +0200)]
Buffer: graciously handle padding in base64-encoded input.

14 years agoFix email address in AUTHORS file
Ryan Dahl [Fri, 30 Jul 2010 16:42:36 +0000 (09:42 -0700)]
Fix email address in AUTHORS file

14 years agoFix ending \0 in base64 decoding
Ryan Dahl [Thu, 29 Jul 2010 21:48:07 +0000 (14:48 -0700)]
Fix ending \0 in base64 decoding

14 years agoBuffer: adjust buffer size so the base64-decoded input fits snugly.
Ben Noordhuis [Wed, 28 Jul 2010 12:20:23 +0000 (14:20 +0200)]
Buffer: adjust buffer size so the base64-decoded input fits snugly.

Stops Valgrind from complaining about uninitialized memory access.

14 years agoFix --debug-brk; hacky solution
Ryan Dahl [Wed, 28 Jul 2010 03:36:58 +0000 (20:36 -0700)]
Fix --debug-brk; hacky solution

14 years agoAdd todos
Ryan Dahl [Tue, 27 Jul 2010 19:19:08 +0000 (12:19 -0700)]
Add todos