- Aug 09, 2013
-
-
isaacs authored
When a stream is flowing, and not in the middle of a sync read, and the read buffer currently has a length of 0, we can just emit a 'data' event rather than push it onto the array, emit 'readable', and then automatically call read(). As it happens, this is quite a frequent occurrence! Making this change brings the HTTP benchmarks back into a good place after the removal of the .ondata/.onend socket kludge methods.
-
isaacs authored
-
- Aug 08, 2013
-
-
Trevor Norris authored
smalloc.alloc now accepts an optional third argument which allows specifying the type of array that should be allocated. All available types are now located on smalloc.Types.
-
Trevor Norris authored
* Moved the ToObject check out of smalloc::Alloc and into JS. Direct usage of that method is for internal use only and so can bypass the possible coercion. * Same has been done with smalloc::SliceOnto. * smalloc::CopyOnto will now throw if passed argument is not an object. * Remove extra TargetFreeCallback function. There was a use for it when it was working with a Local<T>, but that code has been removed making the function superfluous.
-
Ben Noordhuis authored
Said commit was a back-port from a feature branch where it did lint. Mea culpa.
-
isaacs authored
There are some agent subclasses using this today. Despite the addRequest function being undocumented internal API, it's easy enough to just support the old signature for backwards compatibility.
-
Ben Noordhuis authored
It's never been used and we probably never will. Remove it.
-
- Aug 07, 2013
-
-
Ben Noordhuis authored
Add is_named_pipe(), is_named_pipe_ipc() and is_tcp() and update the code base to use those rather than `stream->type == UV_FOO` and `reinterpret_cast<uv_pipe_t*>(handle)->ipc` style checks.
-
Ben Noordhuis authored
Hide member fields behind getters. Make the fields themselves const in the sense that the pointer is non-assignable - the pointed to object remains mutable. Makes reasoning about lifecycle and mutability a little easier.
-
Ben Noordhuis authored
Make the pointer-to-wrap const (i.e. mutable but not assignable) to prevent accidental reassignment in the macro body.
-
Ben Noordhuis authored
The check has virtually zero overhead and it simplifies the call sites because they were calling IsEmpty() anwyay.
-
Timothy J Fontaine authored
-
Timothy J Fontaine authored
-
Trevor Norris authored
process.domain is almost never just undefined, so it was setting the object property unnecessarily.
-
Timothy J Fontaine authored
* v8: upgrade to 3.20.11 * uv: upgrade to v0.11.7 * buffer: return offset for end of last write (Trevor Norris) * build: embed the mdb_v8.so into the binary (Timothy J Fontaine) * build: fix --without-ssl build (Ben Noordhuis) * child_process: add 'shell' option to .exec() (Ben Noordhuis) * dgram: report send errors to cb, don't pass bytes (Ben Noordhuis) * fs: write strings directly to disk (Trevor Norris) * https: fix default port (Koichi Kobayashi) * openssl: use asm for sha, md5, rmd (Fedor Indutny) * os: add mac address to networkInterfaces() output (Brian White) * smalloc: introduce smalloc module (Trevor Norris) * stream: Simplify flowing, passive data listening (streams3) (isaacs) * tls: asynchronous SNICallback (Fedor Indutny) * tls: share tls tickets key between cluster workers (Fedor Indutny) * util: don't throw on circular %j input to format() (Ben Noordhuis)
-
Timothy J Fontaine authored
-
Fedor Indutny authored
`server.SNICallback` was initialized with `SNICallback.bind(this)`, and therefore check `this.SNICallback === SNICallback` was always false, and `_tls_wrap.js` always thought that it was a custom callback instead of default one. Which in turn was causing clienthello parser to be enabled regardless of presence of SNI contexts.
-
Timothy J Fontaine authored
Conflicts: deps/v8/test/cctest/test-api.cc lib/events.js lib/http.js
-
- Aug 06, 2013
-
-
Ben Noordhuis authored
Don't create a superfluous Number object, just use the version of v8::Object::Get() that takes an unsigned int. Convert the index to unsigned int while we're here.
-
Eran Hammer authored
If an error listener is added to a stream using once() before it is piped, it is invoked and removed during pipe() but before pipe() sees it which causes it to be emitted again. Fixes #4155 #4978
-
Ben Noordhuis authored
The handle object was checked against the wrong constructor template. Put another way, it was unwrapped as the wrong StreamWrap type.
-
Ben Noordhuis authored
The type of the expression `(uint16_t) server_names_len + 2` gets implicitly widened to int. Change the type of server_names_len to uint32_t to avoid the following warnings: ../../src/node_crypto_clienthello.cc:144: warning: comparison between signed and unsigned integer expressions ../../src/node_crypto_clienthello.cc:146: warning: comparison between signed and unsigned integer expressions -
Fedor Indutny authored
Make ClientHelloParser handle SNI extension, and extend `_tls_wrap.js` to support loading SNI Context from both hello, and resumed session. fix #5967
-
Fedor Indutny authored
Share ClientHelloParser code between `tls_wrap.cc` and `node_crypto.cc`. fix #5959
-
isaacs authored
-
Evan Solomon authored
Ignore encoding *if* chunk is a buffer
-
Timothy J Fontaine authored
-
Timothy J Fontaine authored
This builds and includes the mdb_v8.so in the binary of node so mdb can be sure to always use the latest version
-
isaacs authored
-
isaacs authored
-
Koichi Kobayashi authored
https.get('https://github.com/') should use port 443, not 80. -
isaacs authored
Noticed by @bnoordhuis in https://github.com/joyent/node/pull/5991#discussion_r5575946
-
mstarzinger@chromium.org authored
Quoting the CVE: Google V8, as used in Google Chrome before 28.0.1500.95, allows remote attackers to cause a denial of service or possibly have unspecified other impact via vectors that leverage "type confusion." Likely has zero impact on node.js because it only runs local, trusted code but let's apply it anyway. This is a back-port of upstream commit r15665. Original commit log: Use internal array as API function cache. R=yangguo@chromium.org BUG=chromium:260106 TEST=cctest/test-api/Regress260106 Review URL: https://codereview.chromium.org/19159003 Fixes #5973.
-
- Aug 05, 2013
-
-
Forrest L Norvell authored
Adds the documentation requested in #5017.
-
Sam Roberts authored
Flags and modes aren't the same, symlinks are followed in all of the path but the last component, docs should say something about what the mode argument is for and when its used, fs.openSync should point to the function that contains the docs for its args, as fs.writeSync does.
-
Ben Noordhuis authored
This is [1] applied ahead of time. Summary: OpenBSD doesn't have <ucontext.h>. ucontext_t lives in <signal.h> and is a typedef for struct sigcontext. There is no uc_mcontext. [1] https://codereview.chromium.org/21705003/
-
- Aug 04, 2013
-
-
Fedor Indutny authored
It shouldn't ignore it! There're two possibile cases, which should be handled properly: 1. Having a default `SNICallback` which is using contexts, added with `server.addContext(...)` routine 2. Having a custom `SNICallback`. In first case we may want to opt-out setting `.onsniselect` method (and thus save some CPU time), if there're no contexts added. But, if custom `SNICallback` is used, `.onsniselect` should always be set, because server contexts don't affect it.
-
Ben Noordhuis authored
Code cleanup, replace a few uses of reinterpret_cast<T*>(void_ptr) with static_cast<T*>(void_ptr).
-
Ben Noordhuis authored
Update a few more `Local<T>::New(isolate, persistent)` call sites to `PersistentToLocal(isolate, persistent)` - the latter has a fast path for non-weak persistent references.
-
- Aug 03, 2013
-
-
Fedor Indutny authored
When doing `FreeEmpty`, `NodeBIO` skips pre-allocated `head_` buffer. However this might lead to double-freeing buffers since in `~NodeBIO()` we're starting deallocation from `head_` buffer.
-