platform/upstream/nodejs.git
12 years agotls doc: update docs to reflect API change
Maciej Małecki [Wed, 2 Nov 2011 00:27:50 +0000 (01:27 +0100)]
tls doc: update docs to reflect API change

Refs #1983.

12 years agotest tls: make tests use new `tls.connect` API
Maciej Małecki [Tue, 1 Nov 2011 15:28:04 +0000 (16:28 +0100)]
test tls: make tests use new `tls.connect` API

Refs #1983.

12 years agohttps: make `https` use new `tls.connect` API
Maciej Małecki [Tue, 1 Nov 2011 15:27:42 +0000 (16:27 +0100)]
https: make `https` use new `tls.connect` API

Refs #1983.

12 years agotls: make `tls.connect` accept port and host in `options`
Maciej Małecki [Tue, 1 Nov 2011 15:23:30 +0000 (16:23 +0100)]
tls: make `tls.connect` accept port and host in `options`

Previous API used form:

    tls.connect(443, "google.com", options, ...)

now it's replaced with:

    tls.connect({port: 443, host: "google.com", ...}, ...)

It simplifies argument parsing in `tls.connect` and makes the API
consistent with other parts.

Fixes #1983.

12 years agoUpgrade V8 to 3.8.5
Ryan Dahl [Fri, 6 Jan 2012 21:03:06 +0000 (13:03 -0800)]
Upgrade V8 to 3.8.5

12 years agochild_process: add isolates support
Ben Noordhuis [Thu, 5 Jan 2012 23:42:10 +0000 (00:42 +0100)]
child_process: add isolates support

Passing an options object with {thread:true} to .fork() or .spawn() will run the
target script in a thread instead of a separate process.

12 years agoisolates: remove global isolates list
Ben Noordhuis [Thu, 5 Jan 2012 00:12:48 +0000 (01:12 +0100)]
isolates: remove global isolates list

No longer necessary, each isolate now waits until its subordinate isolates have
exited.

12 years agoisolates: implement message passing
Ben Noordhuis [Thu, 5 Jan 2012 00:02:59 +0000 (01:02 +0100)]
isolates: implement message passing

Parent and child isolates can now pass arbitrary binary messages between each
other. The messages are sent and received through a thread-safe queue that
wakes up the event loop of the receiving thread.

12 years agouv: upgrade to 56a31f0
Ben Noordhuis [Tue, 3 Jan 2012 14:15:54 +0000 (15:15 +0100)]
uv: upgrade to 56a31f0

12 years agofs: add appendFile() and appendFileSync() functions
Emerson Macedo [Wed, 2 Nov 2011 18:06:16 +0000 (16:06 -0200)]
fs: add appendFile() and appendFileSync() functions

12 years agotyped arrays: add Buffer -> TypedArray constructor
Mikael Bourges-Sevenier [Sat, 31 Dec 2011 08:30:42 +0000 (00:30 -0800)]
typed arrays: add Buffer -> TypedArray constructor

- create a typed array from a node::Buffer object
- update TypedArray::set() to spec
- add TypedArray::get() method

12 years agobuild: compile without -fvisibility=hidden
Shigeki Ohtsu [Thu, 5 Jan 2012 12:25:07 +0000 (21:25 +0900)]
build: compile without -fvisibility=hidden

Fixes symbol lookup errors when loading an addon module on Linux.

12 years agobuild: set product_prefix to empty for Linux
Shigeki Ohtsu [Thu, 5 Jan 2012 12:01:29 +0000 (21:01 +0900)]
build: set product_prefix to empty for Linux

12 years agotypos
Andreas Madsen [Thu, 5 Jan 2012 07:57:54 +0000 (08:57 +0100)]
typos

fixes #2465

12 years agocluster improvements: Worker class and isolate internal messages
Andreas Madsen [Tue, 20 Dec 2011 09:42:48 +0000 (10:42 +0100)]
cluster improvements: Worker class and isolate internal messages

Fixes #2388

12 years agobuild: fix npm-cli.js install
Ben Noordhuis [Wed, 4 Jan 2012 15:36:08 +0000 (16:36 +0100)]
build: fix npm-cli.js install

12 years agoUpgrade V8 to 3.8.4
Ryan Dahl [Tue, 3 Jan 2012 19:46:53 +0000 (11:46 -0800)]
Upgrade V8 to 3.8.4

12 years agoMerge remote-tracking branch 'origin/v0.6'
Ben Noordhuis [Mon, 2 Jan 2012 11:29:39 +0000 (12:29 +0100)]
Merge remote-tracking branch 'origin/v0.6'

