- Mar 06, 2015
-
-
Ben Noordhuis authored
The Buffer constructor is used pervasively throughout io.js, yet it was one of the most unwieldy functions in core. This commit breaks up the constructor into several small functions in a way that makes V8 happy. About 8-10% CPU time was attributed to the constructor function before in buffer-heavy benchmarks. That pretty much drops to zero now because V8 can now easily inline it at the call site. It shortens the running time of the following simple benchmark by about 15%: for (var i = 0; i < 25e6; ++i) new Buffer(1); And about 8% from this benchmark: for (var i = 0; i < 1e7; ++i) new Buffer('x', 'ucs2'); PR-URL: https://github.com/iojs/io.js/pull/1048 Reviewed-By:Trevor Norris <trev.norris@gmail.com>
-
Fedor Indutny authored
UV_TTY does not support `uv_shutdown()` so adding this method in StreamBase will cause an `abort()` in C land. Fix: https://github.com/iojs/io.js/issues/1068 PR-URL: https://github.com/iojs/io.js/pull/1073 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
- Mar 05, 2015
-
-
cjihrig authored
The added validation allows non-negative numbers and numeric strings. All other values result in a thrown exception. Fixes: https://github.com/joyent/node/issues/9194 PR-URL: https://github.com/joyent/node/pull/9268 Reviewed-By:
Julien Gilli <julien.gilli@joyent.com> Reviewed-By:
Trevor Norris <trev.norris@gmail.com> Reviewed-By:
James M Snell <jasnell@users.noreply.github.com>
-
Chris Dickinson authored
this brings the error messaging in line with other node TypeError messages. Fixes: https://github.com/joyent/node/issues/7766 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>
-
Bert Belder authored
The test-stdin-from-from-file test runs a subprocess that verifies stdin can be piped from a file. The subprocess additionally attempts to verify that the file descriptor for stdin never gets closed. It used to do this by creating a TCP server and asserting that the associated file descriptor is greater than two. However this strategy doesn't work on windows, because servers don't have an associated file descriptor. With this patch an ordinary file is opened instead of creating a server. PR: https://github.com/iojs/io.js/pull/1067 Reviewed-By:
Fedor Indutny <fedor@indutny.com> Reviewed-By:
Rod Vagg <rod@vagg.org> Reviewed-By:
Nikolai Vavilov <vvnicholas@gmail.com>
-
Jonathan Ong authored
PR-URL: https://github.com/iojs/io.js/pull/635 Reviewed-By:
Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
-
Ken Perkins authored
As a result of 979d0ca8 there is a new check for undefined values on OutgoingMessage.setHeader. This commit introduces a test for this case. PR-URL: https://github.com/iojs/io.js/pull/970 Reviewed-By:
Rod Vagg <rod@vagg.org> Reviewed-By:
Brendan Ashworth <brendan.ashworth@me.com>
-
Johan Bergström authored
PR-URL: https://github.com/iojs/io.js/pull/982 Reviewed-By:
Rod Vagg <rod@vagg.org>
-
Johan Bergström authored
wrk is an optional tool that some of the http benchmarks uses. The removal doesn't affect any users. Developers are assumed to install it before running the tests. This change reduces the tarball by 5% PR-URL: https://github.com/iojs/io.js/pull/982 Reviewed-By:
Rod Vagg <rod@vagg.org>
-
Brian White authored
This both switches to a single algorithm for array cloning and also speeds up (by ~100% in the ee-listeners-many benchmark) the "many elements" case that was previously handled by `array.slice()`. PR-URL: https://github.com/iojs/io.js/pull/1050 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Julian Duque <julianduquej@gmail.com>
-
Johan Bergström authored
this makes the separation between http and https testing cleaner PR-URL: https://github.com/iojs/io.js/pull/1049 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Shigeki Ohtsu <ohtsu@iij.ad.jp>
-
Johan Bergström authored
we had a few ways versions of looking for support before executing a test. this commit unifies them as well as add the check for all tests that previously lacked them. found by running `./configure --without-ssl && make test`. also, produce tap skip output if the test is skipped. PR-URL: https://github.com/iojs/io.js/pull/1049 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Shigeki Ohtsu <ohtsu@iij.ad.jp>
-
Johan Bergström authored
the previous version checked if io.js was compiled with openssl support which isn't really relevant since we're starting a http server. we on the other hand need an openssl-cli which may or may not exist. PR-URL: https://github.com/iojs/io.js/pull/1049 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Shigeki Ohtsu <ohtsu@iij.ad.jp>
-
Johan Bergström authored
PR-URL: https://github.com/iojs/io.js/pull/1049 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Shigeki Ohtsu <ohtsu@iij.ad.jp>
-
Johan Bergström authored
since this applies to tls and https (among other things), it'll be used for those tests as well. if we decouple the build system to somehow support crypto but not tls, we could refine this. PR-URL: https://github.com/iojs/io.js/pull/1049 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Shigeki Ohtsu <ohtsu@iij.ad.jp>
-
Johan Bergström authored
PR-URL: https://github.com/iojs/io.js/pull/1049 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Shigeki Ohtsu <ohtsu@iij.ad.jp>
-
Trevor Norris authored
Add Buffer#indexOf(). Support strings, numbers and other Buffers. Also included docs and tests. Special thanks to Sam Rijs <srijs@airpost.net> for first proposing this change. PR-URL: https://github.com/iojs/io.js/pull/561 Reviewed-by:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Brian White <mscdex@mscdex.net> Reviewed-By:
Chris Dickinson <christopher.s.dickinson@gmail.com>
-
Christian Tellnes authored
`'use strict'` changes the behavior for `Function.prototype.call` when the context is `undefined`. In earlier versions of node the value `undefined` would make `url.format` look for fields in the global scope. The docs states that `url.format` takes a parsed URL object and returns a formatted URL string. So with this change it will now throw for other values. The exception is if the input is a string. Then it will call `url.parse` on the string and then format it. The reason for that is that you can call `url.format` on strings to clean up potentially wonky urls. Fixes: https://github.com/iojs/io.js/issues/1033 PR-URL: https://github.com/iojs/io.js/pull/1036 Reviewed-By:
Trevor Norris <trev.norris@gmail.com> Reviewed-By:
Brian White <mscdex@mscdex.net> Reviewed-By:
Julian Duque <julianduquej@gmail.com>
-
Rod Vagg authored
PR-URL: https://github.com/iojs/io.js/pull/1051 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Ruben Verborgh authored
setImmediate, setTimeout, and setInterval were called in an inefficient way, especially in the presence of arguments. This optimization improves their performance, with special cases for up to 4 arguments. Performance of setImmediate increases with 35%, setInterval with 60%, setTimeout with 70%. PR-URL: https://github.com/iojs/io.js/pull/406 Reviewed-by:
Trevor Norris <trev.norris@gmail.com> Reviewed-by:
Christian Tellnes <christian@tellnes.com>
-
- Mar 04, 2015
-
-
cjihrig authored
PR-URL: https://github.com/iojs/io.js/pull/1056 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Ben Noordhuis authored
Fix the following compiler warning by static_casting the enum values to an uint32_t: ../src/smalloc.cc: In function 'void node::smalloc::Initialize(v8::Handle<v8::Object>, v8::Handle<v8::Value>, v8::Handle<v8::Context>)': ../src/smalloc.cc:601:203: warning: enumeral and non-enumeral type in conditional expression EXTERNAL_ARRAY_TYPES(V) PR-URL: https://github.com/iojs/io.js/pull/1055 Reviewed-By:Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
-
Vladimir Kurchatkin authored
PR-URL: https://github.com/iojs/io.js/pull/920 Reviewed-By:
Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By:
Trevor Norris <trev.norris@gmail.com>
-
Vladimir Kurchatkin authored
PR-URL: https://github.com/iojs/io.js/pull/920 Reviewed-By:
Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By:
Trevor Norris <trev.norris@gmail.com>
-
Brendan Ashworth authored
This commit does some small optimization changes on `lib/_http_outgoing.js`. These include switching from `while` loops to `for` loops, moving away from `util` to `typeof` checks, and removing dead code. It also includes variable caches to avoid lookups and generic style changes. All in all, much faster execution. It gets an across the board increase in req/sec on the benchmarks, from my experience about a 10% increase. PR-URL: https://github.com/iojs/io.js/pull/605 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Nicu Micleușanu <micnic90@gmail.com> Reviewed-By:
Christian Vaagland Tellnes <christian@tellnes.com> Reviewed-By:
Brian White <mscdex@mscdex.net>
-
Fedor Indutny authored
Accept `new net.Socket()` as a `socket` option to `tls.connect()` without triggering an assertion error in C++. This is done by wrapping it into a JSStream to ensure that there will be a handle at the time of wrapping the socket into TLSSocket. Fix: https://github.com/iojs/io.js/issues/987 PR-URL: https://github.com/iojs/io.js/pull/1046 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Rod Vagg <rod@vagg.org>
-
Fedor Indutny authored
Fix test failure on FreeBSD and SmartOS, which happens due to a bad timing: events.js:141 throw er; // Unhandled 'error' event ^ Error: read ECONNRESET at exports._errnoException (util.js:734:11) at TLSWrap.onread (net.js:538:26) The outer `net.conncet()` socket stays alive after the inner socket is gone. This happens because `.pipe()`'s implementation does not `destroy` the source side when the destination has emitted `close`. Fix: https://github.com/iojs/io.js/issues/1012 PR-URL: https://github.com/iojs/io.js/pull/1040 Reviewed-By:Chris Dickinson <christopher.s.dickinson@gmail.com>
-
Trevor Norris authored
Couple micro optimizations to improve performance of process.nextTick(). Removes ~60ns of execution time. Also added small threshold to test that allows timer to fire early on the order if microseconds. PR-URL: https://github.com/iojs/io.js/pull/985 Reviewed-By:
Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
-
Sam Roberts authored
Addition of the Sync/Async headers didn't indent all the sub-headers. Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> PR-URL: https://github.com/iojs/io.js/pull/1038
-
- Mar 03, 2015
-
-
Johan Bergström authored
Superusers can open files with W_OK permission even though their mode is set to 0444. This commit makes the test attempt to change its uid to nobody on non-Windows platforms. Patch originally from https://github.com/joyent/node/commit/28d0cbbd. Fixes: https://github.com/iojs/io.js/issues/1031 PR-URL: https://github.com/iojs/io.js/pull/1037 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Michael Dawson authored
test/simple/test-http-destroyed-socket-write2.js validates that you get an appropriate error when trying to write to a request when the response on the other side has been destroyed. The test uses http.request to get a request and then keeps writing to it until either it hits 128 writes or gets the expected error. Since the writes are asynchronous we see that the writes just end up adding events to the event loop, which then later get processed once the connection supporting the request is fully ready. The test is timing dependent and if takes too long for the connection to be made the limit of 128 writes is exceeded and the test fails. The fact that the test allows a number of writes is probably to allow some delay for the connection to be ready for writing. On AIX, in the default configuration using the loopback interface is slower and the test fails because the delay is such that many more writes can be queued up before the connection takes place. If we use the host ip instead of defaulting to the loopback then the test passes. The test needs to be made more robust to delays. Since each write simply enqueues an additional write to the event queue there is probably no point in doing the second write until the first has completed. This patch schedules the next write when the first one completes and allows the test to pass even if it takes longer for the connection to be ready for writing PR-URL: https://github.com/joyent/node/pull/9270 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Timothy J Fontaine <tjfontaine@gmail.com>
-
Robert Kowalski authored
- add an article: `decode a non-utf8 string` - explain default and fallback behaviour of `querystring.unescape` PR-URL: https://github.com/joyent/node/pull/9259 Reviewed-by:
Julien Gilli <julien.gilli@joyent.com>
-
h7lin authored
In the documentation for querystring.parse, the documentation mentions that the default value for options.decodeURIComponent is the decodeURIComponent function, but it's actually the querystring.unescape function. PR-URL: https://github.com/joyent/node/pull/9259 Reviewed-by:
Julien Gilli <julien.gilli@joyent.com>
-
Julien Gilli authored
This test setups two event listeners: one on a child process' exit event , another for the same child process' stdandard output's 'data' event. The data even listener writes to a stream, and the exit event listener ends it. Because the exit event can be emitted before the data event, there is a chance that something will be written to the stream after it's ended, and that an error is thrown. This change makes the test end the stream in the listener for the child process' standard output's end event, which is guaranteed to be emitted after the last data event, thus avoiding the race. PR: https://github.com/joyent/node/pull/9301 Reviewed-by:
Bert Belder <bertbelder@gmail.com> Reviewed-by:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-by:
Colin Ihrig <cjihrig@gmail.com>
-
Rod Vagg authored
Pushed without review
-
Rod Vagg authored
-
Rod Vagg authored
Notable changes: * stream: Fixed problems for platforms without `writev()` support, particularly Windows. Changes introduced in 1.4.1, via https://github.com/iojs/io.js/pull/926, broke some functionality for these platforms, this has now been addressed. https://github.com/iojs/io.js/pull/1008 (Fedor Indutny) * arm: We have the very beginnings of ARMv8 / ARM64 / AARCH64 support. An upgrade to OpenSSL 1.0.2 is one requirement for full support. https://github.com/iojs/io.js/pull/1028 (Ben Noordhuis) * Add new collaborator: Julian Duque @julianduque
-
Ben Noordhuis authored
This commit adds basic arm64 support to the build. Building the bundled openssl is disabled pending an upgrade to openssl 1.2, the currently bundled version has some hand-rolled assembly that is 32 bits only. PR-URL: https://github.com/iojs/io.js/pull/1028 Reviewed-By:
Johan Bergström <bugs@bergstroem.nu> Reviewed-By:
Rod Vagg <rod@vagg.org>
-
Ben Noordhuis authored
Don't include tls_wrap.h in stream_base.cc. It's not used and it breaks the build when --without-ssl is passed to configure. Fixes the following build error: In file included from ../src/tls_wrap.h:5:0, from ../src/stream_base.cc:10: ../src/node_crypto.h:20:25: fatal error: openssl/ssl.h: No such file or directory #include <openssl/ssl.h> PR-URL: https://github.com/iojs/io.js/pull/1027 Reviewed-By:Johan Bergström <bugs@bergstroem.nu>
-
- Mar 02, 2015
-
-
Rod Vagg authored
Update AUTHORS file using tools/update-authors.sh PR-URL: https://github.com/iojs/io.js/pull/1018 Reviewed-By:
Chris Dickinson <christopher.s.dickinson@gmail.com>
-