Commit Graph

9001 Commits (a5be84fe9b6862b9d132f87bcc915285e40432e2)

Author SHA1 Message Date
Julien Gilli a5be84fe9b url: revert reslove urls with . and ..
This reverts commit ad0684807c.

Initially, this bug fix targeted master, and I pushed to have it
included in v0.10. In retrospect, I'm not sure it should have made into
v0.10 as it seems it could break a lot of existing working code.

In my opinion, this change is still a bug fix, and it is not backward
incompatible per se. However, I'm not sure that taking the risk to break
a lot of users with a new 0.10.x release that would include this fix is
reasonable, especially now that 0.10.x releases are entering
maintenance mode.

PR-URL: https://github.com/joyent/node/pull/9257
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-03-06 12:44:06 -08:00
Saúl Ibarra Corretgé dcff5d565c deps: update libuv to 0.10.36
PR: #9274
PR-URL: https://github.com/joyent/node/pull/9274
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-06 11:37:40 -08:00
Florin-Cristian Gavrila 8bcd0a4c4a http: fix performance regression for GET requests
A significant performance regressions has been introduced in 1fddc1f for
GET requests which send data through response.end(). The number of
requests per second dropped to somewhere around 6% of their previous
level.

The fix consists of removing a part of the lines added by 1fddc1f,
lines which were supposed to affect only HEAD requests, but interfered
with GET requests instead.

The lines removed would not have affected the behaviour in the case of
a HEAD request as this._hasBody would always be false. Therefore, they
were not required to fix the issue reported in #8361.

Fixes #8940.

PR: #9026
PR-URL: https://github.com/joyent/node/pull/9026
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-05 11:16:52 -08:00
Chris Dickinson d01a900078 buffer: reword Buffer.concat error message
this brings the error messaging in line with
other node TypeError messages.

fixes joyent/node#7766.

PR: #8723
PR-URL: https://github.com/joyent/node/pull/8723
Reviewed-By: James M Snell <jasnell@users.noreply.github.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-03-04 17:44:53 -08:00
Julien Gilli c8239c08d7 console: allow Object.prototype fields as labels
This is a backport of 6c3647c38d from
v0.12 to v0.10.

Console.prototype.timeEnd() returns NaN if the timer label
corresponds to a property on Object.prototype. In v0.12, this was fixed
by using Object.create(null) to construct the _times object

However, the version of V8 in the v0.10 branch makes this fix not work
as expected. In v0.10, this commit changes the _times object into a
array of objects of the form:

{ label: someLabel, time: staringWallClockTime }

someLabel can thus be any string, including any string that represents
any Object.prototype field.

Fixes #9116.

PR: #9215
PR-URL: https://github.com/joyent/node/pull/9215
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-17 18:08:11 -08:00
Amir Saboury ad0684807c url: reslove urls with . and ..
'.' and '..' are directory specs and resolving urls with or without the
hostname with '.' and '..' should add a trailing slash to the end of the
url.

Fixes: https://github.com/joyent/node/issues/8992
PR-URL: https://github.com/joyent/node/pull/9010
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-02-09 14:49:10 -07:00
Ben Noordhuis 431eb172f9 deps: log V8 version in profiler log file
Patch from issue 800293002 authored by ben@strongloop.com

Review URL: https://codereview.chromium.org/806143002

PR-URL: https://github.com/joyent/node/pull/9043
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-02-04 12:46:17 -07:00
Timothy J Fontaine ff32b81516 Now working on 0.10.37 2015-01-26 12:28:48 -08:00
Timothy J Fontaine 6b264dd1f9 Merge branch 'v0.10.36-release' into v0.10 2015-01-26 12:28:08 -08:00
Timothy J Fontaine 09b482886b 2015.01.26, Version 0.10.36 (Stable)
* openssl: update to 1.0.1l

* v8: Fix debugger and strict mode regression (Julien Gilli)

