0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

11744 Commits

Author SHA1 Message Date
Nathan Woltman
0d15161c24 benchmark: Add some path benchmarks for #1778
Path functions being benchmarked are:
* format
* isAbsolute
* join
* normalize
* relative
* resolve

PR-URL: https://github.com/nodejs/io.js/pull/1778
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-07-04 13:30:20 +02:00
Nathan Woltman
bca53dce76 path: refactor for performance and consistency
Improve performance by:
+ Not leaking the `arguments` object!
+ Getting the last character of a string by index, instead of
  with `.substr()` or `.slice()`

Improve code consistency by:
+ Using `[]` instead of `.charAt()` where possible
+ Using a function declaration instead of a var declaration
+ Using `.slice()` with clearer arguments
+ Checking if `dir` is truthy in `win32.format`
  (added tests for this)

Improve both by:
+ Making the reusable `trimArray()` function
+ Standardizing getting certain path statistics with
  the new `win32StatPath()` function

PR-URL: https://github.com/nodejs/io.js/pull/1778
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-07-04 13:24:59 +02:00
Rod Vagg
46140334cd doc: update AUTHORS list
Update AUTHORS list using tools/update-authors.sh

PR-URL: https://github.com/nodejs/io.js/pull/2100
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James Hartig <fastest963@gmail.com>
2015-07-04 15:20:13 +10:00
Mark Plomer
9436a860cb test: add test for missing close/finish event
See next commit for the actual fix.

PR-URL: https://github.com/iojs/io.js/pull/1373
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-07-03 20:31:07 -07:00
Jeremiah Senkpiel
3754920ffd Working on v2.3.4 2015-07-03 17:10:40 -07:00
Jeremiah Senkpiel
2faae580ae 2015-07-04 io.js v2.3.3 Release
Notable changes

* deps: Fixed an out-of-band write in utf8 decoder.
This is an important security update as it can be used to cause a
denial of service attack.
2015-07-03 17:10:40 -07:00
Fedor Indutny
030f8045c7 deps: fix out-of-band write in utf8 decoder
Originally reported by: Kris Reeves <kris.re@bbhmedia.com>

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-07-03 16:15:29 -07:00
Benjamin Gruenbaum
0f09b8db28 doc: don't recommend domains for error handling
Remove the suggestion to use domains for exception handling. Add clarity
to "unhandledException".

Fixes: https://github.com/nodejs/io.js/issues/2055
PR-URL: https://github.com/nodejs/io.js/pull/2056
Reviewed-By: Trev Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
2015-07-03 15:22:27 -06:00
Sakthipriyan Vairamani
9cd44bb2b6 util: prepend '(node) ' to deprecation messages
Changes included in this commit are

   1. Making the deprecation messages consistent. The messages will be in
      the following format

           x is deprecated. Use y instead.

      If there is no alternative for `x`, then the ` Use y instead.` part
      will not be there in the message.

   2. All the internal deprecation messages are printed with the prefix
      `(node) `, except when the `--trace-deprecation` flag is set.

Fixes: https://github.com/nodejs/io.js/issues/1883
PR-URL: https://github.com/nodejs/io.js/pull/1892
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-07-03 16:32:29 +02:00
Rod Vagg
d55a778bae Working on v2.3.3 2015-07-02 19:43:29 +10:00
Rod Vagg
44c2465451 2015-07-02 io.js v2.3.2 Release
Notable changes

build:
  - Added support for compiling with Microsoft Visual C++ 2015
  - Started building and distributing headers-only tarballs along with binaries
2015-07-02 18:58:40 +10:00
Rich Trott
eabed2f518 repl: remove obsolete TODO
It's long past v0.3.0 and .break isn't going anywhere anytime soon.

PR-URL: https://github.com/nodejs/io.js/pull/2081
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
2015-07-01 22:45:06 -07:00
Evan Lucas
af249fa8a1 net: wrap connect in nextTick
Fixes an edge case regression introduced in
1bef717476.

With the lookup being skipped, an error could be emitted before an
error listener has been added.

An example of this was presented by changing the server’s IP address
and then immediately making a request to the old address.

