platform/upstream/nodejs.git
13 years agoremove unnecessary casts
Ryan Dahl [Mon, 6 Sep 2010 03:49:20 +0000 (20:49 -0700)]
remove unnecessary casts

13 years agoMore fast buffer work
Ryan Dahl [Sun, 5 Sep 2010 20:30:30 +0000 (13:30 -0700)]
More fast buffer work

13 years agofast buffer bounds checking in copy()
Ryan Dahl [Sun, 5 Sep 2010 18:10:59 +0000 (11:10 -0700)]
fast buffer bounds checking in copy()

13 years agostring.length !== Buffer.byteLength(string)
Tim-Smart [Sun, 5 Sep 2010 13:12:35 +0000 (01:12 +1200)]
string.length !== Buffer.byteLength(string)

13 years agoWork to get C++ fast buffers. incomplete
Ryan Dahl [Sun, 5 Sep 2010 03:59:24 +0000 (20:59 -0700)]
Work to get C++ fast buffers. incomplete

13 years agoFast Buffer safe constructor
Ryan Dahl [Sun, 5 Sep 2010 03:58:51 +0000 (20:58 -0700)]
Fast Buffer safe constructor

13 years agoFix buffer binding
Ryan Dahl [Sat, 4 Sep 2010 20:56:27 +0000 (13:56 -0700)]
Fix buffer binding

13 years agoFix fastbuffer style
Ryan Dahl [Sat, 4 Sep 2010 20:48:04 +0000 (13:48 -0700)]
Fix fastbuffer style

Fix style

13 years agoSome silly fixes to buffer.js
Tim-Smart [Sat, 21 Aug 2010 11:18:15 +0000 (23:18 +1200)]
Some silly fixes to buffer.js

13 years agoFastBuffer implementation. API needs migration
Tim-Smart [Sat, 21 Aug 2010 06:28:00 +0000 (18:28 +1200)]
FastBuffer implementation. API needs migration

13 years agoFix: uncaughtException was broken for main module
Felix Geisendörfer [Tue, 7 Sep 2010 14:38:43 +0000 (16:38 +0200)]
Fix: uncaughtException was broken for main module

See: http://github.com/ry/node/commit/635986e4338cf34cf8e1abc4343ffd69d109bb4e

13 years agoCall Tick() after coming out of select()
Ryan Dahl [Thu, 9 Sep 2010 17:30:37 +0000 (10:30 -0700)]
Call Tick() after coming out of select()

Previously we would only call it before going into select(). This is needed
to fix test/simple/test-next-tick-ordering2.js.

13 years agoFix issue #262. Allow fs.realpath to traverse above the current working directory.
isaacs [Thu, 9 Sep 2010 00:25:59 +0000 (17:25 -0700)]
Fix issue #262. Allow fs.realpath to traverse above the current working directory.

13 years agoV8 Cygwin patch
Ryan Dahl [Thu, 9 Sep 2010 00:16:18 +0000 (17:16 -0700)]
V8 Cygwin patch

13 years agoUpgrade V8 to 2.4.2
Ryan Dahl [Thu, 9 Sep 2010 00:14:42 +0000 (17:14 -0700)]
Upgrade V8 to 2.4.2

13 years agoTest for ReadStream typo
Tobie Langel [Wed, 8 Sep 2010 19:09:13 +0000 (12:09 -0700)]
Test for ReadStream typo

13 years agoFix style; undefined reference bug
Ryan Dahl [Wed, 8 Sep 2010 19:03:33 +0000 (12:03 -0700)]
Fix style; undefined reference bug

13 years agoDo not emit WriteStream's drain event before ws.write has been called.
Tobie Langel [Wed, 8 Sep 2010 12:28:31 +0000 (14:28 +0200)]
Do not emit WriteStream's drain event before ws.write has been called.

13 years agoAvoid closing a WriteStream before it has been opened.
Tobie Langel [Wed, 8 Sep 2010 11:19:25 +0000 (13:19 +0200)]
Avoid closing a WriteStream before it has been opened.

