1. Aug 20, 2013
    • isaacs's avatar
      Merge remote-tracking branch 'ry/v0.10' · fe0f12b1
      isaacs authored
      fe0f12b1
    • Trevor Norris's avatar
      buffer: lint · f97a1267
      Trevor Norris authored
      This and b80d11d4 are my fault. An unrelated test was failing, which
      prevents {js,cpp}lint from running automatically.
      f97a1267
    • Fedor Indutny's avatar
      buffer: lint · b80d11d4
      Fedor Indutny authored
      b80d11d4
    • Fedor Indutny's avatar
      crypto: don't touch ssl_ in Connection · 306f8634
      Fedor Indutny authored
      `ssl_` is a property of SSLWrap class, don't touch it, and definitely
      don't zero it in constructor.
      306f8634
    • isaacs's avatar
      stream: Throw on 'error' if listeners removed · 54580791
      isaacs authored
      In this situation:
      
          writable.on('error', handler);
          readable.pipe(writable);
          writable.removeListener('error', handler);
          writable.emit('error', new Error('boom'));
      
      there is actually no error handler, but it doesn't throw, because of the
      fix for stream.once('error', handler), in 23d92ec8.
      
      Note that simply reverting that change is not valid either, because
      otherwise this will emit twice, being handled the first time, and then
      throwing the second:
      
          writable.once('error', handler);
          readable.pipe(writable);
          writable.emit('error', new Error('boom'));
      
      Fix this with a horrible hack to make the stream pipe onerror handler
      added before any other userland handlers, so that our handler is not
      affected by adding or removing any userland handlers.
      
      Closes #6007.
      54580791
  2. Aug 19, 2013
    • Fedor Indutny's avatar
      tls, crypto: deduplicate code · b9a0eb06
      Fedor Indutny authored
      Commit 03e008dd introduced src/tls_wrap.cc and src/tls_wrap.h but
      said files copied on the order of 1 kLoC from src/node_crypto.cc
      and src/node_crypto.h.  This commit undoes some of the duplication.
      
      Fixes #6024.
      b9a0eb06
    • Ben Noordhuis's avatar
      src: move includes inside include guard · 3e25ed90
      Ben Noordhuis authored
      Having the includes in src/node_buffer.h outside of the include guard
      is not really harmful but it's inconsistent with other header files.
      3e25ed90
  3. Aug 18, 2013
  4. Aug 17, 2013
    • Ben Noordhuis's avatar
      dgram: fix assertion on bad send() arguments · 0c2960ef
      Ben Noordhuis authored
      Add range checks for the offset, length and port arguments to
      dgram.Socket#send().  Fixes the following assertion:
      
          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.
      
      And:
      
          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 was accepted until now but
      silently ignored.  (In other words, it would send the datagram to a
      random port.)
      
      This commit exposed a bug in the simple/test-dgram-close test which
      has also been fixed.
      
      This is a back-port of commit 41ec6d05 from the master branch.
      
      Fixes #6025.
      0c2960ef
    • Daniel Chatfield's avatar
      readline: pause stdin before turning off terminal raw mode · 5453619e
      Daniel Chatfield authored
      On windows, libuv will immediately make a `ReadConsole` call (in the
      thread pool) when a 'flowing' `uv_tty_t` handle is switched to
      line-buffered mode. That causes an immediate issue for some users,
      since libuv can't cancel the `ReadConsole` operation on Windows 8 /
      Server 2012 and up if the program switches back to raw mode later.
      
      But even if this will be fixed in libuv at some point, it's better to
      avoid the overhead of starting work in the thread pool and immediately
      cancelling it afther that.
      
      See also f34f1e30, where the same change is made for the opposite
      flow, e.g. move `resume()` after `_setRawMode(true)`.
      
      Fixes #5927
      
      This is a backport of dfb0461c (see #5930) to the v0.10 branch.
      5453619e
    • Daniel Chatfield's avatar
      readline: pause stdin before turning off terminal raw mode · dfb0461c
      Daniel Chatfield authored
      On windows, libuv will immediately make a `ReadConsole` call (in the
      thread pool) when a 'flowing' `uv_tty_t` handle is switched to
      line-buffered mode. That causes an immediate issue for some users,
      since libuv can't cancel the `ReadConsole` operation on Windows 8 /
      Server 2012 and up if the program switches back to raw mode later.
      
      But even if this will be fixed in libuv at some point, it's better to
      avoid the overhead of starting work in the thread pool and immediately
      cancelling it afther that.
      
      See also f34f1e30, where the same change is made for the opposite
      flow, e.g. move `resume()` after `_setRawMode(true)`.
      
      Fixes #5927
      Closes #5930
      dfb0461c
    • isaacs's avatar
      blog: v0.10.16 · a66d2400
      isaacs authored
      a66d2400
    • isaacs's avatar
      Now working on v0.10.17 · 0e043528
      isaacs authored
      0e043528
    • isaacs's avatar
      Merge branch 'v0.10.16-release' into v0.10 · e679739b
      isaacs authored
      e679739b
    • Trevor Norris's avatar
      buffer: don't call ByteLength for simple encodings · 2dd4a745
      Trevor Norris authored
      For several encodings the byte length is simple arithmetic. Don't call
      into C++ in those cases.
      2dd4a745
  5. Aug 16, 2013
  6. Aug 15, 2013