Related: https://github.com/nodejs/io.js/pull/1823
PR-URL: https://github.com/nodejs/io.js/pull/2054
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-06-30 23:16:26 -05:00
Fedor Indutny
9180140231 _stream_wrap: prevent use after free in TLS
Queued write requests should be invoked on handle close, otherwise the
"consumer" might be already destroyed when the write callbacks of the
"consumed" handle will be invoked. Same applies to the shutdown
requests.

Make sure to "move" away socket from server to not break the
`connections` counter in `net.js`. Otherwise it might not call `close`
callback, or call it too early.

Fix: https://github.com/iojs/io.js/issues/1696
PR-URL: https://github.com/nodejs/io.js/pull/1910
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-30 20:09:22 -07:00
Rich Trott
6c61ca5325 url: fix typo in comment
PR-URL: https://github.com/nodejs/io.js/pull/2071
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-30 13:47:57 -07:00
Shigeki Ohtsu
58e914f9bc tools: fix gyp to work on MacOSX without XCode
This issue has already submitted to the upstream in
https://code.google.com/p/gyp/issues/detail?id=477
Use this commit until the upstream is to be fixed.

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-30 13:40:40 +02:00
Ben Noordhuis
99cbbc0a13 tools: update gyp to 25ed9ac
Includes improved support for VS 2015[0] and makes it possible to build
with ninja again[1].

[0] https://codereview.chromium.org/1112753003
[1] https://codereview.chromium.org/1209553002

Fixes: https://github.com/nodejs/io.js/pull/2065
PR-URL: https://github.com/nodejs/io.js/pull/2074
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-06-30 13:38:26 +02:00
Rich Trott
05a73c0f25 benchmark: make concurrent requests configurable
In http_bench.js, allow the concurrent requests per client
to be configurable.

This also changes the launch of clients to wait until all
forked servers are online. This eliminates spurious error
messages at the start of the run.

PR-URL: https://github.com/nodejs/io.js/pull/2068
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-29 23:01:53 -07:00
Rich Trott
f52d73352e benchmark: fix typo in README
PR-URL: https://github.com/nodejs/io.js/pull/2067
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-29 10:11:52 -07:00
Roman Reiss
e3f9335c40 tools: re-enable comma-spacing linter rule
The rule was disabled because of an eslint bug which is now resolved.
All code in lib was already conforming and only test code needed a few
changes to make the linter happy with this rule enabled.

Ref: https://github.com/eslint/eslint/issues/2408

PR-URL: https://github.com/nodejs/io.js/pull/2072
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alex Kocharin <alex@kocharin.ru>
2015-06-29 19:04:16 +02:00
Roman Reiss
d91e10b3bd tools: update eslint to 0.24.0
PR-URL: https://github.com/nodejs/io.js/pull/2072
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alex Kocharin <alex@kocharin.ru>
2015-06-29 19:02:17 +02:00
Ben Noordhuis
1a51f0058c v8: cherry-pick JitCodeEvent patch from upstream
Original commit log follows:

    Meaningful name for builtins in JitCodeEvent API.

    Report builtins by name (e.g. "Builtin:ArgumentsAdaptorTrampoline")
    instead of labeling everything "Builtin:A builtin from the snapshot"

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

PR-URL: https://github.com/nodejs/io.js/pull/2075
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-29 14:44:36 +02:00
Shigeki Ohtsu
9e890fe8b4 crypto: fix VerifyCallback in case of verify error
3beb880716 has a bug in VerifyCallback
when preverify is 1 and the cert chain has an verify error. If the
error is UNABLE_TO_GET_ISSUER_CERT_LOCALLY, it leads an assertion
error in finding rootCA.
The whitelist check should be made only when the cert chain has no
verify error with X509_V_OK.

Fixes: https://github.com/nodejs/io.js/issues/2061
PR-URL: https://github.com/nodejs/io.js/pull/2064
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-27 10:38:47 +09:00
Chris Dickinson
8cee8f54fc src: nix stdin _readableState.reading manipulation
this opts for stream.push('') which has the same effect
but uses a public API.

PR-URL: https://github.com/nodejs/io.js/pull/454
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2015-06-26 11:04:57 -07:00
Evan Lucas
7f63449fde net: fix debug for dnsopts
Prevent debug call from showing [object Object] for dnsopts in
lookupAndConnect