13 years agoAvoid missing ref error in WriteStream.prototype.destroy().
Tobie Langel [Wed, 8 Sep 2010 11:15:05 +0000 (13:15 +0200)]
Avoid missing ref error in WriteStream.prototype.destroy().

13 years agoMake test-global work with NODE_MODULE_CONTEXTS.
Herbert Vojčík [Fri, 20 Aug 2010 16:59:33 +0000 (18:59 +0200)]
Make test-global work with NODE_MODULE_CONTEXTS.

13 years agoModifying test-global to accomodate v8 inter-context 'global' protection.
Herbert Vojčík [Fri, 20 Aug 2010 15:15:37 +0000 (17:15 +0200)]
Modifying test-global to accomodate v8 inter-context 'global' protection.

13 years agoRemoving test-global-between-modules.
Herbert Vojčík [Sun, 22 Aug 2010 00:00:50 +0000 (02:00 +0200)]
Removing test-global-between-modules.

Using "global" to push data to require()d modules
not supported under NODE_MODULE_CONTEXTS=1.

13 years agoRemoved comment-out code.
Herbert Vojčík [Fri, 20 Aug 2010 13:32:22 +0000 (15:32 +0200)]
Removed comment-out code.

13 years agoIncrease ReadStream bufferSize to 64k
Ryan Dahl [Wed, 8 Sep 2010 17:14:04 +0000 (10:14 -0700)]
Increase ReadStream bufferSize to 64k

13 years agoadd ANSI coloring option to sys.inspect and, by default, to the repl
Trent Mick [Sat, 4 Sep 2010 04:25:35 +0000 (21:25 -0700)]
add ANSI coloring option to sys.inspect and, by default, to the repl

13 years agoCtrl+W support for the REPL
Trent Mick [Sat, 4 Sep 2010 04:53:53 +0000 (21:53 -0700)]
Ctrl+W support for the REPL

FWIW, command-line style (delete back to whitespace) would be:
    leading = leading.replace(/\S+\s*$/, '');

13 years agoTest case showing a bug in nextTick ordering
Felix Geisendörfer [Wed, 8 Sep 2010 05:34:21 +0000 (07:34 +0200)]
Test case showing a bug in nextTick ordering

nextTick should fire before setTimeout in this test, but it doesn't.

13 years agotest-http-parser should not use private API
Ryan Dahl [Mon, 6 Sep 2010 19:18:46 +0000 (12:18 -0700)]
test-http-parser should not use private API

13 years agoDon't refer to private API in test-repl
Ryan Dahl [Mon, 6 Sep 2010 19:12:36 +0000 (12:12 -0700)]
Don't refer to private API in test-repl

13 years agoSpecial deepEquals for buffer
Ryan Dahl [Tue, 7 Sep 2010 23:28:49 +0000 (16:28 -0700)]
Special deepEquals for buffer

13 years agotypo: forceClose -> destroy for WriteStreams
Ryan Dahl [Sun, 5 Sep 2010 09:27:02 +0000 (02:27 -0700)]
typo: forceClose -> destroy for WriteStreams

13 years agoFix bug in process._tickCallback where callbacks can get abandoned.
Benjamin Thomas [Wed, 1 Sep 2010 11:01:38 +0000 (05:01 -0600)]
Fix bug in process._tickCallback where callbacks can get abandoned.

Change process._tickCallback so that if a callback throws an error but
there are other callbacks after it, we indicate that
process._tickCallback needs to be ran again.

Currently, if a callback in process._tickCallback throws an error, and
that error is caught by an uncaughtException handler and
process.nextTick is never called again, then any other callbacks already
added to the nextTickQueue won't be called again.

Updated the next-tick-errors test to catch this scenario.

13 years agoTreat "//some_path" as pathname rather than hostname by default.
isaacs [Wed, 1 Sep 2010 00:59:50 +0000 (17:59 -0700)]
Treat "//some_path" as pathname rather than hostname by default.

