1. Jul 25, 2013
  2. Jul 24, 2013
    • Trevor Norris's avatar
      buffer: misc logic simplification · 8ce02cf0
      Trevor Norris authored
      Includes:
      * No need for `typeof` when checking undefined.
      * length is coerced to uint so no need to check if < 0.
      * Stay consistent and always throw `new` errors.
      * Returning offset + magic number in every write is error prone. Instead
        return the central write function which returns the correct offset.
      8ce02cf0
    • Trevor Norris's avatar
      buffer: revert length and parent check · d74932e5
      Trevor Norris authored
      In a rush to implement the fix 35e0d60d I overlooked the logic that
      causes 0-length buffer instantiation to automatically not assign the
      parent regardless.
      d74932e5
  3. Jul 23, 2013
    • David Björklund's avatar
      d904c231
    • Trevor Norris's avatar
      buffer: slice on zero length buffer · 35e0d60d
      Trevor Norris authored
      SlowBuffer(0) passes NULL instead of doing malloc(0). So when someone
      attempted to SlowBuffer(0).slice(0, 1) an assert would fail in
      smalloc::SliceOnto.
      
      It's important that the check go where it is because the resulting
      Buffer needs to have external array data allocated. In the case a user
      tries to slice a zero length Buffer it will also have NULL passed as the
      data argument.
      
      Also fixed where the .parent attribute was set for zero length Buffers.
      There is no need to track the source of slice if the slice isn't
      actually occurring.
      35e0d60d
    • isaacs's avatar
      stream: Simplify flowing, passive data listening · 0f8de5e1
      isaacs authored
      Closes #5860
      
      In streams2, there is an "old mode" for compatibility.  Once switched
      into this mode, there is no going back.
      
      With this change, there is a "flowing mode" and a "paused mode".  If you
      add a data listener, then this will start the flow of data.  However,
      hitting the `pause()` method will switch *back* into a non-flowing mode,
      where the `read()` method will pull data out.
      
      Every time `read()` returns a data chunk, it also emits a `data` event.
      In this way, a passive data listener can be added, and the stream passed
      off to some other reader, for use with progress bars and the like.
      
      There is no API change beyond this added flexibility.
      0f8de5e1
    • Wyatt Preul's avatar
      util: removed duplicated isArray check · 5fcd6e40
      Wyatt Preul authored
      5fcd6e40
    • Ben Noordhuis's avatar
      v8: reapply floating patches · e3bb6e11
      Ben Noordhuis authored
      e3bb6e11
    • Trevor Norris's avatar
      src: update v8 build requirements · dfb1191f
      Trevor Norris authored
      In v8 3.20.4 build/common.gypi was moved to build/toolchain.gypi and
      build/features.gypi.
      dfb1191f
    • Trevor Norris's avatar
      v8: upgrade to v8 3.20.7 · 5777d7ab
      Trevor Norris authored
      5777d7ab
  4. Jul 21, 2013
    • Ben Noordhuis's avatar
      src: fix windows build error from 221c689e · 254b7111
      Ben Noordhuis authored
      Just forward declare struct sockaddr, the struct is never actually
      dereferenced in src/node_internals.h.
      
      Before this commit, it included sys/socket.h but that header doesn't
      exist on Windows.
      254b7111
  5. Jul 20, 2013
  6. Jul 18, 2013
  7. Jul 17, 2013
    • isaacs's avatar
      doc: Explain process.nextTick timing · bd5ab9c6
      isaacs authored
      Provide more detailed explanation of the timing of `process.nextTick`
      relative to I/O.
      bd5ab9c6
    • isaacs's avatar
      doc: style the 'type' fields in API docs · 04e0324f
      isaacs authored
      04e0324f
    • isaacs's avatar
      doc: Streams API Doc Rewrite · db5776cf
      isaacs authored
      The Streams API doc is now broken up into 3 sections:
      
      1. API for Consumers
      2. API for Implementors
      3. Details and Extras
      
      This addresses one of the biggest points of confusion for new users who
      start to consume streams, and get the impression that they have to do
      lots of extra work and implement classes and such, just to get some data
      out of a file.
      db5776cf
  8. Jul 16, 2013
    • Trevor Norris's avatar
      smalloc: remove NULL assert check · be940b45
      Trevor Norris authored
      In fa10b757 the assert to check if data == NULL was remove for
      smalloc::Alloc with no callback. It should have also been removed where
      a callback is accepted.
      
      No sense in making sure that length == 0 if data == NULL because devs
      already have to be responsible for checking that length is the same as
      the char* they're passing in.
      be940b45
  9. Jul 15, 2013
  10. Jul 13, 2013
    • Ben Noordhuis's avatar
      src: remove Buffer::Data(Persistent<T>&) · 2c470301
      Ben Noordhuis authored
      It hits a compiler bug in gcc <= 4.4 similar to the issue that was
      recently addressed in commit 157d2bcc:
      
          ../deps/v8/include/v8.h: In function ‘char*
          node::Buffer::Data(v8::Persistent&) [with TypeName = v8::Object]’:
          ../src/node_crypto.cc:1123: instantiated from here
          ../deps/v8/include/v8.h:876: error: ‘class v8::Data’ is not a
          function,
          ../src/node_internals.h:356: error: conflict with ‘template char*
          node::Buffer::Data(v8::Persistent&)’
          ../src/node_internals.h:357: error: in call to ‘Data’
      
      Remove the helper function, it was only used in a couple of places.
      Should fix the build on Ubuntu 10.04.
      
      Fixes #5844.
      2c470301