PR-URL: https://github.com/nodejs/io.js/pull/2059
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
2015-06-26 07:42:43 -05:00
Trevor Norris
1cd9eeb556 buffer: prevent abort on bad proto
If an object's prototype is munged it's possible to bypass the
instanceof check and cause the application to abort. Instead now use
HasInstance() to verify that the object is a Buffer, and throw if not.

This check will not work for JS only methods. So while the application
won't abort, it also won't throw.

In order to properly throw in all cases with toString() the JS
optimization of checking that length is zero has been removed. In its
place the native methods will now return early if a zero length string
is detected.

Ref: https://github.com/nodejs/io.js/pull/1486
Ref: https://github.com/nodejs/io.js/pull/1922
Fixes: https://github.com/nodejs/io.js/issues/1485
PR-URL: https://github.com/nodejs/io.js/pull/2012
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-25 13:07:01 -06:00
Rich Trott
856c11f8c8 test: purge stale disabled tests
Tests in the disabled directory are not used by Makefile nor by the CI.
Other than a single 2015 commit that puts 'use strict' in each test,
many of them haven't been touched in years.

This removes all the disabled tests that have been unmodified since
2011 (with the exception of the 'use strict' modification mentioned
above).

PR-URL: https://github.com/nodejs/io.js/pull/2045
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-06-25 11:21:41 -07:00
Rich Trott
4d5089e181 test: do not swallow OpenSSL support error
PR-URL: https://github.com/nodejs/io.js/pull/2042
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-06-25 11:13:35 -07:00
Ben Noordhuis
8350f3a3a2 buffer: optimize Buffer#toString()
Break up Buffer#toString() into a fast and slow path.  The fast path
optimizes for zero-length buffers and no-arg method invocation.

The speedup for zero-length buffers is a satisfying 700%.  The no-arg
toString() operation gets faster by about 13% for a one-byte buffer.

This change exploits the fact that most Buffer#toString() calls are
plain no-arg method calls.  Rewriting the method to take no arguments
means a call doesn't go through an ArgumentsAdaptorTrampoline stack
frame in the common case.

PR-URL: https://github.com/nodejs/io.js/pull/2027
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Daniel Cousens <email@dcousens.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-25 18:32:15 +02:00
cjihrig
06721fe005 test: fix test-repl-tab-complete.js
test-repl-tab-complete.js contains numerous assertions that are
never run. Anything that results in a ReferenceError bails out,
and never calls the functions containing the assertions. This
commit adds checking for successful tab completions, as well as
ReferenceErrors.

PR-URL: https://github.com/nodejs/io.js/pull/2052
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-25 12:18:56 -04:00
Julien Gilli
a198c68b56 repl: make 'Unexpected token' errors recoverable
Fix the regexp used to detect 'Unexpected token' errors so that they can
be considered as recoverable. This fixes the following use case:

> var foo = 'bar \
... baz';
undefined
> foo
'bar baz'
>

Fixes: https://github.com/joyent/node/issues/8874
PR-URL: https://github.com/joyent/node/pull/8875
PR-URL: https://github.com/nodejs/io.js/pull/2052
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-25 12:17:51 -04:00
Sangmin Yoon
d735b2c6ef repl: fix tab completion for a non-global context
Use vm.isContext() to properly identify contexts.

PR-URL: https://github.com/joyent/node/pull/25382
PR-URL: https://github.com/nodejs/io.js/pull/2052
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-25 12:16:41 -04:00
Ivan Yan
c370bd3aea doc: make the abbreviation 1MM clear
Refs: https://github.com/nodejs/io.js/pull/2050
PR-URL: https://github.com/nodejs/io.js/pull/2053
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-06-25 11:42:09 -04:00
Rod Vagg
628a3ab093 build: add tar-headers target for headers-only tar
to replace the full src download by node-gyp, using the proper format
instead of the full source format

