0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

10643 Commits

Author SHA1 Message Date
Trevor Norris
5962dbef49 src: all wrap's now use actual FunctionTemplate
Instead of simply creating a new v8::Object to contain the connection
information, instantiate a new instance of a FunctionTemplate. This will
allow future improvements for debugging and performance probes.

Additionally, the "provider" argument in the ReqWrap constructor is no
longer optional.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:52:42 -08:00
Trevor Norris
b1e9d330aa node: fix throws before timer module is loaded
An edge case could occur when the setImmediate() in _fatalException()
would fire before the timers module had been loaded globally, causing
Node to crash.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:52:19 -08:00
Trevor Norris
42df679c45 node, async-wrap: remove MakeDomainCallback
C++ won't deoptimize like JS if specific conditional branches are
sporadically met in the future. Combined with the amount of code
duplication removal and simplified maintenance complexity, it makes more
sense to merge MakeCallback and MakeDomainCallback.

Additionally, type casting in V8 before verifying what that type is will
cause V8 to abort in debug mode if that type isn't what was expected.
Fix this by first checking the v8::Value before casting.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:37:53 -08:00
Trevor Norris
2593c14131 async-wrap: move MakeCallback to .cc
MakeCallback is too large a function to be inlined. Likewise, only
having header files will not allow for any part of AsyncWrap to be
exposed cleanly via NODE_MODULE_CONTEXT_AWARE_BUILTIN().

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:35:44 -08:00
Trevor Norris
b6559553a4 src: remove Async Listener
Async Listener was the name of the user-facing JS API, and is being
completely removed. Instead low level hooks directly into the mechanism
that AL used will be introduced in a future commit.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:33:26 -08:00
Alexis Campailla
0674cbaceb test: mark current flaky tests as flaky 2014-12-04 17:22:15 +01:00
Alexis Campailla
df3a2b2cf2 test: runner support for flaky tests
Adding --flaky-tests option, to allow regarding flaky tests failures
as non-fatal.

Currently only observed by the TapProgressIndicator, which will
add a # TODO directive to tests classified as flaky. According to the
TAP specification, the test harness is supposed to treat failures
that have a # TODO directive as non-fatal.
2014-12-04 17:22:14 +01:00
Fedor Indutny
dca1ee4b11 contributing: commiter git FAQ
Describe in details how our current git flow works and could be used.

Fix iojs/io.js#67
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/68
2014-12-04 18:06:52 +03:00
Johan Bergström
71e9d0fb1b configure: remove shared cares build option
Bundled cares differs from upstream which will result
in a compilation error when trying to used a shared cares.

Fixes: https://github.com/joyent/node/pull/8786
PR-URL: https://github.com/iojs/io.js/pull/38
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-04 21:32:05 +11:00
Rod Vagg
185d11c791 policy: added contribution policy
Policy originally by @isaacs and @othiym23, submitted by @mikeal,
committed fresh by @rvagg because .. #22 is kind of a mess

PR-URL: https://github.com/iojs/io.js/pull/22
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2014-12-04 21:20:28 +11:00
Thorsten Lorenz
0fe7a0d024 modules: adding load linked modules feature
- introduced NM_F_LINKED flag to identify linked modules
- setting node_is_initialized after calling V8::Initialize in order to
  make the right decision during initial module registration
- introduced modlist_linked in order to track modules that were
  pre-registered in order to complete it once node is initialized
- completing registration of linked module similarly to the way it's
  done inside DLOpen

PR-URL: https://github.com/iojs/io.js/pull/8
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-04 21:20:28 +11:00
Johan Bergström
766d063e05 configure: remove shared cares build option
Bundled cares differs from upstream which will result
in a compilation error when trying to used a shared cares.

Fixes: https://github.com/joyent/node/pull/8786
PR-URL: https://github.com/iojs/io.js/pull/38
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-04 21:20:28 +11:00
The Gitter Badger
206389d411 Added Gitter badge
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: https://github.com/iojs/io.js/pull/41
2014-12-04 21:20:27 +11:00
Bryce Kahle
e4932d02a3 docs: fix prerequisite list formatting
PR-URL: https://github.com/iojs/io.js/pull/44
Reviewed-By: Rod Vagg <rod@vagg.org>
2014-12-04 21:20:27 +11:00
Leonardo Balter
9f9641c2bb docs: improve repo description
PR-URL: https://github.com/iojs/io.js/pull/48
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2014-12-04 21:19:27 +11:00
Trevor Norris
e67db0191d node: fix bad assert
It was my mistake to change an assert check. This changes it back to how
the assert was originally done.

Fixes: c131c1f "modules: adding load linked modules feature"
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-12-03 17:19:07 -08:00
Carlos Campderrós
4815873bb5 doc: set logical umask in process.umask example
0644 seems to be the desired mode for new files (as it is a very weird
umask), and to achieve that the correct umask would be 0022.