Conflicts:
src/udp_wrap.cc

12 years agocrypto: add SecureContext.clearOptions() method
Ben Noordhuis [Mon, 2 Jan 2012 11:02:05 +0000 (12:02 +0100)]
crypto: add SecureContext.clearOptions() method

SecureContext.setOptions() is backed by SSL_CTX_set_options() which, contrary to
what the name suggests, is additive: it doesn't set options, it adds them to the
already active options.

Hence the need for SecureContext.clearOptions(), which lets you unset active
options.

12 years agotest: add #2293 regression test
Ben Noordhuis [Mon, 2 Jan 2012 09:48:33 +0000 (10:48 +0100)]
test: add #2293 regression test

Creating a file event watcher with fs.watch({persistent:false}) should not block
the event loop.

12 years agouv: upgrade to 38fc6ad
Ben Noordhuis [Mon, 2 Jan 2012 09:43:10 +0000 (10:43 +0100)]
uv: upgrade to 38fc6ad

12 years agodocs: fix typo on community page
Ben Noordhuis [Sun, 1 Jan 2012 22:36:03 +0000 (23:36 +0100)]
docs: fix typo on community page

12 years agoFix #2034 repl message for .clear when useGlobal=true
isaacs [Tue, 8 Nov 2011 00:10:21 +0000 (16:10 -0800)]
Fix #2034 repl message for .clear when useGlobal=true

12 years agotest: don't create temp files in fixtures dir
Ben Noordhuis [Sat, 31 Dec 2011 02:16:04 +0000 (03:16 +0100)]
test: don't create temp files in fixtures dir

12 years agobench: add /echo endpoint to http_simple
Ben Noordhuis [Fri, 30 Dec 2011 01:03:08 +0000 (02:03 +0100)]
bench: add /echo endpoint to http_simple

Copies the POST request data verbatim into the response body.

12 years agoAdd test for #2438
Ryan Dahl [Thu, 29 Dec 2011 21:36:13 +0000 (13:36 -0800)]
Add test for #2438

Unfortunately valgrind must be used to see the bad read. It would be nice if
we could improve this test to cause a segfault.

12 years agoMerge remote branch 'origin/isolates2'
Ryan Dahl [Thu, 29 Dec 2011 19:57:40 +0000 (11:57 -0800)]
Merge remote branch 'origin/isolates2'

12 years agonet: defer net.Server 'close' event to next tick
Ben Noordhuis [Thu, 29 Dec 2011 18:30:07 +0000 (19:30 +0100)]
net: defer net.Server 'close' event to next tick

12 years agodgram: fix memory leak in error path
Ben Noordhuis [Thu, 29 Dec 2011 13:57:53 +0000 (14:57 +0100)]
dgram: fix memory leak in error path

12 years agorepl: fix repl.start not passing the `ignoreUndefined` arg to the REPLServer constructor
Damon Oehlman [Thu, 29 Dec 2011 02:15:49 +0000 (12:15 +1000)]
repl: fix repl.start not passing the `ignoreUndefined` arg to the REPLServer constructor

12 years agodocs: tiny typo in http.markdown
Jeremy Martin [Wed, 28 Dec 2011 20:14:30 +0000 (15:14 -0500)]
docs: tiny typo in http.markdown

12 years agoMerge branch 'isolates2'
Ben Noordhuis [Thu, 29 Dec 2011 00:56:58 +0000 (01:56 +0100)]
Merge branch 'isolates2'

12 years agoMerge branch 'v0.6'
Ben Noordhuis [Thu, 29 Dec 2011 00:49:10 +0000 (01:49 +0100)]
Merge branch 'v0.6'

Conflicts:
src/platform_win32.cc

12 years agoInclude ngx-queue.h, fix Windows build.
Ben Noordhuis [Wed, 28 Dec 2011 23:40:40 +0000 (00:40 +0100)]
Include ngx-queue.h, fix Windows build.

12 years agouv: upgrade to 85f6b79
Ben Noordhuis [Wed, 28 Dec 2011 23:18:23 +0000 (00:18 +0100)]
uv: upgrade to 85f6b79

12 years agoMake msbuild run in parallel.
Ben Noordhuis [Wed, 28 Dec 2011 22:56:53 +0000 (23:56 +0100)]
Make msbuild run in parallel.

12 years agoAdd isolate version of test-child-process-fork
Ryan Dahl [Wed, 28 Dec 2011 02:11:32 +0000 (18:11 -0800)]
Add isolate version of test-child-process-fork

