platform/upstream/nodejs.git
12 years agoMerge remote-tracking branch 'ry/v0.8' into master
isaacs [Thu, 19 Jul 2012 20:06:46 +0000 (13:06 -0700)]
Merge remote-tracking branch 'ry/v0.8' into master

Conflicts:
src/node_version.h

12 years agonpm: Upgrade to 1.1.44
isaacs [Thu, 19 Jul 2012 20:03:28 +0000 (13:03 -0700)]
npm: Upgrade to 1.1.44

12 years agonextTick: Preserve depth in error/reentry cases
isaacs [Tue, 17 Jul 2012 15:17:34 +0000 (08:17 -0700)]
nextTick: Preserve depth in error/reentry cases

When there is an error that is thrown in a nextTick function, which is
then handled by a domain or other process.on('uncaughtException')
handler, if the error handler *also* adds a nextTick and triggers
multiple MakeCallback events (ie, by doing some I/O), then it would
skip over the tickDepth check, resulting in an infinite spin.

Solution: Check the tickDepth at the start of the tick processing, and
preserve it when we are cleaning up in the error case or exiting early
in the re-entry case.

In order to make sure that tick callbacks are *eventually* handled, any
callback triggered by the underlying spinner in libuv will be processed
as if starting from a tick depth of 0.

12 years agoBlog post about v0.8.3
isaacs [Thu, 19 Jul 2012 17:20:44 +0000 (10:20 -0700)]
Blog post about v0.8.3

12 years agoNow working on 0.8.4
isaacs [Thu, 19 Jul 2012 17:19:45 +0000 (10:19 -0700)]
Now working on 0.8.4

12 years agoMerge branch 'v0.8.3-release' into v0.8
isaacs [Thu, 19 Jul 2012 17:19:04 +0000 (10:19 -0700)]
Merge branch 'v0.8.3-release' into v0.8

12 years ago2012.07.19, Version 0.8.3 (Stable) v0.8.3
isaacs [Tue, 17 Jul 2012 19:02:57 +0000 (12:02 -0700)]
2012.07.19, Version 0.8.3 (Stable)

* V8: upgrade to 3.11.10.15

* npm: Upgrade to 1.1.43

* net: fix net.Server.listen({fd:x}) error reporting (Ben Noordhuis)

* net: fix bogus errno reporting (Ben Noordhuis)

* build: Move npm shebang logic into an npm script (isaacs)

* build: fix add-on loading on freebsd (Ben Noordhuis)

* build: disable unsafe optimizations (Ben Noordhuis)

* build: fix spurious mksnapshot crashes for good (Ben Noordhuis)

* build: speed up genv8constants (Dave Pacheco)

* fs: make unwatchFile() remove a specific listener (Ben Noordhuis)

* domain: Remove first arg from intercepted fn (Toshihiro Nakamura)

* domain: Fix memory leak on error (isaacs)

* events: Fix memory leak from removeAllListeners (Nathan Rajlich)

* zlib: Fix memory leak in Unzip class. (isaacs)

* crypto: Fix memory leak in DecipherUpdate() (Ben Noordhuis)

12 years agouv: Upgrade to 94355e4
isaacs [Thu, 19 Jul 2012 16:29:29 +0000 (09:29 -0700)]
uv: Upgrade to 94355e4

12 years agouv: Upgrade to 94355e4
isaacs [Thu, 19 Jul 2012 16:29:29 +0000 (09:29 -0700)]
uv: Upgrade to 94355e4

12 years agobuild: unbreak ustack on smartos
Ben Noordhuis [Thu, 19 Jul 2012 16:20:34 +0000 (18:20 +0200)]
build: unbreak ustack on smartos

I disabled the -ffunction-sections and -fdata-sections switches in 202df30
because they're horribly buggy with some gcc/binutils combos.

However, it turns out that the dtrace/ustack post-processing tool requires
that V8 is compiled with said switches and was broken because of it.

This commit turns them on again on SunOS systems. Let's hope for the best.

12 years agobuild: link with -rdynamic, not -Wl,--export-dynamic
Ben Noordhuis [Wed, 18 Jul 2012 22:08:35 +0000 (00:08 +0200)]
build: link with -rdynamic, not -Wl,--export-dynamic

The system linker on SunOS doesn't understand --export-dynamic.