Note that "//" is still a special indicator for the hostname, and this does
not change the parsing of mailto: and other "slashless" url schemes.  It
does however remove some oddness in url.parse(req.url) which is the most
common use-case for the url.parse function.

13 years agoMake sure setInterval(cb, 0) loops infinitely
Ryan Dahl [Tue, 31 Aug 2010 23:45:17 +0000 (16:45 -0700)]
Make sure setInterval(cb, 0) loops infinitely

13 years agoFix style
Ryan Dahl [Mon, 30 Aug 2010 23:35:58 +0000 (16:35 -0700)]
Fix style

13 years agoFix style in test/simple/test-dgram-unix.js
Ryan Dahl [Mon, 30 Aug 2010 21:17:27 +0000 (14:17 -0700)]
Fix style in test/simple/test-dgram-unix.js

13 years agoRemove timer from test/simple/test-dgram-unix.js
Ryan Dahl [Mon, 30 Aug 2010 21:15:28 +0000 (14:15 -0700)]
Remove timer from test/simple/test-dgram-unix.js

Test running already has a timeout mechanism.

13 years agofix for fs.readFile to return string when encoding specified on zero length read
Marco Rogers [Wed, 25 Aug 2010 04:36:08 +0000 (00:36 -0400)]
fix for fs.readFile to return string when encoding specified on zero length read

13 years agoFixed async fs writes with length 0, it should fire the callback
Marco Rogers [Wed, 25 Aug 2010 03:46:37 +0000 (23:46 -0400)]
Fixed async fs writes with length 0, it should fire the callback

13 years agoAllow Strings for ports on net.Server.listen
Bradley Meck [Mon, 30 Aug 2010 20:26:53 +0000 (13:26 -0700)]
Allow Strings for ports on net.Server.listen

13 years agoConstants should be readOnly and DontDelete
Fedor Indutny [Mon, 30 Aug 2010 09:04:31 +0000 (16:04 +0700)]
Constants should be readOnly and DontDelete

13 years agoAdd failing uncaughtException test
Ryan Dahl [Mon, 30 Aug 2010 19:02:01 +0000 (12:02 -0700)]
Add failing uncaughtException test

FIXME

13 years agoadd readline support for meta-d
Johan Euphrosine [Wed, 25 Aug 2010 08:18:24 +0000 (10:18 +0200)]
add readline support for meta-d

13 years agoPass an error to the sys.pump callback if one occurs
Russell Haering [Mon, 23 Aug 2010 20:12:57 +0000 (13:12 -0700)]
Pass an error to the sys.pump callback if one occurs

- Add test case for pumping from unreadable stream.
- Document the sys.pump error handling behavior

13 years agoFix process.nextTick so thrown errors don't confuse it.
Benjamin Thomas [Fri, 27 Aug 2010 08:50:12 +0000 (02:50 -0600)]
Fix process.nextTick so thrown errors don't confuse it.

If the function for a process.nextTick throws an error, then the
splice() never removes that function from the nextTickQueue array.  This
makes sure the functions that have been run in _tickCallback get removed
regardless of errors.

Also add a test for this.

13 years agoSafe constructor: net.Server, net.Stream
Ryan Dahl [Fri, 27 Aug 2010 22:38:46 +0000 (15:38 -0700)]
Safe constructor: net.Server, net.Stream

13 years agoSafe Constructor: Buffer
Ryan Dahl [Fri, 27 Aug 2010 22:23:39 +0000 (15:23 -0700)]
Safe Constructor: Buffer

13 years agoSafe constructors: http.Server and http.Client
Ryan Dahl [Fri, 27 Aug 2010 20:58:52 +0000 (13:58 -0700)]
Safe constructors: http.Server and http.Client

13 years agoOnly check for execinfo lib in freebsd
Ryan Dahl [Fri, 27 Aug 2010 13:20:18 +0000 (06:20 -0700)]
Only check for execinfo lib in freebsd

OpenEmbedded doesn't like it when you look in /usr/lib