12 years agoAdd process.features.isolates
Ryan Dahl [Tue, 27 Dec 2011 21:06:25 +0000 (13:06 -0800)]
Add process.features.isolates

12 years agomove isolate V8 functions out of node.cc
Ryan Dahl [Fri, 23 Dec 2011 22:06:32 +0000 (14:06 -0800)]
move isolate V8 functions out of node.cc

12 years agoAdd node::Loop() and don't inc node_isolate.h in *.cc
Ryan Dahl [Thu, 22 Dec 2011 21:40:26 +0000 (13:40 -0800)]
Add node::Loop() and don't inc node_isolate.h in *.cc

node::Loop() replaces the NODE_LOOP macro. This avoids hitting
v8::Isolate::GetCurrent() for each loop lookup when HAVE_ISOLATE==0

12 years agouv: upgrade to d6a06b8
Ben Noordhuis [Thu, 22 Dec 2011 16:09:00 +0000 (17:09 +0100)]
uv: upgrade to d6a06b8

12 years agoAdd shared-buffer isolate addon test
Ryan Dahl [Wed, 21 Dec 2011 21:55:05 +0000 (13:55 -0800)]
Add shared-buffer isolate addon test

12 years agoRemove node_isolate.h from node.h
Ryan Dahl [Wed, 21 Dec 2011 22:02:52 +0000 (14:02 -0800)]
Remove node_isolate.h from node.h

12 years agoChange isolate test to demo EIO bug
Ryan Dahl [Mon, 19 Dec 2011 07:39:49 +0000 (23:39 -0800)]
Change isolate test to demo EIO bug

12 years agonode_file.cc should use NODE_LOOP()
Ryan Dahl [Mon, 19 Dec 2011 06:49:20 +0000 (22:49 -0800)]
node_file.cc should use NODE_LOOP()

12 years agoJoin all threads at end of main thread
Ryan Dahl [Sun, 18 Dec 2011 18:56:48 +0000 (10:56 -0800)]
Join all threads at end of main thread

Require reorganizing the isolates somewhat.

Add a very simple test.

12 years agoMove prog_start_time init after isolate assigned
Ryan Dahl [Sat, 17 Dec 2011 07:23:34 +0000 (23:23 -0800)]
Move prog_start_time init after isolate assigned

12 years agoAdd link-list of all isolates
Ryan Dahl [Thu, 15 Dec 2011 22:20:27 +0000 (14:20 -0800)]
Add link-list of all isolates

12 years agoMove uv loop initialization into isolate
Ryan Dahl [Tue, 13 Dec 2011 22:48:36 +0000 (14:48 -0800)]
Move uv loop initialization into isolate

12 years agomove thread_id to node_isolate.cc
Ryan Dahl [Tue, 13 Dec 2011 19:49:32 +0000 (11:49 -0800)]
move thread_id to node_isolate.cc

12 years agoisolates: replace SLIST with ngx_queue_t
Ben Noordhuis [Mon, 12 Dec 2011 14:47:00 +0000 (15:47 +0100)]
isolates: replace SLIST with ngx_queue_t

12 years agoisolates: add process.tid property, pass args to isolate
Ben Noordhuis [Fri, 9 Dec 2011 20:49:10 +0000 (21:49 +0100)]
isolates: add process.tid property, pass args to isolate

12 years agoisolates: have node::Isolate manage the v8::Context
Ben Noordhuis [Fri, 9 Dec 2011 20:14:00 +0000 (21:14 +0100)]
isolates: have node::Isolate manage the v8::Context

12 years agoisolates: rename node::Isolate member isolate_ to v8_isolate_
Ben Noordhuis [Fri, 9 Dec 2011 20:12:48 +0000 (21:12 +0100)]
isolates: rename node::Isolate member isolate_ to v8_isolate_

12 years agoSeparate per-process and per-thread init logic.
Ben Noordhuis [Fri, 9 Dec 2011 18:02:33 +0000 (19:02 +0100)]
Separate per-process and per-thread init logic.

12 years agoRemove per-process globals from per-thread context.
Ben Noordhuis [Fri, 9 Dec 2011 17:49:17 +0000 (18:49 +0100)]
Remove per-process globals from per-thread context.

12 years agoisolates have globals stored in struct globals
Ryan Dahl [Fri, 9 Dec 2011 06:44:10 +0000 (22:44 -0800)]
isolates have globals stored in struct globals

12 years agoisolates: add _newIsolate() and _joinIsolate() to process object
Ben Noordhuis [Wed, 23 Nov 2011 20:46:22 +0000 (21:46 +0100)]
isolates: add _newIsolate() and _joinIsolate() to process object

