platform/upstream/nodejs.git
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 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 agodocs: fix docs to not suggest variable leaks
koichik [Tue, 27 Dec 2011 08:43:58 +0000 (17:43 +0900)]
docs: fix docs to not suggest variable leaks

Fixes #2106.

12 years agohttp: fix XMLHttpRequest piped in a writable file stream hangs next request
koichik [Tue, 27 Dec 2011 08:42:37 +0000 (17:42 +0900)]
http: fix XMLHttpRequest piped in a writable file stream hangs next request

Fixes #2263.

12 years agotls: fix test-https-client-reject fails
koichik [Tue, 27 Dec 2011 08:33:23 +0000 (17:33 +0900)]
tls: fix test-https-client-reject fails

Fixes #2417.

12 years agodocs: document http.Server.close() semantics
Ben Noordhuis [Mon, 26 Dec 2011 22:30:25 +0000 (23:30 +0100)]
docs: document http.Server.close() semantics

12 years agohttp: Avoid 'data'/'end' events after pause()
koichik [Mon, 26 Dec 2011 15:14:47 +0000 (16:14 +0100)]
http: Avoid 'data'/'end' events after pause()

Fixes #1040.

12 years agohttp: fix resource leak
koichik [Tue, 29 Nov 2011 11:55:05 +0000 (20:55 +0900)]
http: fix resource leak

Fixes #2069

12 years agowin: fix mismatched new[]/delete
Ben Noordhuis [Mon, 26 Dec 2011 02:27:28 +0000 (03:27 +0100)]
win: fix mismatched new[]/delete

12 years agobench: fix use of fd after close
Ben Noordhuis [Mon, 26 Dec 2011 02:23:34 +0000 (03:23 +0100)]
bench: fix use of fd after close

12 years agoAdd deprecation message for http.Client
Ryan Dahl [Sat, 24 Dec 2011 01:42:27 +0000 (17:42 -0800)]
Add deprecation message for http.Client

12 years agoMerge remote branch 'origin/v0.6'
Ryan Dahl [Fri, 23 Dec 2011 23:58:11 +0000 (15:58 -0800)]
Merge remote branch 'origin/v0.6'

Conflicts:
deps/v8/src/version.cc

12 years agoUpgrade V8 to 3.8.2.1
Ryan Dahl [Fri, 23 Dec 2011 23:57:10 +0000 (15:57 -0800)]
Upgrade V8 to 3.8.2.1

12 years agoChange 'real example' in addon doc
Ryan Dahl [Fri, 23 Dec 2011 23:10:06 +0000 (15:10 -0800)]
Change 'real example' in addon doc

12 years agoGYP: rename options.gypi to config.gypi
Ryan Dahl [Fri, 23 Dec 2011 22:24:50 +0000 (14:24 -0800)]
GYP: rename options.gypi to config.gypi

Sounds more familiar to unix users used to config.h

12 years agoAdd another nextTick benchmark
Bert Belder [Fri, 23 Dec 2011 02:09:36 +0000 (03:09 +0100)]
Add another nextTick benchmark

It tests how many iterations the event loop can make per second.

12 years agobuffer: don't pollute global namespace in buffer.readInt*
Phil Sung [Thu, 22 Dec 2011 01:38:12 +0000 (17:38 -0800)]
buffer: don't pollute global namespace in buffer.readInt*

12 years agotest: ensure callback is executed
Ben Noordhuis [Thu, 22 Dec 2011 16:28:23 +0000 (17:28 +0100)]
test: ensure callback is executed

12 years agonet: raise exception when the socket is closed
Ju-yeong Park [Thu, 22 Dec 2011 02:32:27 +0000 (11:32 +0900)]
net: raise exception when the socket is closed

12 years agodocs: document 'encoding' arg of hash.update()
Dave Irvine [Thu, 22 Dec 2011 14:39:53 +0000 (14:39 +0000)]
docs: document 'encoding' arg of hash.update()