13 years agoadd test for readline putty support
Johan Euphrosine [Mon, 23 Aug 2010 17:21:27 +0000 (19:21 +0200)]
add test for readline putty support

13 years agoFix home/end keys in repl for putty/xterm.
Brian [Mon, 23 Aug 2010 12:15:16 +0000 (08:15 -0400)]
Fix home/end keys in repl for putty/xterm.

13 years agoModify fs.open to use accept a callback without a mode
Russell Haering [Mon, 23 Aug 2010 06:55:22 +0000 (23:55 -0700)]
Modify fs.open to use accept a callback without a mode

13 years agoadd readline support for meta-f and meta-b
Johan Euphrosine [Sun, 22 Aug 2010 05:50:40 +0000 (07:50 +0200)]
add readline support for meta-f and meta-b

13 years agoadd home/end support in rxvt and readline tests
Johan Euphrosine [Sun, 22 Aug 2010 03:55:34 +0000 (05:55 +0200)]
add home/end support in rxvt and readline tests

13 years agoDocument WriteStream 'open' event
Felix Geisendörfer [Mon, 23 Aug 2010 08:26:19 +0000 (10:26 +0200)]
Document WriteStream 'open' event

13 years agoAdd testing items, and make npm lowercase
isaacs [Mon, 23 Aug 2010 03:18:25 +0000 (20:18 -0700)]
Add testing items, and make npm lowercase

13 years agoMissing 'var' in sys.inspect (Found by Oleg Slobodskoi)
isaacs [Sun, 22 Aug 2010 20:37:08 +0000 (13:37 -0700)]
Missing 'var' in sys.inspect (Found by Oleg Slobodskoi)

13 years agoFix doc.js so that it doesn't misnest menu items in the TOC
Aria Stewart [Sun, 22 Aug 2010 05:36:33 +0000 (23:36 -0600)]
Fix doc.js so that it doesn't misnest menu items in the TOC

13 years agofix home/end on GNU/Linux
Johan Euphrosine [Fri, 20 Aug 2010 11:16:42 +0000 (13:16 +0200)]
fix home/end on GNU/Linux

13 years agoadd tests for console.log arguments handling
Johan Euphrosine [Tue, 17 Aug 2010 17:07:45 +0000 (19:07 +0200)]
add tests for console.log arguments handling

13 years agos/HTTPS/SSL/ where appropriate
Aria Stewart [Sat, 21 Aug 2010 21:26:42 +0000 (15:26 -0600)]
s/HTTPS/SSL/ where appropriate

13 years agoset-cookies header is an array of values. always
Ryan Dahl [Sat, 21 Aug 2010 23:34:38 +0000 (16:34 -0700)]
set-cookies header is an array of values. always

13 years agoImprove appendix markdown
Ryan Dahl [Sat, 21 Aug 2010 08:19:39 +0000 (01:19 -0700)]
Improve appendix markdown

13 years agoAdd appendix to docs
Ryan Dahl [Sat, 21 Aug 2010 07:30:18 +0000 (00:30 -0700)]
Add appendix to docs

13 years agoFix default encoding in docs
Ryan Dahl [Fri, 20 Aug 2010 15:49:20 +0000 (08:49 -0700)]
Fix default encoding in docs

13 years agoUpdate make website-upload
Ryan Dahl [Fri, 20 Aug 2010 09:00:37 +0000 (02:00 -0700)]
Update make website-upload

13 years agobump version v0.2.0
Ryan Dahl [Fri, 20 Aug 2010 08:52:58 +0000 (01:52 -0700)]
bump version

13 years agoAdd get/set methods to Buffer
Ryan Dahl [Fri, 20 Aug 2010 06:29:06 +0000 (23:29 -0700)]
Add get/set methods to Buffer

13 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

13 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.

13 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

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

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

13 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

13 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"

13 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

13 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.

13 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

13 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.

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

13 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'.

13 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.

13 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.

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

13 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

13 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.

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

13 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

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

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

13 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.

13 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

13 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.

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

13 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.

13 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

13 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.

13 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).

13 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.