PR-URL: https://github.com/joyent/node/pull/8039
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-02 22:35:36 -08:00
Martin Cozzi
550a444821 doc: update README with irc channel
Fixes: https://github.com/iojs/io.js/issues/30
PR-URL: https://github.com/iojs/io.js/pull/31
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-02 20:30:45 -08:00
Jonathan Johnson
6120472036 url: change hostname regex to negate invalid chars
Regarding joyent/node#8520

This changes hostname validation from a whitelist regex approach
to a blacklist regex approach as described in https://url.spec.whatwg.org/#host-parsing.

url.parse misinterpreted `https://good.com+.evil.org/`
as `https://good.com/+.evil.org/`.  If we use url.parse to check the
validity of the hostname, the test passes, but in the browser the
user is redirected to the evil.org website.
2014-12-02 17:24:18 -08:00
Trevor Norris
c4f6c22c20 lint: fix code style
Couple code style fixes to pass cpplint

Fixes: 304c0b4 "crypto: store thread id as pointer-sized"
2014-12-02 17:10:40 -08:00
Jamund Ferguson
280b3871f2 doc: fixed article usage in README.
added a the because it sounded weird.

PR-URL: https://github.com/iojs/io.js/pull/29
Reviewed-by: Mikeal Rogers <mikeal.rogers@gmail.com>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-02 16:55:38 -08:00
Yazhong Liu
ba687f6eb4 url: support path for url.format
this adds support for a "path" field that overrides
"query", "search", and "pathname" if given.

Fixes: https://github.com/joyent/node/issues/8722
PR-URL: https://github.com/joyent/node/pull/8755
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-02 11:32:08 -08:00
Yazhong Liu
d312b6d15c url: support path for url.format
this adds support for a "path" field that overrides
"query", "search", and "pathname" if given.

Fixes: https://github.com/joyent/node/issues/8722
PR-URL: https://github.com/joyent/node/pull/8755
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-02 10:55:22 -08:00
Tom Gallacher
d24b7b8500 docs: Change contributing documentation to io.js
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/iojs/io.js/pull/25
2014-12-02 20:48:14 +03:00
Mikeal Rogers
51514c8e8c docs: simple project messaging.
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/iojs/io.js/pull/24
2014-12-02 20:21:46 +03:00
Max Ogden
a647c39acf docs: add issue contributing section
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/iojs/io.js/pull/21
2014-12-02 04:58:00 +03:00
Thorsten Lorenz
c131c1f920 modules: adding load linked modules feature
- introduced NM_F_LINKED flag to identify linked modules
- setting node_is_initialized after calling V8::Initialize in order to
  make the right decision during initial module registration
- introduced modlist_linked in order to track modules that were
  pre-registered in order to complete it once node is initialized
- completing registration of linked module similarly to the way it's
  done inside DLOpen

PR-URL: https://github.com/joyent/node/pull/8386
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-01 15:07:43 -08:00
Rod Vagg
d77f490a04 test: extend timeouts in child/exec tests
increased resillence on slower computers

Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/10
2014-11-30 00:27:36 +11:00
Rod Vagg
e0852118cb test: bump --stack-size to stop child fails on ARM
On ARM, we get a "Maximum call stack size exceeded" when using
require() in the child process, bump it up a bit to avoid the
failures so we can test what we are actually after

Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/14
2014-11-30 00:23:57 +11:00
Ben Noordhuis
e05dff1e60 deps: openssl - add x32 support
This commit adds preliminary x32 support.  Configure with:

    $ ./configure --dest-cpu=x32

PR-URL: https://github.com/node-forward/node/pull/24
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-11-29 14:36:50 +03:00
Fedor Indutny
ab71223e47 openssl: fix keypress requirement in apps on win32
Original source:

http://openssl.6102.n7.nabble.com/PATCH-s-client-Fix-keypress-requirement-with-redirected-input-on-Windows-td46787.html

Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-11-29 14:35:29 +03:00
Rod Vagg
013527ad1c test: don't remove empty.txt on win32
on win32 we use empty.txt in the fixtures directory, otherwise we
use a file constructed specifically for this test due to POSIX
socket path length limitations, in which case we need to do
appropriate cleanup

Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/2
2014-11-29 12:43:53 +11:00
Fedor Indutny
d23326b838 test: another fix for test-crypto-stream
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-11-28 17:13:12 +03:00
Alexis Campailla
304c0b43aa crypto: store thread id as pointer-sized
In 59658a8de7
the return of uv_thread_self() was changed from unsigned long to
uv_thread_t.

uv_thread_t is a HANDLE (pointer-sized) on Windows, which means that
on Win64 it cannot be stored with CRYPTO_THREADID_set_numeric without
data loss.

Furthermore, without this change there will be a build break on Windows
when the libuv change is integrated into Node, because of the
conversion from HANDLE to unsigned long.