12 years agotimers: fix performance regression
Ben Noordhuis [Thu, 22 Dec 2011 13:42:20 +0000 (14:42 +0100)]
timers: fix performance regression

Fix a 5-7% performance regression in the http_simple benchmark that was
introduced by the following commits:

  348d8cd timers: remove _idleTimeout from item in .unenroll()
  f2f3028 timers: fix memory leak in setTimeout
  098fef6 timers: remember extra setTimeout() arguments when timeout==0

Fix suggested by Bert Belder.

12 years agodocs: fix javascript error on document page
Seong-Rak Choi [Wed, 21 Dec 2011 04:25:56 +0000 (13:25 +0900)]
docs: fix javascript error on document page

`highlight()` is called twice. It causes following javascript error.
> Uncaught Found <pre> element with class="sh_sourcecode",
> but no such language exists

Fixes #2393.

12 years agodocs: use "Level 1" HTML5 features
Shannen [Tue, 20 Dec 2011 04:57:45 +0000 (15:57 +1100)]
docs: use "Level 1" HTML5 features

Since we're using an HTML doctype we might as well use "Level 1" HTML5 features.
See more: http://mathiasbynens.be/notes/html5-levels#level-1

Fixes #2386.

12 years agoAdd gitignore file for addon tests
Ryan Dahl [Wed, 21 Dec 2011 22:18:56 +0000 (14:18 -0800)]
Add gitignore file for addon tests

12 years agoUpgrade GYP to r1115
Ryan Dahl [Wed, 21 Dec 2011 20:39:36 +0000 (12:39 -0800)]
Upgrade GYP to r1115

12 years agoUpgrade V8 to 3.6.6.15
Ryan Dahl [Wed, 21 Dec 2011 20:38:07 +0000 (12:38 -0800)]
Upgrade V8 to 3.6.6.15

12 years agoMerge remote branch 'origin/v0.6'
Ryan Dahl [Wed, 21 Dec 2011 20:17:23 +0000 (12:17 -0800)]
Merge remote branch 'origin/v0.6'

Conflicts:
Makefile
lib/_debugger.js

12 years agoAdd HandleScope to http-parser binding
Ryan Dahl [Wed, 21 Dec 2011 20:01:39 +0000 (12:01 -0800)]
Add HandleScope to http-parser binding

Fixes production crashes. We were not able to reproduce in the test suite.

12 years agoUpgrade V8 to 3.8.2
Ryan Dahl [Wed, 21 Dec 2011 18:54:24 +0000 (10:54 -0800)]
Upgrade V8 to 3.8.2

12 years agotls: Fix node swallows openssl error on request
koichik [Sat, 17 Dec 2011 17:09:16 +0000 (02:09 +0900)]
tls: Fix node swallows openssl error on request

Fixes #2308.
Fixes #2246.

12 years agodeps: fix openssl build on x86_64
Ben Noordhuis [Wed, 21 Dec 2011 17:28:34 +0000 (18:28 +0100)]
deps: fix openssl build on x86_64

12 years agouv: upgrade to 10de090
Ben Noordhuis [Tue, 20 Dec 2011 19:55:14 +0000 (20:55 +0100)]
uv: upgrade to 10de090

12 years agotls: remove duplicate assignment
Ben Noordhuis [Wed, 21 Dec 2011 14:01:07 +0000 (15:01 +0100)]
tls: remove duplicate assignment

12 years agoSupport addons with gyp
Ryan Dahl [Wed, 21 Dec 2011 06:03:32 +0000 (22:03 -0800)]
Support addons with gyp

Initial pass.

12 years agoRemove visibility=hidden options from common.gypi
Ryan Dahl [Wed, 21 Dec 2011 06:02:47 +0000 (22:02 -0800)]
Remove visibility=hidden options from common.gypi

Not necessary and preventing addon loading.

12 years agoRemove unnecessary stuff from node.gyp
Ryan Dahl [Wed, 21 Dec 2011 04:26:13 +0000 (20:26 -0800)]
Remove unnecessary stuff from node.gyp