12 years agobuild: move internals to separate header file
Ben Noordhuis [Tue, 29 Nov 2011 16:35:19 +0000 (17:35 +0100)]
build: move internals to separate header file

12 years agobuild: add --without-isolates configure switch
Ben Noordhuis [Tue, 29 Nov 2011 15:41:41 +0000 (16:41 +0100)]
build: add --without-isolates configure switch

12 years agoisolates: add atexit() functionality for isolates
Ben Noordhuis [Wed, 23 Nov 2011 19:50:28 +0000 (20:50 +0100)]
isolates: add atexit() functionality for isolates

12 years agoisolates: isolate-ify the main loop
Ben Noordhuis [Tue, 22 Nov 2011 16:10:09 +0000 (17:10 +0100)]
isolates: isolate-ify the main loop

12 years agouv: upgrade to f5c2a4a
Ben Noordhuis [Tue, 22 Nov 2011 15:07:34 +0000 (16:07 +0100)]
uv: upgrade to f5c2a4a

12 years agoMerge remote-tracking branch 'origin/v0.6'
Ben Noordhuis [Thu, 29 Dec 2011 00:49:10 +0000 (01:49 +0100)]
Merge remote-tracking branch 'origin/v0.6'

Conflicts:
src/platform_win32.cc

12 years agouv: upgrade to 0db56ea
Ben Noordhuis [Thu, 29 Dec 2011 00:42:18 +0000 (01:42 +0100)]
uv: upgrade to 0db56ea

12 years agoInclude ngx-queue.h, fix Windows build.
Ben Noordhuis [Wed, 28 Dec 2011 23:40:40 +0000 (00:40 +0100)]
Include ngx-queue.h, fix Windows build.

12 years agouv: upgrade to 85f6b79
Ben Noordhuis [Wed, 28 Dec 2011 23:18:23 +0000 (00:18 +0100)]
uv: upgrade to 85f6b79

12 years agoMake msbuild run in parallel.
Ben Noordhuis [Wed, 28 Dec 2011 22:56:53 +0000 (23:56 +0100)]
Make msbuild run in parallel.

12 years agoUpgrade V8 to 3.8.3
Ryan Dahl [Wed, 28 Dec 2011 22:13:50 +0000 (14:13 -0800)]
Upgrade V8 to 3.8.3

12 years agoRevert "Add HandleScope to http-parser binding"
Ryan Dahl [Wed, 28 Dec 2011 22:08:19 +0000 (14:08 -0800)]
Revert "Add HandleScope to http-parser binding"

This commit did not actually fix the production crashes.

This reverts commit 73cf8e82e768af870964d6f3375ab758e774165c.

12 years agotest: remove internet test from test/simple/
Andreas Madsen [Wed, 28 Dec 2011 16:13:28 +0000 (17:13 +0100)]
test: remove internet test from test/simple/

12 years agotest: fix test-sys.js fails if the time zone is not CET
koichik [Wed, 28 Dec 2011 06:18:11 +0000 (15:18 +0900)]
test: fix test-sys.js fails if the time zone is not CET

Fixes #2423.

12 years agonet: fix Socket.pause null reference when called on a closed Stream
koichik [Wed, 28 Dec 2011 06:13:57 +0000 (15:13 +0900)]
net: fix Socket.pause null reference when called on a closed Stream

Fixes #1980.

12 years agoAdd isolate version of test-child-process-fork
Ryan Dahl [Wed, 28 Dec 2011 02:11:32 +0000 (18:11 -0800)]
Add isolate version of test-child-process-fork

12 years agoAdd process.features.isolates
Ryan Dahl [Tue, 27 Dec 2011 21:06:25 +0000 (13:06 -0800)]
Add process.features.isolates

12 years agomove isolate V8 functions out of node.cc
Ryan Dahl [Fri, 23 Dec 2011 22:06:32 +0000 (14:06 -0800)]
move isolate V8 functions out of node.cc

12 years agoAdd node::Loop() and don't inc node_isolate.h in *.cc
Ryan Dahl [Thu, 22 Dec 2011 21:40:26 +0000 (13:40 -0800)]
Add node::Loop() and don't inc node_isolate.h in *.cc

node::Loop() replaces the NODE_LOOP macro. This avoids hitting
v8::Isolate::GetCurrent() for each loop lookup when HAVE_ISOLATE==0

12 years agouv: upgrade to d6a06b8
Ben Noordhuis [Thu, 22 Dec 2011 16:09:00 +0000 (17:09 +0100)]
uv: upgrade to d6a06b8