PR-URL: https://github.com/nodejs/io.js/pull/1975
Reviewed-By: William Blankenship <william.jblankenship@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-06-25 19:17:58 +10:00
Shigeki Ohtsu
1f371e3988 deps: copy all openssl header files to include dir
On upgrading openssl, all symlinks in pulic header files are replaced
with nested include files. The issue was raised that installing them
leads to lost its references to real header files.
To avoid this, all public header files are copied into the
`deps/openssl/openssl/include/openssl/` directory.
As a result, we have duplicated header files under
`deps/openssl/openssl/` but copied files are refereed in build as
specified to include path in openssl.gyp.

Fixes: https://github.com/nodejs/io.js/pull/1975
PR-URL: https://github.com/nodejs/io.js/pull/2016
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-06-25 19:17:41 +10:00
Rod Vagg
dcbb9e1da6 build: update build targets for io.js
PR-URL: https://github.com/nodejs/io.js/pull/1938
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
2015-06-25 15:22:27 +10:00
Rich Trott
8e9089ac35 test: check for error on Windows
Instead of not running the dgram-bind-shared-ports
on Windows, check that it gets ENOTSUP.

PR-URL: https://github.com/nodejs/io.js/pull/2035
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-06-24 21:04:05 -07:00
Rod Vagg
c87c34c242 build: fix cherry-pick ooops, fix comment wording
PR-URL: https://github.com/nodejs/io.js/pull/2036
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
2015-06-25 13:01:07 +10:00
Rod Vagg
4208dc4fef build: add MSVS 2015 support
PR-URL: https://github.com/nodejs/io.js/pull/2036
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
2015-06-25 13:00:27 +10:00
Alexis Campailla
c0c0d73269 build,win: set env before generating projects
vcbuild.bat calls python configure before setting GYP_MSVS_VERSION,
so SelectVisualStudioVersion (tools\gyp\pylib\gyp\MSVSVersion.py)
defaults to 'auto' and selects VS 2005.

vcbuild sets the environment in the current shell, so this issue
would manifest itself only on the first invocation of the script
in any given shell windows.

Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
PR-URL: https://github.com/joyent/node/pull/20109
2015-06-25 13:00:00 +10:00
Jimmy Hsu
54d5437566 doc: Added sample command to test iojs build
PR-URL: https://github.com/nodejs/io.js/pull/850
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2015-06-24 17:26:09 -07:00
Rod Vagg
f1f1b7e597 doc: add TSC meeting minutes 2015-06-17
PR-URL: https://github.com/nodejs/io.js/pull/2048
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-25 08:59:43 +10:00
Jeremiah Senkpiel
dbd5dc932d doc: clarify prerequisites in benchmark/README.md
PR-URL: https://github.com/nodejs/io.js/pull/2034
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-24 09:57:22 -07:00
Rod Vagg
50dbc8e143 doc: add TSC meeting minutes 2015-05-27
closes: https://github.com/nodejs/node/issues/41
PR-URL: https://github.com/nodejs/io.js/pull/2037
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-24 20:49:23 +10:00
Rod Vagg
941ad362a7 doc: archive io.js TC minutes 2015-06-24 20:49:13 +10:00
Rod Vagg
644b2eaa89 doc: rename tc-meetings to tsc-meetings 2015-06-24 20:49:13 +10:00
Rich Trott
776a65ebcd test: remove obsolete TODO comments
The readfile/pipe tests rely on pre-existing pipes in the system.
This arguably tests the OS functionality and not really io.js
functionality. Removing TODOs.

PR-URL: https://github.com/nodejs/io.js/pull/2033
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-23 15:19:28 -07:00
Rich Trott
bdfeb798ad test: remove obsolete TODO comments
Not using test_ca.pem in these files anymore.
Using elipses.txt which has multibyte chars.
Not clear what constitutes "large" but that
can be a different ticket if elipses.txt etc.
are insufficiently large.

PR-URL: https://github.com/nodejs/io.js/pull/2032
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-06-23 15:11:35 -07:00
Evan Lucas
834a365113 build: DTrace is enabled by default on darwin
In configure, the --with-dtrace option only showed that it was true by
default on sunos. It is also true by default on darwin.

PR-URL: https://github.com/nodejs/io.js/pull/2019
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-06-23 11:27:31 -05:00
Rod Vagg
1330ee3b27 doc: add TC meeting 2015-05-13 minutes
PR-URL: https://github.com/nodejs/io.js/pull/1700
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-23 19:57:37 +10:00