12 years agoRemove unnecessary statement
Bert Belder [Tue, 20 Dec 2011 17:15:22 +0000 (17:15 +0000)]
Remove unnecessary statement

12 years agoFix 'make install'
Ryan Dahl [Tue, 20 Dec 2011 02:06:19 +0000 (18:06 -0800)]
Fix 'make install'

Broken in 45605c because configure does not spit out proper JavaScript.
Needed to change single quotes to double.

12 years agotimers: remove _idleTimeout from item in .unenroll()
James Hartig [Fri, 2 Dec 2011 08:27:35 +0000 (03:27 -0500)]
timers: remove _idleTimeout from item in .unenroll()

Stops .active() from reactivating the timer.

Fixes #2114.

12 years agoAdd missing return statement in _debugPause() binding.
Ben Noordhuis [Mon, 19 Dec 2011 23:30:41 +0000 (00:30 +0100)]
Add missing return statement in _debugPause() binding.

12 years agogyp: switch json for pprint when generating config
jbergstroem [Sun, 18 Dec 2011 22:53:07 +0000 (23:53 +0100)]
gyp: switch json for pprint when generating config

12 years agobuild: remove unused cmakelist
jbergstroem [Sun, 18 Dec 2011 22:48:27 +0000 (23:48 +0100)]
build: remove unused cmakelist

12 years agoassert: test `RegExp`'s properties when checking for equality
Maciej Małecki [Mon, 19 Dec 2011 22:28:42 +0000 (23:28 +0100)]
assert: test `RegExp`'s properties when checking for equality

Previous code ignored the fact that `/a/ != /a/g`.

Test case included.

12 years agoassert: .deepEqual() support for RegExp objects
Pedro Teixeira [Wed, 2 Feb 2011 11:09:02 +0000 (11:09 +0000)]
assert: .deepEqual() support for RegExp objects

12 years agogyp: include opensslconf.h on x64
Ben Noordhuis [Mon, 19 Dec 2011 22:24:29 +0000 (23:24 +0100)]
gyp: include opensslconf.h on x64

Good news, it means we don't have to compile with OPENSSL_NO_ASM=1 after all.

12 years agogyp: compile openssl with OPENSSL_NO_ASM=1
Ben Noordhuis [Mon, 19 Dec 2011 21:55:11 +0000 (22:55 +0100)]
gyp: compile openssl with OPENSSL_NO_ASM=1

Fixes linker error "undefined reference to `OPENSSL_ia32_cpuid'". This is
sub-optimal and needs to be revisited, the plain C implementations are often
much slower.

12 years agoGYP: don't build V8 twice
Ryan Dahl [Mon, 19 Dec 2011 21:41:04 +0000 (13:41 -0800)]
GYP: don't build V8 twice

12 years agodebugger: Request backtrace w/o refs, see #1745
Fedor Indutny [Fri, 9 Dec 2011 08:41:48 +0000 (14:41 +0600)]
debugger: Request backtrace w/o refs, see #1745

Fixes #2379

12 years agodebugger: document pause and setBreakpoint(line)
Fedor Indutny [Mon, 19 Dec 2011 21:09:54 +0000 (03:09 +0600)]
debugger: document pause and setBreakpoint(line)

Fixes #2381

12 years agoRemove debug console.log and optimize object copy
Andreas Madsen [Mon, 19 Dec 2011 21:08:52 +0000 (22:08 +0100)]
Remove debug console.log and optimize object copy

Fixes #2380

12 years agoUpgrade V8 to 3.8.1
Ryan Dahl [Mon, 19 Dec 2011 21:06:19 +0000 (13:06 -0800)]
Upgrade V8 to 3.8.1

12 years agoAdd env argument to cluster.fork
Andreas Madsen [Mon, 19 Dec 2011 19:48:03 +0000 (20:48 +0100)]
Add env argument to cluster.fork

Fixes 2378

12 years agobreak on exception
Fedor Indutny [Sat, 17 Dec 2011 06:02:51 +0000 (12:02 +0600)]
break on exception