Other related commits:
5845a6bcd5
919d8ec63a
2014-11-28 13:12:14 +01:00
Alexis Campailla
cb8cadbe62 Revert "crypto: cast uv_thread_t to unsigned long"
This reverts commit 0308ad2ce5.
2014-11-28 13:11:36 +01:00
Fedor Indutny
4d7e89320a test: fix test-crypto-stream
Because of constant-timeness change made in openssl-1.0.1j the error is
no longer returned from EVP_DecryptFinal_ex. Now it just return 0, and
thus the error message does not contain proper error code. Adapt to this
change, there is not much that we could do about it.
2014-11-28 13:42:21 +03:00
Mathias Bynens
232c4c27cc punycode: update to v1.3.2
Changes since v1.2.3:

* Email address support in `toASCII` and `toUnicode`
* `punycode.ucs2.encode` now no longer mutates the `codePoints`
  argument
* Ensure trailing `.` in domain names are preserved
* Some minor code cleanup + bug fixes

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/iojs/io.js/pull/6
2014-11-28 13:21:43 +03:00
Fedor Indutny
574407a67f deps: update openssl to 1.0.1j
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/1
2014-11-27 19:56:41 +03:00
James Cowgill
7efc64dc94 test: fix floating point NaN tests on mips
MIPS machines use a slightly different format for NaNs (still perfectly
valid though). This patch adjusts the buffer testcases to allow for
this.

See https://en.wikipedia.org/wiki/NaN#Encoding for some more info.

Based on patch applied to debian by Jérémy Lal <kapouer@melix.org>

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8793
2014-11-27 18:25:00 +03:00
Saúl Ibarra Corretgé
0308ad2ce5 crypto: cast uv_thread_t to unsigned long
Should work in all platforms and it fixes this compilation problem
on OSX:

../src/node_crypto.cc:154:3: error: no matching function for call to
'CRYPTO_THREADID_set_numeric'
  CRYPTO_THREADID_set_numeric(tid, uv_thread_self());
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../deps/openssl/openssl/include/openssl/../../crypto/crypto.h:435:6:
    note: candidate function not viable: no known conversion from
          'uv_thread_t' (aka '_opaque_pthread_t *') to 'unsigned long'
          for 2nd argument
          void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned
          long val);
               ^
               1 error generated.

PR-URL: https://github.com/joyent/node/pull/8785
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 15:57:21 -08:00
Saúl Ibarra Corretgé
69904c8a78 deps: update libuv to 1.0.1
PR-URL: https://github.com/joyent/node/pull/8785
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 15:56:48 -08:00
Vladimir Kurchatkin
bf3e0f417b smalloc: don't allow to dispose typed arrays
PR-URL: https://github.com/joyent/node/pull/8743
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 12:39:02 -08:00
Nathan Woltman
e0a0e913c7 path: refactor normalizeArray()
The normalizeArray() function now avoids using the slow Array#splice()
method to improve performance and now also filters out empty path parts.

Code that pre-filtered empty parts has been removed.

PR-URL: https://github.com/joyent/node/pull/8724
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 12:16:56 -08:00
Saúl Ibarra Corretgé
9d9ed61c5a deps: update libuv to 1.0.0
PR-URL: https://github.com/joyent/node/pull/8762
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 12:08:36 -08:00
Fedor Indutny
0f66835ea8 crypto: proper fix for d7e700's cause
Remove useless tests, and `ERR_peek_error()` calls. Things are being set
in a proper order now and there is no need for hacky extra checks.

The right order was:

1. Set certificate
2. Set key

Because setting certificate doesn't properly handle key mismatch errors.

Fix: node-forward/node#67
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/node-forward/node/pull/68
2014-11-26 18:41:19 +03:00
Calvin Metcalf
ce56dccb99 crypto: allow creation of GCM ciphers with createCipher
Sets the authenticated encryption specific methods ([set|get]AuthTag and setAAD)
on the Cipher prototype not just the Cipheriv prototype.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8711
2014-11-25 18:53:35 +03:00
Fedor Indutny
d7e7008c1f crypto: throw if the key doesn't match cert
fix joyent/node#8770
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/node-forward/node/pull/66
2014-11-25 18:51:23 +03:00
Rod Vagg
b594e59543 test: named pipe is invalid when appending .txt
On Windows, appending '.txt' to a named pipe does not produce a valid
regular file name.  We want an empty _file_, not an invalid named pipe.
Fix-up for commit 1f79e4f.

PR-URL: https://github.com/node-forward/node/pull/63
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-11-23 17:11:04 +01:00
Ben Noordhuis
fcbbc7a050 Merge remote-tracking branch 'joyent/v0.12' into v0.12
Conflicts:
	Makefile
	deps/v8/src/base/platform/platform.h

PR-URL: https://github.com/node-forward/node/pull/65
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-11-22 17:55:59 +01:00
Ben Noordhuis
21130c7d6f lib: turn on strict mode
Turn on strict mode for the files in the lib/ directory.  It helps
catch bugs and can have a positive effect on performance.

PR-URL: https://github.com/node-forward/node/pull/64
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-11-22 17:23:30 +01:00