- Aug 15, 2013
-
-
Ben Noordhuis authored
Seems to have escaped the Eye of Sauron^WFedor in commit 8e29ce9f.
-
Fedor Indutny authored
Fix sudden uncatchable ECONNRESETs, when using https server.
-
Ben Noordhuis authored
Use array indices rather than named properties to store callbacks on the HTTPParser object. Speeds up the http benchmarks by a few percent.
-
Ben Noordhuis authored
Don't lazy-init the oncomplete symbol string in the After() function, it has already been created at module init time.
-
- Aug 13, 2013
-
-
Ben Noordhuis authored
Move the 'free FSReqWrap data?' logic into the class itself.
-
Ben Noordhuis authored
FSReqWrap is the only ReqWrap child class that uses the data_ field so move it out of ReqWrap and into FSReqWrap.
-
Matthias Bartelmeß authored
-
Ben Noordhuis authored
We use `Foo:Unwrap(args.This())` everywhere else, let's use the same idiom for Connection::Unwrap().
-
Ben Noordhuis authored
Code cleanup: don't call a Connection object `p` in some places, `c` in other places and `ss` in yet other places. Let's just call it `conn`. This also fixes about a million style errors in one fell swoop.
-
Trevor Norris authored
Previous check failed for the edge case Object.create(null). This uses the current v8 code for the check.
-
Ben Noordhuis authored
-
Trevor Norris authored
WRAP is too generic a macro name and causes the build to fail from conflicts. They have been prepended with NODE_.
-
Ben Noordhuis authored
Don't create an Integer when setting a numeric index on an object or an array, use the version of v8::Object::Set() that takes an uint32_t. Change the types of the variables from int to uint32_t and clean up some code consistency issues while we're here.
-
Trevor Norris authored
While almost all cases were handled by simple WRAP/UNWRAP macros, this extends those to cover all known occurrences.
-
Ben Noordhuis authored
Hasn't been used in ages. Also remove its (already disabled) test.
-
Ben Noordhuis authored
Don't set the oncomplete property in src/cares_wrap.cc, we can do it just as easily in lib/dns.js. Switch two closures to the 'function with _this_ object' model. Makes it impossible for an overzealous closure to capture too much context and accidentally hold on to too much memory.
-
- Aug 12, 2013
-
-
Ben Noordhuis authored
* The test calls an internal API that changed in commit ca9eb718. * Trying to reverse-lookup a bogus hostname now returns EINVAL rather than the (bogus!) status code ENOTIMP.
-
- Aug 11, 2013
-
-
Ben Noordhuis authored
Use v8::Integer::NewFromUnsigned() when updating the writeQueueSize field. Before this commit, it used v8::Integer::New() but that takes an int32_t. It's unlikely for a write queue to grow beyond 2**31-1 bytes but let's use the unsigned integer constructor anyway, just in case.
-
- Aug 10, 2013
-
-
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/ Note: the patch has been accepted upstream but hasn't made its way into a stable release yet. -
Ben Noordhuis authored
-
Ben Noordhuis authored
No one in this day and age should be using SSLv2 so disable it by default. You can re-enable it with `./configure --with-sslv2` but there really should be no reason for that.
-
Ben Noordhuis authored
* Use single quotes consistently. * Remove a few stray semicolons. * Fix up some overly long lines. * Line up a few expressions.
-
Ben Noordhuis authored
Alphabetical order should make it easier to find the switches you need because we've got quite a lot of them now. Keep --prefix at the top because that's arguably the one people will be looking for most.
-
Ben Noordhuis authored
Compiling with `make V=1` (which is the default) now runs ninja in verbose mode. To disable, run `make V=`.
-
Ben Noordhuis authored
Don't run configure when the configure script has been touched. Doing so would be okay if the Makefile passed the original arguments to configure but it doesn't - it runs configure without any arguments, effectively destroying the current configuration. Remove this misfeature and instead print an error message telling the user to (re-)run configure.
-
Trevor Norris authored
Change process.domain to use a getter/setter and access that property via an array index. These are much faster to get from c++, and it can be passed to _setupDomainUse and stored as a Persistent<Array>. InDomain() and GetDomain() as trivial ways to access the domain information in the native layer. Important because we'll be able to quickly access if a domain is active. Instead of just whether the domain module has been loaded.
-
Trevor Norris authored
It's ridiculously cheap to check if process.domain is set. Don't bother cluttering the code.
-
- Aug 09, 2013
-
-
Ben Noordhuis authored
Don't use v8::Object::SetHiddenValue() to keep a reference alive to the buffer, we can just as easily do that from JS land and it's a lot faster to boot. Because the buffer is now a visible property of the write request object, it's essential that we do *not* log it - we'd be effectively serializing the whole buffer to a pretty-printed string.
-
Ben Noordhuis authored
-
- Aug 10, 2013
-
-
Ben Noordhuis authored
The TWO_BYTE_BUFFER macro never made it into the final version of the patch that got landed in commit f674b09f.
-
Ben Noordhuis authored
Speed up dgram.Socket#send()-heavy code a little by omitting the call into JS land when the user doesn't pass us a completion callback.
-
- Aug 09, 2013
-
-
Ben Noordhuis authored
v0.10 allows strings for the offset, length and port arguments to dgram.send() and dgram.sendto() but master before this commit would abort with the following assert: node: ../../src/udp_wrap.cc:227: static void node::UDPWrap::DoSend(const v8::FunctionCallbackInfo<v8::Value>&, int): Assertion `args[2]->IsUint32()' failed. Go beyond what v0.10 does and also add range checks: offset and length should be >= 0, port should be between 1 and 65535. That particular change needs to be back-ported to v0.10 because passing a negative offset or length number aborts with the following assertions: node: ../../src/udp_wrap.cc:264: static v8::Handle<v8::Value> node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion `offset < Buffer::Length(buffer_obj)' failed. Or: node: ../../src/udp_wrap.cc:265: static v8::Handle<v8::Value> node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion `length <= Buffer::Length(buffer_obj) - offset' failed. Interestingly enough, a negative port number is accepted in v0.10 but is silently ignored. This commit exposed a bug in the simple/test-dgram-close test which has also been fixed. -
Ben Noordhuis authored
* Change calls to String::New() and String::NewSymbol() to their respective one-byte, two-byte and UTF-8 counterparts. * Add a FIXED_ONE_BYTE_STRING macro that takes a string literal and turns it into a v8::Local<v8::String>. * Add helper functions that make v8::String::NewFromOneByte() easier to work with. Said function expects a `const uint8_t*` but almost every call site deals with `const char*` or `const unsigned char*`. Helps us avoid doing reinterpret_casts all over the place. * Code that handles file system paths keeps using UTF-8 for backwards compatibility reasons. At least now the use of UTF-8 is explicit. * Remove v8::String::NewSymbol() entirely. Almost all call sites were effectively minor de-optimizations. If you create a string only once, there is no point in making it a symbol. If you are create the same string repeatedly, it should probably be cached in a persistent handle.
-
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.
-