Fixes #2304

12 years agouse inlineRefs, as it's already impl
Fedor Indutny [Wed, 14 Dec 2011 12:33:58 +0000 (18:33 +0600)]
use inlineRefs, as it's already impl

12 years agopass noRefs as arguments
Fedor Indutny [Wed, 14 Dec 2011 07:53:30 +0000 (13:53 +0600)]
pass noRefs as arguments

12 years agopause command
Fedor Indutny [Sat, 10 Dec 2011 16:52:07 +0000 (22:52 +0600)]
pause command

12 years agoallow setBreakpoint(line)
Fedor Indutny [Sat, 10 Dec 2011 16:34:50 +0000 (22:34 +0600)]
allow setBreakpoint(line)

12 years agopreserve cursor pos
Fedor Indutny [Fri, 9 Dec 2011 09:24:15 +0000 (15:24 +0600)]
preserve cursor pos

* configurable via .prompt()'s preserveCursor argument (false by default)

12 years agorequest backtrace w/o refs, see #1745
Fedor Indutny [Fri, 9 Dec 2011 08:41:48 +0000 (14:41 +0600)]
request backtrace w/o refs, see #1745

12 years agotest: Add test case for MODULE_NOT_FOUND.
Nathan Rajlich [Sun, 18 Dec 2011 21:33:48 +0000 (13:33 -0800)]
test: Add test case for MODULE_NOT_FOUND.

12 years agodocs: Add docs for MODULE_NOT_FOUND error.
Nathan Rajlich [Sun, 18 Dec 2011 21:31:16 +0000 (13:31 -0800)]
docs: Add docs for MODULE_NOT_FOUND error.

12 years agomodule: Set the error.code to 'MODULE_NOT_FOUND' when a bad path is given to require.
Nathan Rajlich [Sun, 18 Dec 2011 21:22:10 +0000 (13:22 -0800)]
module: Set the error.code to 'MODULE_NOT_FOUND' when a bad path is given to require.

Fixes #2358.

12 years agoadd links to package manager on download page
Ryan Dahl [Mon, 19 Dec 2011 06:54:15 +0000 (22:54 -0800)]
add links to package manager on download page

12 years agoFix make targets so they detect changes
Ryan Dahl [Sun, 18 Dec 2011 23:10:01 +0000 (15:10 -0800)]
Fix make targets so they detect changes

Broken in 10d92b3

12 years agoutil: output Dates with Date.toString not Date.toUTCString
Avi Flax [Sun, 18 Dec 2011 16:29:37 +0000 (11:29 -0500)]
util: output Dates with Date.toString not Date.toUTCString

12 years agomodule: improve process.dlopen() error messages
Ben Noordhuis [Sun, 18 Dec 2011 21:27:21 +0000 (22:27 +0100)]
module: improve process.dlopen() error messages

On Windows, that is. On Unices, we don't have a good way to translate dlopen()
and dlsym() errors (yet).

12 years agouv: upgrade to feb267e
Ben Noordhuis [Sun, 18 Dec 2011 21:28:30 +0000 (22:28 +0100)]
uv: upgrade to feb267e

12 years agoUse common.PORT to avoid conflicts
Felix Geisendörfer [Sun, 18 Dec 2011 12:35:31 +0000 (13:35 +0100)]
Use common.PORT to avoid conflicts

12 years agotimers: fix memory leak in setTimeout
Yoshihiro Kikuchi [Sun, 18 Dec 2011 00:22:22 +0000 (09:22 +0900)]
timers: fix memory leak in setTimeout

Closing handle is leaked when setTimeout called with arguments which are
1. a callback
2. zero delay
(i.e. setTimeout(function(){}, 0); )

12 years agochild_process: make .send() throw if message is undefined
Ben Noordhuis [Sun, 18 Dec 2011 00:26:00 +0000 (01:26 +0100)]
child_process: make .send() throw if message is undefined

JSON.stringify(undefined) returns "undefined" but JSON.parse() doesn't know how
to parse that.