12 years agobuild: fix mksnapshot crash on sunos
Ben Noordhuis [Wed, 18 Jul 2012 21:26:23 +0000 (21:26 +0000)]
build: fix mksnapshot crash on sunos

Unconditionally compile V8 with -fno-strict-aliasing on all platforms.

gcc 4.5.2 on sunos generates bad code when -fstrict-aliasing is enabled, which
undoubtedly means that there are more buggy versions of gcc out there.

-fstrict-aliasing does not give a significant performance boost so let's just
disable it.

Fixes #3736.

12 years agodoc: build requires GNU make 3.81+
Ben Noordhuis [Wed, 18 Jul 2012 12:23:39 +0000 (14:23 +0200)]
doc: build requires GNU make 3.81+

12 years agonode: make ev-emul.h compile with -Wextra -Werror
Ben Noordhuis [Wed, 18 Jul 2012 11:32:26 +0000 (13:32 +0200)]
node: make ev-emul.h compile with -Wextra -Werror

Explicitly cast double to int64_t, it was making add-ons that compile with
`-Wall -Wextra -Werror` fail to build.

Don't use fully variadic macros, gcc in uber-strict mode rejects them.

12 years agodoc: advise *strongly* against uncaughtException
Ben Noordhuis [Wed, 18 Jul 2012 00:13:55 +0000 (02:13 +0200)]
doc: advise *strongly* against uncaughtException

12 years agouv: Upgrade to b49d6f7
isaacs [Wed, 18 Jul 2012 00:09:34 +0000 (17:09 -0700)]
uv: Upgrade to b49d6f7

12 years agotools: speed up genv8constants
Dave Pacheco [Tue, 17 Jul 2012 22:25:11 +0000 (15:25 -0700)]
tools: speed up genv8constants

genv8constants was much slower than necessary due to lack of pipe buffering.

12 years agov8: Reapply floating patches
isaacs [Tue, 17 Jul 2012 18:44:01 +0000 (11:44 -0700)]
v8: Reapply floating patches

12 years agov8: upgrade to 3.11.10.15
isaacs [Tue, 17 Jul 2012 18:43:02 +0000 (11:43 -0700)]
v8: upgrade to 3.11.10.15

12 years agouv: Upgrade to a9f6f06
isaacs [Tue, 17 Jul 2012 18:40:13 +0000 (11:40 -0700)]
uv: Upgrade to a9f6f06

12 years agonpm: Upgrade to 1.1.43
isaacs [Tue, 17 Jul 2012 18:37:39 +0000 (11:37 -0700)]
npm: Upgrade to 1.1.43

12 years agodoc: nextTick semantics and justification
isaacs [Sat, 14 Jul 2012 01:11:38 +0000 (18:11 -0700)]
doc: nextTick semantics and justification

12 years agonextTick: explicitly no-op when _exiting
isaacs [Mon, 16 Jul 2012 18:45:12 +0000 (11:45 -0700)]
nextTick: explicitly no-op when _exiting

12 years agonextTick: Handle tick callbacks after each tick
isaacs [Sat, 14 Jul 2012 01:00:49 +0000 (18:00 -0700)]
nextTick: Handle tick callbacks after each tick

12 years agoMove MakeCallback to JS
isaacs [Tue, 17 Jul 2012 00:29:06 +0000 (17:29 -0700)]
Move MakeCallback to JS

12 years agoMerge remote-tracking branch 'ry/v0.8'
isaacs [Tue, 17 Jul 2012 01:35:07 +0000 (18:35 -0700)]
Merge remote-tracking branch 'ry/v0.8'

12 years agoEnable color customization of `util.inspect`
Pavel Lang [Mon, 16 Jul 2012 21:50:15 +0000 (23:50 +0200)]
Enable color customization of `util.inspect`

This is rewrite of #3701 and #3603 before.

This patch introduce `util.inspect.styles`
and `util.inspect.colors` objects, which enables customization
of color sequences.

12 years agodomain: Fix stack leak on error
isaacs [Mon, 16 Jul 2012 23:38:11 +0000 (16:38 -0700)]
domain: Fix stack leak on error

12 years agotest-eio-limit: Remove confusing broken incorrect test
isaacs [Sat, 14 Jul 2012 00:28:49 +0000 (17:28 -0700)]
test-eio-limit: Remove confusing broken incorrect test