12 years agoAdd shared-buffer isolate addon test
Ryan Dahl [Wed, 21 Dec 2011 21:55:05 +0000 (13:55 -0800)]
Add shared-buffer isolate addon test

12 years agoRemove node_isolate.h from node.h
Ryan Dahl [Wed, 21 Dec 2011 22:02:52 +0000 (14:02 -0800)]
Remove node_isolate.h from node.h

12 years agoChange isolate test to demo EIO bug
Ryan Dahl [Mon, 19 Dec 2011 07:39:49 +0000 (23:39 -0800)]
Change isolate test to demo EIO bug

12 years agonode_file.cc should use NODE_LOOP()
Ryan Dahl [Mon, 19 Dec 2011 06:49:20 +0000 (22:49 -0800)]
node_file.cc should use NODE_LOOP()

12 years agoJoin all threads at end of main thread
Ryan Dahl [Sun, 18 Dec 2011 18:56:48 +0000 (10:56 -0800)]
Join all threads at end of main thread

Require reorganizing the isolates somewhat.

Add a very simple test.

12 years agoMove prog_start_time init after isolate assigned
Ryan Dahl [Sat, 17 Dec 2011 07:23:34 +0000 (23:23 -0800)]
Move prog_start_time init after isolate assigned

12 years agoAdd link-list of all isolates
Ryan Dahl [Thu, 15 Dec 2011 22:20:27 +0000 (14:20 -0800)]
Add link-list of all isolates

12 years agoMove uv loop initialization into isolate
Ryan Dahl [Tue, 13 Dec 2011 22:48:36 +0000 (14:48 -0800)]
Move uv loop initialization into isolate

12 years agomove thread_id to node_isolate.cc
Ryan Dahl [Tue, 13 Dec 2011 19:49:32 +0000 (11:49 -0800)]
move thread_id to node_isolate.cc

12 years agoisolates: replace SLIST with ngx_queue_t
Ben Noordhuis [Mon, 12 Dec 2011 14:47:00 +0000 (15:47 +0100)]
isolates: replace SLIST with ngx_queue_t

12 years agoisolates: add process.tid property, pass args to isolate
Ben Noordhuis [Fri, 9 Dec 2011 20:49:10 +0000 (21:49 +0100)]
isolates: add process.tid property, pass args to isolate

12 years agoisolates: have node::Isolate manage the v8::Context
Ben Noordhuis [Fri, 9 Dec 2011 20:14:00 +0000 (21:14 +0100)]
isolates: have node::Isolate manage the v8::Context

12 years agoisolates: rename node::Isolate member isolate_ to v8_isolate_
Ben Noordhuis [Fri, 9 Dec 2011 20:12:48 +0000 (21:12 +0100)]
isolates: rename node::Isolate member isolate_ to v8_isolate_

12 years agoSeparate per-process and per-thread init logic.
Ben Noordhuis [Fri, 9 Dec 2011 18:02:33 +0000 (19:02 +0100)]
Separate per-process and per-thread init logic.

12 years agoRemove per-process globals from per-thread context.
Ben Noordhuis [Fri, 9 Dec 2011 17:49:17 +0000 (18:49 +0100)]
Remove per-process globals from per-thread context.

12 years agoisolates have globals stored in struct globals
Ryan Dahl [Fri, 9 Dec 2011 06:44:10 +0000 (22:44 -0800)]
isolates have globals stored in struct globals

12 years agoisolates: add _newIsolate() and _joinIsolate() to process object
Ben Noordhuis [Wed, 23 Nov 2011 20:46:22 +0000 (21:46 +0100)]
isolates: add _newIsolate() and _joinIsolate() to process object

12 years agobuild: move internals to separate header file
Ben Noordhuis [Tue, 29 Nov 2011 16:35:19 +0000 (17:35 +0100)]
build: move internals to separate header file

12 years agobuild: add --without-isolates configure switch
Ben Noordhuis [Tue, 29 Nov 2011 15:41:41 +0000 (16:41 +0100)]
build: add --without-isolates configure switch

12 years agoisolates: add atexit() functionality for isolates
Ben Noordhuis [Wed, 23 Nov 2011 19:50:28 +0000 (20:50 +0100)]
isolates: add atexit() functionality for isolates

12 years agoisolates: isolate-ify the main loop
Ben Noordhuis [Tue, 22 Nov 2011 16:10:09 +0000 (17:10 +0100)]
isolates: isolate-ify the main loop

12 years agouv: upgrade to f5c2a4a
Ben Noordhuis [Tue, 22 Nov 2011 15:07:34 +0000 (16:07 +0100)]
uv: upgrade to f5c2a4a