* v8: don't busy loop in cpu profiler thread (Ben Noordhuis)
2015-01-26 10:28:23 -08:00
Timothy J Fontaine 6168fe6720 build: add win32 convenience build rule
PR-URL: https://github.com/joyent/node/pull/9085
PR: #9085

Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-23 15:17:05 -08:00
Fedor Indutny 9e387fb611 test: fix crypto-stream after openssl update
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-21 11:39:55 -08:00
Fedor Indutny f5e9b6e84a build: remove vanished masm file from openssl build
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-21 11:39:54 -08:00
James M Snell deef605085 deps: update openssl to 1.0.1l
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-21 11:39:54 -08:00
Fedor Indutny b28c76e9d2 deps: update openssl to 1.0.1k
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-21 11:39:54 -08:00
Andrei Sedoi e45c52c573 doc: use correct signature for assert()
The message argument is optional for both assert() and
assert.ok(). This commit makes message optional for assert().

PR-URL: https://github.com/joyent/node/pull/9003
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-20 10:39:10 -05:00
Robert Kowalski 0c50195071 docs: delete unused/duplicate css files
- `sh.css` already exists in `api_assets`
 - `sh_vim-dark.css` is unused, but used in the repo `node-website`
        now

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-14 15:26:48 -08:00
cjihrig 0a430b9aec test: backport use executable in spawn() test
Backport 10703774f0 from the v0.12 branch.

Currently, the test-child-process-spawn-typeerror.js is
calling execFile() on a JavaScript source file, which is
causing failures on Windows. This commit switches to calling
spawn() on an actual executable.

Fixes #8930.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-13 14:54:44 -08:00
Julien Gilli 31051e5c7b deps: revert backport b593aa8 from v8 upstream
This reverts commit 45f1330425.