12 years agodoc: fix bug in child_process.spawn() sample code
Mike Morearty [Fri, 13 Jul 2012 21:18:52 +0000 (14:18 -0700)]
doc: fix bug in child_process.spawn() sample code

12 years agobenchmark: add single process tls connection benchmark
Bert Belder [Fri, 13 Jul 2012 23:43:34 +0000 (01:43 +0200)]
benchmark: add single process tls connection benchmark

12 years agodoc: update 'Fork me at Github' ribbon
George Shank [Sun, 24 Jun 2012 02:03:00 +0000 (20:03 -0600)]
doc: update 'Fork me at Github' ribbon

Replace 'Fork me at Github' ribbon with a new one fitting the website's color
scheme.

12 years agoMerge remote-tracking branch 'ry/v0.8'
isaacs [Fri, 13 Jul 2012 19:18:39 +0000 (12:18 -0700)]
Merge remote-tracking branch 'ry/v0.8'

Conflicts:
deps/npm

12 years agobuild: Move npm shebang logic into an npm script
isaacs [Fri, 13 Jul 2012 19:08:10 +0000 (12:08 -0700)]
build: Move npm shebang logic into an npm script

This allows us to run npm's scripts/relocate.sh script whenever
necessary, if for example node has been 'make install'ed into one
folder, and then you wish to move it into another one.

12 years agonpm: upgrade to 1.1.41
isaacs [Fri, 13 Jul 2012 18:40:38 +0000 (11:40 -0700)]
npm: upgrade to 1.1.41

12 years agobuild: fix add-on loading on freebsd
Ben Noordhuis [Thu, 12 Jul 2012 23:43:14 +0000 (01:43 +0200)]
build: fix add-on loading on freebsd

Link with -Wl,--export-dynamic, makes symbols from the node binary visible to
binary add-ons.

Fixes "undefined symbol: _ZN2v811HandleScopeC1Ev" errors when loading add-ons
on FreeBSD and likely other BSDs.

Fixes #3623.

12 years agoRevert "events: don't delete the listeners array in removeListener()"
Nathan Rajlich [Thu, 12 Jul 2012 22:40:45 +0000 (15:40 -0700)]
Revert "events: don't delete the listeners array in removeListener()"

This reverts commit 928ea564d16da47e615ddac627e0b4d4a40d8196.

Keeping the original Array instance in-place essentially causes a memory leak
on EventEmitters that use an infinite number of event names (an incrementing
counter, for example), which isn't an unreasonable thing to want to do.

Fixes #3702.

12 years agonet: fix net.Server.listen({fd:x}) error reporting
Ben Noordhuis [Thu, 12 Jul 2012 16:16:57 +0000 (18:16 +0200)]
net: fix net.Server.listen({fd:x}) error reporting

* don't assert when fd isn't an open file descriptor

* don't die with a ReferenceError when fd isn't a file descriptor
  you can listen() on

Fixes #3699.

12 years agonet: fix bogus errno reporting
Ben Noordhuis [Thu, 12 Jul 2012 14:56:42 +0000 (16:56 +0200)]
net: fix bogus errno reporting

_listen2() emits the error on the next tick. The errno value may have changed
by then.

12 years agobuild: partially fix configure on ARM
Ben Noordhuis [Thu, 12 Jul 2012 14:29:43 +0000 (16:29 +0200)]
build: partially fix configure on ARM

V8 on ARM requires that armv7 is set. We don't have a good way to detect the
CPU model right now so we pick a default and hope that it works okay for the
majority of people.

Non-scientific sampling - the ARM hardware I have lying around the house -
suggests that ARMv5 and ARMv6 are still most common so armv7=0 it is.

This obviously needs to be revisited sometime in the future.

12 years agobuild: disable unsafe optimizations
Ben Noordhuis [Thu, 12 Jul 2012 13:42:44 +0000 (15:42 +0200)]
build: disable unsafe optimizations

Compile at -O2 and disable optimizations that trigger gcc bugs.

