summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* src: re-enable fast math on armMichaël Zasso2015-09-061-14/+0
| | | | | | | | | | | | Ref: https://github.com/nodejs/node/issues/1376 Ref: https://github.com/nodejs/node/pull/1398 Issue fixed in V8: https://chromium.googlesource.com/v8/v8/+/81703350bbb9923d211fe5b79e90bd458b0916e2 V8-Bug: https://code.google.com/p/v8/issues/detail?id=4019 PR-URL: https://github.com/nodejs/node/pull/2592 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
* src: enable vector ics on arm againAli Ijaz Sheikh2015-09-061-5/+0
| | | | | | | | | | The flag is no longer supported by V8 4.5, and the original issue [1] on ARMv6 no longer manifests with (at least) 4.5.103.20. [1] See https://code.google.com/p/v8/issues/detail?id=4338 PR-URL: https://github.com/nodejs/node/pull/2509 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* src: replace usage of v8::Handle with v8::LocalMichaël Zasso2015-09-0665-360/+326
| | | | | | | v8::Handle is deprecated: https://codereview.chromium.org/1224623004 PR-URL: https://github.com/nodejs/io.js/pull/2202 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* src: enable v8 deprecation warnings and fix themBen Noordhuis2015-09-063-36/+22
| | | | | | | | Turn on V8 API deprecation warnings. Fix up the no-arg Isolate::New() calls in src/node.cc and src/debug-agent.cc. PR-URL: https://github.com/nodejs/io.js/pull/2091 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* contextify: ignore getters during initializationFedor Indutny2015-09-061-1/+23
| | | | | | | | | | The `context_` is not initialized until the `CreateV8Context` will return. Make sure that it will be empty (by moving away initialization from constructor) at start, and ignore getter callbacks until it will have some value. PR-URL: https://github.com/nodejs/io.js/pull/2091 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* src: apply debug force load fixups from 41e63fbAli Ijaz Sheikh2015-09-061-0/+6
| | | | | | | | Apply the src/node_contextify.cc and lib/module.js fixups from @bnoordhuis https://github.com/nodejs/node/commit/41e63fb088a29fa05e16fb0d997255678134c043 PR-URL: https://github.com/nodejs/node/pull/2509 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* build: add --enable-asan with builtin leakcheckKarl Skomski2015-09-061-0/+8
| | | | | | PR-URL: https://github.com/nodejs/node/pull/2376 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* src: fix memory leak in ExternStringKarl Skomski2015-09-062-10/+33
| | | | | | | | | | | | | | | | | | v8 will silently return an empty handle which doesn't delete our data if string length is above String::kMaxLength Fixes: https://github.com/nodejs/node/issues/1374 PR-URL: https://github.com/nodejs/node/pull/2402 Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com> Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl> Amended by @rvagg to change author date from "1970-08-16 16:09:02 +0200" to "2015-08-16 16:09:02 +0200" as per discussion @ https://github.com/nodejs/node/issues/2713
* src: only set v8 flags if argc > 1Evan Lucas2015-09-021-1/+1
| | | | | | | | | | ParseArgs sets the first element of v8_args to argv[0], so v8_argc will always be at least 1. This change only calls V8::SetFlagsFromCommandLine if v8_argc > 1, leading to an additional startup improvement of ~5%. PR-URL: https://github.com/nodejs/node/pull/2646 Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
* src: only memcmp if length > 0 in Buffer::CompareKarl Skomski2015-09-011-1/+1
| | | | | | | | | Both pointer arguments to memcmp are defined as non-null and compiler optimizes upon that. PR-URL: https://github.com/nodejs/node/pull/2544 Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com> Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* Working on v5.0.0Rod Vagg2015-08-301-1/+1
|
* Revert "lib,src: add unix socket getsockname/getpeername"Ben Noordhuis2015-08-282-29/+0
| | | | | | | | | | | | This reverts commit 6cd0e2664b1ce944e5e461457d160be83f70d379. This reverts commit 7a999a13766ac68049812fedbdfd15a0250f0f07. This reverts commit f337595441641ad36f6ab8ae770e56c1673ef692. It turns out that on Windows, uv_pipe_getsockname() is a no-op for client sockets. It slipped through testing because of a CI snafu. PR-URL: https://github.com/nodejs/node/pull/2584 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* lib,src: add unix socket getsockname/getpeernameBen Noordhuis2015-08-272-0/+29
| | | | | | | | | | | | | | | | | The implementation is a minor API change in that socket.address() now returns a `{ address: '/path/to/socket' }` object, like it does for TCP and UDP sockets. Before this commit, it returned `socket._pipeName`, which is a string when present. Change common.PIPE on Windows from '\\\\.\\pipe\\libuv-test' to '\\\\?\\pipe\\libuv-test'. Windows converts the '.' to a '?' when creating a named pipe, meaning that common.PIPE didn't match the result from NtQueryInformationFile(). Fixes: https://github.com/nodejs/node/issues/954 PR-URL: https://github.com/nodejs/node/pull/956 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* src: DRY getsockname/getpeername codeBen Noordhuis2015-08-275-72/+31
| | | | | | | | | Extract the common logic into a template function. No functional changes, just code cleanup. PR-URL: https://github.com/nodejs/node/pull/956 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* crypto: Use OPENSSL_cleanse to shred the data.Сковорода Никита Андреевич2015-08-271-3/+3
| | | | | | | memset() is not useful here, it's efficiently a noop. PR-URL: https://github.com/nodejs/node/pull/2575 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
* http_parser: consume StreamBase instanceFedor Indutny2015-08-263-36/+184
| | | | | | | | Consume StreamBase instance and operate on incoming data directly without allocating Buffer instances. Improves performance. PR-URL: https://github.com/nodejs/node/pull/2355 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* env: introduce `KickNextTick`Fedor Indutny2015-08-264-26/+40
| | | | | | | | | There might be a need to "kick off" the next tick queue and execute events on it. Normally it is done through the `MakeCallback` interface, but in case when it is not - we need a way to "kick them off" manually. PR-URL: https://github.com/nodejs/node/pull/2355 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* src: missing Exception::Error in node_http_parserJeremiah Senkpiel2015-08-261-1/+1
| | | | | | Fixes: 75adde07f9a2de7f38a67bec72bd377d450bdb52 PR-URL: https://github.com/nodejs/node/pull/2550 Reviewed-By: Fedor Indutny <fedor@indutny.com>
* process: make process.release.name "node"cjihrig2015-08-231-1/+1
| | | | | | | | | This commit sets the value of process.release.name to "node". Fixes: https://github.com/nodejs/node/issues/2361 PR-URL: https://github.com/nodejs/node/pull/2367 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
* installer: fix installers for node.js renameFrederic Hemberger2015-08-231-0/+0
| | | | | | | | | | | This commit completes the io.js to Node.js rename in the Windows installer. Fixes: https://github.com/nodejs/node/issues/2418 PR-URL: https://github.com/nodejs/node/pull/2367 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
* node: rename from io.js to nodecjihrig2015-08-238-32/+32
| | | | | | | | | | | This commit replaces instances of io.js with Node.js, based on the recent convergence. There are some remaining instances of io.js, related to build and the installer. Fixes: https://github.com/nodejs/node/issues/2361 PR-URL: https://github.com/nodejs/node/pull/2367 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
* doc: fix comments in tls_wrap.cc and _http_client.jsMinwoo Jung2015-08-231-2/+2
| | | | | | | | fixed grammatically wrong expressions to make it clear Reviewed By: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/2490 PR-URL: https://github.com/nodejs/node/pull/2489
* tls: add --tls-cipher-list command line switchJames M Snell2015-08-234-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new `--tls-cipher-list` command line switch that can be used to override the built-in default cipher list. The intent of this is to make it possible to enforce an alternative default cipher list at the process level. Overriding the default cipher list is still permitted at the application level by changing the value of `require('tls').DEFAULT_CIPHERS`. As part of the change, the built in default list is moved out of tls.js and into node_constants.h and node_constants.cc. Two new constants are added to require('constants'): * defaultCipherList (the active default cipher list) * defaultCoreCipherList (the built-in default cipher list) A test case and doc changes are included. A new NODE_DEFINE_STRING_CONSTANT macro is also created in node_internals.h When node_constants is initialized, it will pick up either the passed in command line switch or fallback to the default built-in suite. Within joyent/node, this change had originaly been wrapped up with a number of other related commits involving the removal of the RC4 cipher. This breaks out this isolated change. /cc @mhdawson, @misterdjules, @trevnorris, @indutny, @rvagg Reviewed By: Ben Noordhuis <ben@strongloop.com> PR-URL: https://github.com/nodejs/node/pull/2412
* fs: replace bad_args macro with concrete error msgRoman Klauke2015-08-231-34/+47
| | | | | | | | | | | | Instead of throwing an error with `Bad arguments` the fs methods return a concrete error message. If an argument is missing, the methods throw an error with the information, what is missing. In case of a type mismatch, they throw an error with some hints, what datatype is expected. PR-URL: https://github.com/nodejs/node/pull/2495 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* string_bytes: fix unaligned write in UCS2Fedor Indutny2015-08-212-12/+75
| | | | | | | | | Support unaligned output buffer when writing out UCS2 in `StringBytes::Write`. Fix: https://github.com/nodejs/node/issues/2457 PR-URL: https://github.com/nodejs/node/pull/2480 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* src: improve startup timeEvan Lucas2015-08-211-1/+2
| | | | | | | | | | | | Previously, V8:SetFlagsFromCommandLine was being called even if v8_argc was 0. This change prevents that from being called unless v8 arguments are actually passed. Improves startup time by about 5%. PR-URL: https://github.com/nodejs/node/pull/2483 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* crypto: fix mem {de}allocation in ExportChallengeKarl Skomski2015-08-201-4/+6
| | | | | | | | | Use correct deallocator for returned buffera. Don't free internal structure via ASN1_STRING_data. Deallocate NETSCAPE_SPKI. PR-URL: https://github.com/nodejs/node/pull/2359 Reviewed-By: Fedor Indutny <fedor@indutny.com>
* doc: fix spelling mistake in node.js commentJacob Edelman2015-08-201-1/+1
| | | | | | | | Per: https://github.com/joyent/node/pull/8876 PR-URL: https://github.com/nodejs/node/pull/2391 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Roman Reiss <me@silverwind.io>
* stream_base: various improvementsFedor Indutny2015-08-207-64/+93
| | | | | | | | | | | | | | | Expose and use in TLSWrap an `v8::External` wrap of the `StreamBase*` pointer instead of guessing the ancestor C++ class in `node_wrap.h`. Make use of `StreamBase::Callback` structure for storing/passing both callback and context in a single object. Introduce `GetObject()` for future user-land usage, when a child class is not going to be inherited from AsyncWrap. PR-URL: https://github.com/nodejs/node/pull/2351 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* events: deprecate static listenerCount functionSakthipriyan Vairamani2015-08-201-2/+1
| | | | | | | | | | As per the discussion in #734, this patch deprecates the usage of `EventEmitter.listenerCount` static function in the docs, and introduces the `listenerCount` function in the prototype of `EventEmitter` itself. PR-URL: https://github.com/nodejs/node/pull/2349 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
* src: better error message on failed Buffer mallocKarl Skomski2015-08-181-2/+4
| | | | | PR-URL: https://github.com/nodejs/node/pull/2422 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* crypto: check for OpenSSL errors when signingP.S.V.R2015-08-171-1/+11
| | | | | | | | | | Errors might be injected into OpenSSL's error stack without the return value of `PEM_read_bio_PrivateKey` being set to `nullptr`. See the test of `test_bad_rsa_privkey.pem` for an example. PR-URL: https://github.com/nodejs/node/pull/2342 Reviewed-By: Fedor Indutny <fedor@indutny.com>
* tls: fix throughput issues after incorrect mergeFedor Indutny2015-08-171-1/+1
| | | | | | | | | | | 1e066e4a was done incorrectly and has overwritten an important change in: c17449df. Using bigger output buffer increases performance in 3-4 times. PR-URL: https://github.com/nodejs/node/pull/2381 Fix: https://github.com/joyent/node/issues/25803 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* crypto: fix memory leak in PBKDF2RequestKarl Skomski2015-08-171-1/+9
| | | | | PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* crypto: fix memory leak in ECDH::SetPrivateKeyKarl Skomski2015-08-171-1/+5
| | | | | PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* crypto: fix memory leak in PublicKeyCipher::CipherKarl Skomski2015-08-171-0/+2
| | | | | PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* crypto: fix memory leak in SafeX509ExtPrintKarl Skomski2015-08-171-0/+1
| | | | | PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* crypto: fix memory leak in SetDHParamKarl Skomski2015-08-171-2/+4
| | | | | PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* src: fix memory leak in DLOpenKarl Skomski2015-08-171-0/+5
| | | | | PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* src: don't use fopen() in require() fast pathBen Noordhuis2015-08-171-7/+24
| | | | | | | | | | Fix a regression that was introduced in commit 1bbf8d0 ("lib: speed up require(), phase 2") where file paths with Unicode characters fail to load on Windows. Fixes: https://github.com/nodejs/node/issues/2236 PR-URL: https://github.com/nodejs/node/pull/2377 Reviewed-By: Bert Belder <bertbelder@gmail.com>
* src: rename Buffer::Use() to Buffer::New()Ben Noordhuis2015-08-136-11/+11
| | | | | | | Fixes: https://github.com/nodejs/node/issues/2308 PR-URL: https://github.com/nodejs/node/pull/2352 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* src: introduce internal Buffer::Copy() functionBen Noordhuis2015-08-135-23/+24
| | | | | | | | | | | | | Rename the three argument overload of Buffer::New() to Buffer::Copy() and update the code base accordingly. The reason for renaming is to make it impossible to miss a call site. This coincidentally plugs a small memory leak in crypto.getAuthTag(). Fixes: https://github.com/nodejs/node/issues/2308 PR-URL: https://github.com/nodejs/node/pull/2352 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* src: move internal functions out of node_buffer.hBen Noordhuis2015-08-132-22/+16
| | | | | | | | | | | The circular dependency problem that put them there in the first place is no longer an issue. Move them out of the public node_buffer.h header and into the private node_internals.h header. Fixes: https://github.com/nodejs/node/issues/2308 PR-URL: https://github.com/nodejs/node/pull/2352 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* src: plug memory leaksBen Noordhuis2015-08-134-5/+10
| | | | | | | | | | | | | In a few places dynamic memory was passed to the Buffer::New() overload that makes a copy of the input, not the one that takes ownership. This commit is a band-aid to fix the memory leaks. Longer term, we should look into using C++11 move semantics more effectively. Fixes: https://github.com/nodejs/node/issues/2308 PR-URL: https://github.com/nodejs/node/pull/2352 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* crypto: show exponent in decimal and hexChad Johnston2015-08-111-1/+3
| | | | | | | | | The exponent value was already in hex, but missing the 0x prefix which could be confusing. PR-URL: https://github.com/nodejs/io.js/pull/2320 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: add total_available_size to v8 statisticsRoman Klauke2015-08-111-2/+3
| | | | | | | | | | | | v8 introduced the new flag `total_available_size` in version 4.4 and upwards. This flag is now available on `v8.getHeapStatistics` with the name `total_available_size`. It contains the total available heap size of v8. Introduced with commit: v8/v8-git-mirror@0a1352a7 PR-URL: https://github.com/nodejs/io.js/pull/2348 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* build: update manifest to include Windows 10Lucien Greathouse2015-08-091-0/+2
| | | | | | | | | Windows 10 wasn't listed in the executable manifest. This caused problems with trying to detect Windows 10 via `os.release()`. PR-URL: https://github.com/nodejs/io.js/pull/2332 Reviewed-By: Roman Reiss <me@silverwind.io>
* tls: introduce internal `onticketkeycallback`Fedor Indutny2015-08-083-0/+121
| | | | | | | | | | | `enableTicketKeyCallback` and `onticketkeycallback` could be potentially used to renew the TLS Session Tickets before they expire. However this commit will introduce it only for private use yet, because we are not sure about the API, and already need this feature for testing. See: https://github.com/nodejs/io.js/issues/2304 PR-URL: https://github.com/nodejs/io.js/pull/2312 Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
* doc: multiple documentation updates cherry picked from v0.12James M Snell2015-08-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * doc: improve http.abort description * doc: mention that mode is ignored if file exists * docs: Fix default options for fs.createWriteStream() * Documentation update about Buffer initialization * doc: add a note about readable in flowing mode * doc: Document http.request protocol option * doc, comments: Grammar and spelling fixes * updated documentation for fs.createReadStream * Update child_process.markdown, spelling * doc: Clarified read method with specified size argument. * docs:events clarify emitter.listener() behavior * doc: two minor stream doc improvements * doc: clarify Readable._read and Readable.push * doc: stream.unshift does not reset reading state * doc: readable event clarification * doc: additional refinement to readable event Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noorduis <ben@strongloop.com> PR-URL: https://github.com/nodejs/io.js/pull/2302
* Working on v4.0.0Rod Vagg2015-08-051-2/+2
|