45f1330425 was basically breaking
node-inspector. V8 landed a patch upstream that would probably fix these
issues (see https://codereview.chromium.org/813873007), but without the
ability to properly test it in the wild, it's safer to just revert the
breaking change.

Fixes #8948.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-01-13 11:25:09 -08:00
Ben Noordhuis 6ebd85e105 v8: don't busy loop in cpu profiler thread
Reduce the overhead of the CPU profiler by replacing sched_yield() with
nanosleep() in V8's tick event processor thread.  The former only yields
the CPU when there is another process scheduled on the same CPU.

Before this commit, the thread would effectively busy loop and consume
100% CPU time.  By forcing a one nanosecond sleep period rounded up to
the task scheduler's granularity (about 50 us on Linux), CPU usage for
the processor thread now hovers around 10-20% for a busy application.

PR-URL: https://github.com/joyent/node/pull/8789
Ref: https://github.com/strongloop/strong-agent/issues/3
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-01-12 16:49:07 -08:00
Timothy J Fontaine fe2019699a Now working on 0.10.36 2014-12-23 17:31:00 -08:00
Timothy J Fontaine cd6dff9728 Merge branch 'v0.10.35-release' into v0.10 2014-12-23 17:30:32 -08:00
Timothy J Fontaine a363f61ca8 2014.12.22, Version 0.10.35 (Stable)
* tls: re-add 1024-bit SSL certs removed by f9456a2 (Chris Dickinson)

* timers: don't close interval timers when unrefd (Julien Gilli)

* timers: don't mutate unref list while iterating it (Julien Gilli)
2014-12-22 13:22:32 -08:00
James M Snell 102a861ec2 doc: clarify buffer api documentation
Better wording for start and end parameters, also document .length
should be considered readonly.

RE: #8857, #8859, #8913
PR: #8910
PR-URL: https://github.com/joyent/node/pull/8910

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-22 12:24:28 -08:00
James M Snell 48536394c9 doc: clarify add/removeListener semantics
Clarify that adding or removing a listener is not idempotent.

RE: #8853
PR: #8911
PR-URL: https://github.com/joyent/node/pull/8911
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-22 12:12:48 -08:00
Julien Gilli fd2cb7c611 timers: don't mutate unref list while iterating it
Commit 934bfe23a1 had introduced a
regression where node would crash trying to access a null unref timer if
a given unref timer's callback would remove other unref timers set to
fire in the future.

More generally, it makes the unrefTimeout function more solid by not
mutating the unrefList while traversing it.

Fixes #8897.

Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-12-22 11:45:31 -08:00
Chris Dickinson 1425ccd1b2 src: re-add 1024-bit SSL certs removed by f9456a2
this fixes a problem where connecting to AWS services
would report an untrusted cert error.

Fixes: https://github.com/joyent/node/issues/8894
PR-URL: https://github.com/joyent/node/pull/8904
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2014-12-19 17:11:40 -08:00
Julien Gilli 78db74dd88 timers: don't close interval timers when unrefd
This change fixes a regression introduced by commit
0d051238be, which contained a typo that
would cause every unrefd interval to fire only once.

Fixes #8900.

Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-19 15:41:55 -08:00
Timothy J Fontaine 1b81ea8276 Now working on 0.10.35 2014-12-17 14:39:51 -08:00
Timothy J Fontaine a6757fb9d0 Merge branch 'v0.10.34-release' into v0.10 2014-12-17 14:39:24 -08:00
Timothy J Fontaine 52795f8fcc 2014.12.17, Version 0.10.34 (Stable)
* uv: update to v0.10.30

* zlib: upgrade to v1.2.8

* child_process: check execFile args is an array (Sam Roberts)

* child_process: check fork args is an array (Sam Roberts)

* crypto: update root certificates (Ben Noordhuis)

* domains: fix issues with abort on uncaught (Julien Gilli)

* timers: Avoid linear scan in _unrefActive. (Julien Gilli)

* timers: fix unref() memory leak (Trevor Norris)

* v8: add api for aborting on uncaught exception (Julien Gilli)

* debugger: fix when using "use strict" (Julien Gilli)
2014-12-17 13:21:23 -08:00
Trevor Norris afb488db86 Revert "src: reduce cpu profiler overhead"
This reverts commit 1eb1e0a9af.
2014-12-17 12:45:23 -08:00
Ben Noordhuis 1eb1e0a9af src: reduce cpu profiler overhead
Reduce the overhead of the CPU profiler by suppressing SIGPROF signals
when sleeping / polling for events. Avoids unnecessary wakeups when the
CPU profiler is active. Depends on https://github.com/libuv/libuv#15.

Ref: https://github.com/strongloop/strong-agent/issues/3
PR-URL: https://github.com/joyent/node/pull/8791
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-17 12:37:30 -08:00
cjihrig f75a8ad723 test: remove redundant code in test
A block of asserts were duplicated in
test/simple/test-child-process-spawn-typeerror.js. This commit
removes the duplicated asserts.

Fixes: https://github.com/joyent/node/pull/8454
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-12-17 15:08:22 -05:00
Julien Gilli 542234ad98 doc: improve dns module's documentation
Make the difference between dns.lookup and other functions even clearer.

PR: #8747
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-17 11:54:31 -08:00
Julien Gilli 45f1330425 deps: backport b593aa8 from v8 upstream
Original commit message:

Enable "strict mode"; for debugger scripts

BUG=v8:3708

Review URL: https://codereview.chromium.org/736583007

Cr-Commit-Position: refs/heads/master@{#25420}
2014-12-17 11:47:26 -08:00
Julien Gilli 0ff51c6e06 deps: backport 2ad2237 from v8 upstream
Original commit message:

Fix Unhandled ReferenceError in debug-debugger.js

This fixes following exception in Sky on attempt to set a breakpoint
"Unhandled: Uncaught ReferenceError: break_point is not defined"
I think this happens in Sky but not in Chrome because Sky scripts are executed in strict mode.

BUG=None
LOG=N
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/741683002

Cr-Commit-Position: refs/heads/master@{#25415}
2014-12-17 11:47:26 -08:00
Shigeki Ohtsu bddea12026 doc: Update LICENSE for zlib 1.2.8 2014-12-16 15:35:09 -08:00
Shigeki Ohtsu 710845cfd3 deps: fix zlib.gyp for zlib upgrade to 1.2.8
This adds new sources for gzip files and defines a new flag for mac and freebsd.
They are taken from third_party/zlib/zlib.gyp in Chromium repository.
2014-12-16 15:35:09 -08:00
Shigeki Ohtsu 33f74bbd90 deps: upgrade zlib to 1.2.8 2014-12-16 15:35:09 -08:00
Julien Gilli 934bfe23a1 timers: Avoid linear scan in _unrefActive.
Before this change, _unrefActive would keep the unrefList sorted when
adding a new timer.

Because _unrefActive is called extremely frequently, this linear scan
(O(n) at worse) would make _unrefActive show high in the list of
contributors when profiling CPU usage.

This commit changes _unrefActive so that it doesn't try to keep the
unrefList sorted. The insertion thus happens in constant time.

However, when a timer expires, unrefTimeout has to go through the whole
unrefList because it's not ordered anymore.

It is usually not large enough to have a significant impact on
performance because:
- Most of the time, the timers will be removed before unrefTimeout is
  called because their users (sockets mainly) cancel them when an I/O
  operation takes place.
- If they're not, it means that some I/O took a long time to happen, and
  the initiator of subsequents I/O operations that would add more timers
  has to wait for them to complete.

With this change, _unrefActive does not show as a significant
contributor in CPU profiling reports anymore.

Fixes #8160.
PR-URL: #8751

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-16 11:44:23 -08:00
Trevor Norris 813114dab0 src: remove icu_config
ICU support in v0.12 generates a new icu_config.gypi. This was
accidentally committed after switching branches. The file has been removed
and added to .gitignore.

Fixes: 0d051238 "timers: fix unref() memory leak"
2014-12-15 15:36:00 -08:00
Steven R. Loomis 69b122a642 build: configure return exit status from gyp
Previously, 'configure' would not return an exit status
if gyp blows up. This can be tested via:

    date >> node.gyp ; ./configure && echo A-OK

You will get "A-OK" even though gyp had failed.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-15 13:55:11 -08:00
Julien Gilli 0603c8345b docs: clarify url.format documentation
The original documentation was slightly confusing. It seemed that the
list of items described the properties of the urlObj object, while it
was actually describing the formatting process. This change makes this
clearer.

Fixes #8796.

Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-15 12:29:36 -08:00
silverwind d230fa9eb7 doc: fix typo secureOptions in tls
Documentation mentioned 'securityOptions', where it should have read
'secureOptions'.

Fixes #8608.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-11 23:27:49 -08:00
Saúl Ibarra Corretgé 1c031c84d2 deps: update libuv to 0.10.30
PR-URL: https://github.com/joyent/node/pull/8849
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-09 12:41:46 -08:00
pkcs 8120015f40 doc: clearer log messages in net code samples
Code examples in documentation for net.createServer and
net.createConnection contained confusing log messages. This change makes
them clearer.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-08 15:23:22 -08:00
Alejandro Oviedo f5cb330ab1 docs: fix streams example for write() after end()
Currently there's an example using http.ServerResponse stream, which
has a known bug and will not throw an error while writing after end().
Changed to a writable stream from fs which behaves as expected.

fix #8814

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-06 19:27:05 -08:00
Brendan Ashworth 5e503f45d2 doc: fix grammar in tls and timers
Replace 'a' with 'an' where appropriate.
2014-12-05 14:12:48 -08:00
Fedor Indutny 8c868989be zlib: do not Unref() if wasn't Ref()ed
In very unlikely case, where `deflateInit2()` may return error (right
now happening only on exhausting all memory), the `ZCtx::Error()` will
be called and will try to `Unref()` the handle. But the problem is that
this handle was never `Ref()`ed, so it will trigger an assertion error
and crash the program.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/joyent/node/pull/8687
2014-12-04 18:10:13 +03:00