Some people still reported mksnapshot crashes after commit b40f813 ("build: fix
spurious mksnapshot crashes for good" - so much for that).

Average performance of the -O2 binary is on par with the -O3 binary. Variance
on the http_simple bytes/8 benchmark appears to be slightly greater but small
enough that the possibly of it being noise cannot be excluded.

The new binary very slightly but consistently outperforms the -O3 binary (by
about 0.5%) on the mostly CPU-bound bytes/102400 benchmark. That could be an
artifact of the system I benchmarked it on, a Core 2 Duo with a puny 32 kB of
L1 instruction cache. The smaller binary seems to play nicer with the cache.

12 years agoMerge branch 'v0.6' into v0.8
Bert Belder [Thu, 12 Jul 2012 01:30:04 +0000 (03:30 +0200)]
Merge branch 'v0.6' into v0.8

12 years agonpm: upgrade to 1.1.39
isaacs [Thu, 12 Jul 2012 00:54:44 +0000 (17:54 -0700)]
npm: upgrade to 1.1.39

Fix #3616

12 years agolint
isaacs [Thu, 12 Jul 2012 00:46:28 +0000 (17:46 -0700)]
lint

12 years agoMerge remote-tracking branch 'ry/v0.8' into v0.8-merge
isaacs [Thu, 12 Jul 2012 00:38:11 +0000 (17:38 -0700)]
Merge remote-tracking branch 'ry/v0.8' into v0.8-merge

Conflicts:
src/node_version.h

12 years agoNow working on 0.6.21
isaacs [Wed, 11 Jul 2012 17:15:03 +0000 (10:15 -0700)]
Now working on 0.6.21

12 years agotools: fix shebang in tools/doc/generate.js
Philipp Hagemeister [Tue, 10 Jul 2012 14:50:49 +0000 (16:50 +0200)]
tools: fix shebang in tools/doc/generate.js

12 years agobuild: fix spurious mksnapshot crashes for good
Ben Noordhuis [Wed, 11 Jul 2012 01:19:12 +0000 (03:19 +0200)]
build: fix spurious mksnapshot crashes for good

A variety of gcc bugs made mksnapshot crash with either a segmentation fault
or a 'pure virtual method callled' run-time error.

After much wailing and gnashing of teeth I managed to deduce that the bugs
show up when:

  1. gcc 4.5.2 for i386-pc-solaris2.11 is used and -fstrict-aliasing is
     enabled, or

  2. gcc version 4.4.6 for x86_64-redhat-linux is used and
     -ffunction-sections -finline-functions at -O2 or higher is enabled

Therefore, disable -ffunction-sections and -fdata-sections unconditionally
and disable -fstrict-aliasing only on Solaris.

The -ffunction-sections and -fdata-sections switches were nonsense anyway
because we don't link with -Wl,--gc-sections.

12 years agoBlog post for v0.6.20
isaacs [Wed, 11 Jul 2012 00:01:30 +0000 (17:01 -0700)]
Blog post for v0.6.20

12 years ago2012.07.10 Version 0.6.20 (maintenance) v0.6.20
isaacs [Tue, 10 Jul 2012 23:25:12 +0000 (16:25 -0700)]
2012.07.10 Version 0.6.20 (maintenance)

* npm: Upgrade to 1.1.37 (isaacs)

* benchmark: Backport improvements made in master (isaacs)

* build: always link with -lz (Trent Mick)

* core: use proper #include directives (Ben Noordhuis)

* cluster: don't silently drop messages when the write queue gets big (Bert Belder)

* windows: don't print error when GetConsoleTitleW returns an empty string (Bert Belder)

12 years ago.gitignore: Don't ignore node_modules (breaks npm)
isaacs [Tue, 10 Jul 2012 23:16:43 +0000 (16:16 -0700)]
.gitignore: Don't ignore node_modules (breaks npm)

12 years agonpm: Upgrade to 1.1.37
isaacs [Tue, 10 Jul 2012 23:16:25 +0000 (16:16 -0700)]
npm: Upgrade to 1.1.37

12 years agotimer: change new Date to Date.now for performance
Shigeki Ohtsu [Tue, 10 Jul 2012 17:39:41 +0000 (02:39 +0900)]
timer: change new Date to Date.now for performance

Speeds up benchmark/settimeout.js by about 30%.

12 years agobuild: Regenerate docs for tarball and releases
isaacs [Tue, 10 Jul 2012 00:43:02 +0000 (17:43 -0700)]
build: Regenerate docs for tarball and releases

Related: https://twitter.com/kapeli/status/222477400880070658

12 years agodoc: clarify fs.symlink and fs.symlinkSync parameters
Ivan Torres [Sat, 7 Jul 2012 04:36:53 +0000 (21:36 -0700)]
doc: clarify fs.symlink and fs.symlinkSync parameters

12 years agoNow working on 0.8.3
isaacs [Mon, 9 Jul 2012 17:25:17 +0000 (10:25 -0700)]
Now working on 0.8.3

12 years agov0.8.2 blog post
isaacs [Mon, 9 Jul 2012 17:24:34 +0000 (10:24 -0700)]
v0.8.2 blog post

12 years agoMerge branch 'v0.8.2-release' into v0.8
isaacs [Mon, 9 Jul 2012 17:23:49 +0000 (10:23 -0700)]
Merge branch 'v0.8.2-release' into v0.8

Conflicts:
AUTHORS

12 years agodomain: Remove first arg from intercepted fn
Toshihiro Nakamura [Sun, 8 Jul 2012 00:30:07 +0000 (09:30 +0900)]
domain: Remove first arg from intercepted fn

Fix to remove the first-arg, in case arguments length is more than 2
Add domain.intercept() test about first-arg removal

12 years agoUpdate AUTHORS
Bert Belder [Mon, 9 Jul 2012 15:28:30 +0000 (17:28 +0200)]
Update AUTHORS

12 years agoAdd a .mailmap file, and clean up AUTHORS somewhat
Bert Belder [Mon, 9 Jul 2012 14:55:09 +0000 (16:55 +0200)]
Add a .mailmap file, and clean up AUTHORS somewhat

* A mailmap makes it easier to keep track of contributors.
* Changes to the AUTHORS file:
  - fix misspellings
  - add missing/incomplete names
  - remove duplicate mentions
* No names were added to or removed from the AUTHORS list.

12 years agodoc: cluster: worker.pid is now worker.process.pid
Justin Plock [Sun, 1 Jul 2012 15:35:51 +0000 (12:35 -0300)]
doc: cluster: worker.pid is now worker.process.pid

12 years agotest: make test-fs-watch-file write to tmp dir
Ben Noordhuis [Sun, 8 Jul 2012 14:37:45 +0000 (16:37 +0200)]
test: make test-fs-watch-file write to tmp dir

Write temp files to test/tmp, not test/fixtures.

12 years agofs: make unwatchFile() remove a specific listener
Ben Noordhuis [Sun, 8 Jul 2012 14:31:07 +0000 (16:31 +0200)]
fs: make unwatchFile() remove a specific listener

Before this commit, `fs.unwatchFile(path)` removed *all* listeners for `path`.

The function is overloaded now: `fs.unwatchFile(path)` still removes all
listeners, but `fs.unwatchFile(path, cb)` lets you remove a specific listener.

Fixes #3660.

12 years agozlib: Call inflateEnd for UNZIP. Fixes memory leak.
isaacs [Mon, 9 Jul 2012 05:03:37 +0000 (22:03 -0700)]
zlib: Call inflateEnd for UNZIP. Fixes memory leak.

Fix #2595

12 years agoprocess: throw a TypeError when anything but an Array is passed to hrtime()
Nathan Rajlich [Sun, 8 Jul 2012 02:57:02 +0000 (19:57 -0700)]
process: throw a TypeError when anything but an Array is passed to hrtime()

Fixes #3664.

12 years agocrypto: fix DecipherUpdate() memory leak
Ben Noordhuis [Fri, 6 Jul 2012 14:37:03 +0000 (16:37 +0200)]
crypto: fix DecipherUpdate() memory leak

Fix a memory leak in the the code path that deals with partial hex strings.

12 years ago2012.07.09, Version 0.8.2 (Stable) v0.8.2
isaacs [Sat, 7 Jul 2012 20:56:39 +0000 (13:56 -0700)]
2012.07.09, Version 0.8.2 (Stable)

* npm: Upgrade to 1.1.36

* readline: don't use Function#call() (Nathan Rajlich)

* Code cleanup to pass 'use strict' (Jonas Westerlund)

* module: add filename to require() json errors (TJ Holowaychuk)

* readline: fix for unicode prompts (Tim Macfarlane)

* timers: fix handling of large timeouts (Ben Noordhuis)

* repl: fix passing an empty line inserting "undefined" into the buffer (Nathan Rajlich)

* repl: fix crashes when buffering command (Maciej Małecki)

* build: rename strict_aliasing to node_no_strict_aliasing (Ben Noordhuis)

* build: disable -fstrict-aliasing for any gcc < 4.6.0 (Ben Noordhuis)

* build: detect cc version with -dumpversion (Ben Noordhuis)

* build: handle output of localized gcc or clang (Ben Noordhuis)

* unix: fix memory corruption in freebsd.c (Ben Noordhuis)

* unix: fix 'zero handles, one request' busy loop (Ben Noordhuis)

* unix: fix busy loop on unexpected tcp message (Ben Noordhuis)

* unix: fix EINPROGRESS busy loop (Ben Noordhuis)

12 years agoFix test-require-json on Windows
isaacs [Sat, 7 Jul 2012 22:01:51 +0000 (15:01 -0700)]
Fix test-require-json on Windows

12 years agov8: reapply floating patches
Bert Belder [Wed, 13 Jun 2012 13:37:15 +0000 (15:37 +0200)]
v8: reapply floating patches

12 years agov8: Upgrade to 3.11.10.14
isaacs [Sat, 7 Jul 2012 21:07:19 +0000 (14:07 -0700)]
v8: Upgrade to 3.11.10.14

12 years agoFix the Windows build
Bert Belder [Sat, 7 Jul 2012 21:33:54 +0000 (23:33 +0200)]
Fix the Windows build

12 years agogitignore: ignore .svn directories
Bert Belder [Sat, 7 Jul 2012 21:19:12 +0000 (23:19 +0200)]
gitignore: ignore .svn directories

12 years agoNow working on 0.8.2
isaacs [Sat, 7 Jul 2012 20:42:25 +0000 (13:42 -0700)]
Now working on 0.8.2

12 years agonpm: Upgrade to 1.1.36
isaacs [Sat, 7 Jul 2012 19:40:06 +0000 (12:40 -0700)]
npm: Upgrade to 1.1.36

12 years agodoc: Formatting and grammar on stream api doc
isaacs [Sat, 7 Jul 2012 16:53:33 +0000 (09:53 -0700)]
doc: Formatting and grammar on stream api doc

12 years agocorrect documentation of Stream#destroy
Dominic Tarr [Sat, 7 Jul 2012 00:25:13 +0000 (12:25 +1200)]
correct documentation of Stream#destroy

12 years agoreadline: don't use Function#call()
Nathan Rajlich [Sat, 7 Jul 2012 02:41:01 +0000 (19:41 -0700)]
readline: don't use Function#call()

It wasn't necessary.

12 years agoForgotten commit: add arguments to handleGroup
Jonas Westerlund [Thu, 5 Jul 2012 16:46:09 +0000 (18:46 +0200)]
Forgotten commit: add arguments to handleGroup

12 years agoAssign to property of global, instead of implicit global variable
Jonas Westerlund [Wed, 4 Jul 2012 21:19:09 +0000 (23:19 +0200)]
Assign to property of global, instead of implicit global variable

Fixes crash in strict mode.

12 years agoUse unicode escape sequences instead of octal
Jonas Westerlund [Wed, 4 Jul 2012 21:18:33 +0000 (23:18 +0200)]
Use unicode escape sequences instead of octal

The latter is illegal in strict mode.

12 years agoInline timeout function, avoiding declaration in conditional
Jonas Westerlund [Wed, 4 Jul 2012 21:17:14 +0000 (23:17 +0200)]
Inline timeout function, avoiding declaration in conditional

Moving it out would require an anonymous function, or bind(), anyway.
Luckily It's a tiny function. Fixes crash in strict mode.

12 years agoMove function declaration out of conditional
Jonas Westerlund [Wed, 4 Jul 2012 21:14:27 +0000 (23:14 +0200)]
Move function declaration out of conditional

Also avoid using eval as identifier.
Fixes crashes in strict mode.

12 years agoMove function declaration to top-level
Jonas Westerlund [Wed, 4 Jul 2012 21:01:03 +0000 (23:01 +0200)]
Move function declaration to top-level

Gets rid of a strict mode error and a few levels of indentation.

12 years agoDo not assign to properties that only have getters
Jonas Westerlund [Wed, 4 Jul 2012 20:59:23 +0000 (22:59 +0200)]
Do not assign to properties that only have getters

It is an error in strict mode, and silent failure otherwise.

12 years agoAvoid redeclaring variable
Jonas Westerlund [Wed, 4 Jul 2012 20:57:48 +0000 (22:57 +0200)]
Avoid redeclaring variable

Capitalize the constructor to avoid redeclaration.
Fixes strict mode error.

12 years agoRemove octal escape sequences and avoid reserved keyword
Jonas Westerlund [Wed, 4 Jul 2012 20:55:54 +0000 (22:55 +0200)]
Remove octal escape sequences and avoid reserved keyword

Both are errors in strict mode.

12 years agomodule: add filename to require() json errors
TJ Holowaychuk [Fri, 6 Jul 2012 22:26:41 +0000 (15:26 -0700)]
module: add filename to require() json errors

Otherwise it can be quite difficult to figure out which file is busted.

Closes #3580.

12 years agoreadline: fix for unicode prompts
Tim Macfarlane [Fri, 29 Jun 2012 09:33:58 +0000 (10:33 +0100)]
readline: fix for unicode prompts

prompt length is char length, not byte length

12 years agotimers: fix handling of large timeouts
Ben Noordhuis [Sun, 1 Jul 2012 20:58:22 +0000 (22:58 +0200)]
timers: fix handling of large timeouts

Don't use the double-negate trick to coalesce the timeout argument into a
number, it produces the wrong result for very large timeouts.

Example:

    setTimeout(cb, 1e10); // doesn't work, ~~1e10 == 1410065408

12 years agotls: use slab allocator
Fedor Indutny [Thu, 5 Jul 2012 19:50:21 +0000 (15:50 -0400)]
tls: use slab allocator

12 years agotls: make tls a little bit faster
Fedor Indutny [Tue, 3 Jul 2012 22:30:53 +0000 (15:30 -0700)]
tls: make tls a little bit faster

Compile OpenSSL with inline assembly for big numbers

12 years agoreadline: Use one history item for reentered line
Vladimir Beloborodov [Wed, 13 Jun 2012 17:37:31 +0000 (21:37 +0400)]
readline: Use one history item for reentered line

If the command entered is exactly the same as the last history item,
don't dupe it in the history

12 years agorepl: fix passing an empty line inserting "undefined" into the buffer
Nathan Rajlich [Wed, 4 Jul 2012 18:51:24 +0000 (11:51 -0700)]
repl: fix passing an empty line inserting "undefined" into the buffer

There was a possiblity of insering the string "undefined" into the repl's
command buffer, which would cause interesting results while evaluating.

12 years agorepl: fix crashes when buffering command
Maciej Małecki [Tue, 3 Jul 2012 02:13:24 +0000 (04:13 +0200)]
repl: fix crashes when buffering command

Wrong order of operands was causing problems while trying to use command
buffering:

    > {
    ...   a: 3,
    ...

    repl.js:284
            if (cmd.trim().match(/^npm /) && !self.bufferedCommand) {
                    ^
    TypeError: Cannot call method 'trim' of undefined
        at finish (repl.js:284:17)
        at REPLServer.self.eval (repl.js:118:5)
        at rli.on.e (repl.js:260:20)
        at REPLServer.self.eval (repl.js:118:5)
        at Interface.<anonymous> (repl.js:250:12)
        at Interface.EventEmitter.emit (events.js:88:17)
        at Interface._onLine (readline.js:183:10)
        at Interface._line (readline.js:502:8)
        at Interface._ttyWrite (readline.js:720:14)
        at ReadStream.<anonymous> (readline.js:105:12)

Test included.

Closes #3515.
Closes #3517.
Closes #3621.

12 years agodeps: upgrade libuv to be09be7
Ben Noordhuis [Wed, 4 Jul 2012 12:08:07 +0000 (14:08 +0200)]
deps: upgrade libuv to be09be7

12 years agopunycode: update to v1.1.1
Mathias Bynens [Wed, 27 Jun 2012 15:47:07 +0000 (17:47 +0200)]
punycode: update to v1.1.1

12 years agoMerge remote-tracking branch 'origin/v0.8'
Ben Noordhuis [Wed, 4 Jul 2012 11:41:56 +0000 (13:41 +0200)]
Merge remote-tracking branch 'origin/v0.8'

Conflicts:
configure
src/node_version.h

12 years agotools: update gyp to r1426
Ben Noordhuis [Tue, 3 Jul 2012 18:56:06 +0000 (20:56 +0200)]
tools: update gyp to r1426

12 years agodeps: upgrade libuv to 5031a5b
Ben Noordhuis [Tue, 3 Jul 2012 18:54:19 +0000 (20:54 +0200)]
deps: upgrade libuv to 5031a5b