1. Oct 30, 2013
    • Scott Blomquist's avatar
      win: fix ObjectWrap for latest v8 · 7a7101ac
      Scott Blomquist authored
      We need to keep ObjectWrap around for module authors (we think), but
      v8 3.21 broke node_object_wrap.h with respect to MSVC. Coincidentally,
      we no longer use ObjectWrap at all in core, and native modules might
      as well use their own entirely internal implementation if they need it.
      7a7101ac
    • Scott Blomquist's avatar
      src: Remove unused refs to node_object_wrap.h · c137e3d2
      Scott Blomquist authored
      Turns out that we don't use node_object_wrap.h any more in core,
      and, with v8 3.21, it's breaking our Windows build. Removing refs
      to it everywhere (and adding node.h in one case where it was the
      only way node.h was being included), we have restored the Windows
      build.
      c137e3d2
  2. Oct 29, 2013
  3. Oct 28, 2013
    • isaacs's avatar
      vm: Copy missing properties from context · 3c5ea410
      isaacs authored
      This addresses a current shortcoming of the V8 SetNamedPropertyHandler
      function.
      
      It does not provide a way to intercept Object.defineProperty(..) calls.
      As a result, these properties are not copied onto the contextified
      sandbox when a new global property is added via either a function
      declaration or a Object.defineProperty(global, ...) call.
      
      Note that any function declarations or Object.defineProperty() globals
      that are created asynchronously (in a setTimeout, callback, etc.) will
      happen AFTER the call to copy properties, and thus not be caught.
      
      The way to properly fix this is to add some sort of a
      Object::SetNamedDefinePropertyHandler() function that takes a callback,
      which receives the property name and property descriptor as arguments.
      
      Luckily, such situations are rare, and asynchronously-added globals
      weren't supported by Node's VM module until 0.12 anyway.  But, this
      should be fixed properly in V8, and this copy function should be removed
      once there is a better way.
      
      Fix #6416
      3c5ea410
    • Ben Noordhuis's avatar
      http: remove MethodToString() · 4c0195e0
      Ben Noordhuis authored
      The list of supported HTTP methods is available in JS land now so there
      is no longer any need to pass a stringified version of the method to the
      parser callback, it can look up the method name for itself.
      
      Saves a call to v8::Eternal::Get() in the common case and a costly
      v8::String::NewFromOneByte() in the uncommon case.
      4c0195e0
    • Ben Noordhuis's avatar
      http: expose supported methods · 61002285
      Ben Noordhuis authored
      Expose the list of supported HTTP methods as a property on the 'http'
      module object.
      
      Fixes #6422.
      61002285
    • Phillip Alexander's avatar
      977c54ad
  4. Oct 27, 2013
    • Ryan Graham's avatar
      doc: improve module documentation · 5ac6f4de
      Ryan Graham authored
      Expands on when to use module.exports vs. exports. This is a recurring
      question on mailing list and continues to confuse new devs.
      5ac6f4de
  5. Oct 26, 2013
  6. Oct 25, 2013
  7. Oct 24, 2013
    • Ben Noordhuis's avatar
      build: fix test-gc weakref build rule · 808a9684
      Ben Noordhuis authored
      Make the build rule depend on the build artifact (weakref.node) itself
      rather than the directory it's built in.  Depending on the directory
      means that a build failure won't trigger a rebuild on the next
      invocation because the directory's timestamp has been updated.
      
      This is a back-port of commit 11895717 from the master branch that
      hopefully fixes the following CI error:
      
          executing:  make test/gc/node_modules/weak/build/
          make: *** No rule to make target `test/gc/node_modules/weak/build/'.
          Command exited with non-zero: make test/gc/node_modules/weak/build/
          Build step 'Execute NodeJS script' marked build as failure
      808a9684
    • Zarko Stankovic's avatar
      doc: add nodejs.rs to the community page · eb291de0
      Zarko Stankovic authored
      eb291de0
    • isaacs's avatar
      http client: pull last chunk on socket close · f153d6da
      isaacs authored
      When the socket closes, the client's http incoming message object was
      emitting an 'aborted' event if it had not yet been ended.
      
      However, it's possible, when a response is being repeatedly paused and
      resumed (eg, if piped to a slow FS write stream), that there will be a
      final chunk remaining in the js-land buffer when the socket is torn
      down.
      
      When that happens, the socketCloseListener function detects that we have
      not yet reached the end of the response message data, and treats this as
      an abrupt abort, immediately (and forcibly) ending the incoming message
      data stream, and discarding that final chunk of data.
      
      The result is that, for example, npm will have problems because tarballs
      are missing a few bytes off the end, every time.
      
      Closes GH-6402
      f153d6da
    • Ben Noordhuis's avatar
      0079e575
    • Ben Noordhuis's avatar
      build: fix test-gc weakref build rule · 11895717
      Ben Noordhuis authored
      Make the build rule depend on the build artifact (weakref.node) itself
      rather than the directory it's built in.  Depending on the directory
      means that a build failure won't trigger a rebuild on the next
      invocation because the directory's timestamp has been updated.
      11895717
    • Ben Noordhuis's avatar
      src: update after v8 api changes · ef4a35bc
      Ben Noordhuis authored
      ef4a35bc
    • Timothy J Fontaine's avatar
      v8: upgrade 3.21.18.3 · a53c763c
      Timothy J Fontaine authored
      a53c763c
  8. Oct 23, 2013
  9. Oct 19, 2013
  10. Oct 17, 2013
    • Patrik Stutz's avatar
      http: add statusMessage · 54910044
      Patrik Stutz authored
      Now the status message can be set via req.statusMessage = 'msg';
      54910044
    • isaacs's avatar
      http: provide backpressure for pipeline flood · b97c28f5
      isaacs authored
      If a client sends a lot more pipelined requests than we can handle, then
      we need to provide backpressure so that the client knows to back off.
      Do this by pausing both the stream and the parser itself when the
      responses are not being read by the downstream client.
      
      Backport of 085dd30e
      b97c28f5
    • Timothy J Fontaine's avatar
      f051b891
    • Sam Roberts's avatar
      doc: cluster documentation cleanup and corrections · 2e160372
      Sam Roberts authored
      - fixed some incomprehensible wording ("event assigned to..."?)
      - removed undocumented and unnecessary process properties from example
      - corrected the docs on the default for the exec setting
      - described when workers are removed from cluster.workers
      - described addressType, which was documented as existing, but not what
        values it might have
      - spell out more clearly the limitations of setupMaster
      - describe disconnect in sufficient detail that why a child does or does
        not exit can be understood
      - clarify which cluster functions and events are available on process or
        just on the worker, as well as which are not available in children,
      - don't describe events as the same, when they have receive different
        arguments
      - fix misleading disconnect example: since disconnect already calls
        close on all servers, doing it again in the example is a no-op, not
        the "force close" it was claimed to be
      - document the error event, not catching it will kill your node
      - describe suicide better, it is important, and a bit unintuitive
        (process.exit() is not suicide?)
      - use worker consistently throughout, instead of child.
      2e160372
    • Sam Roberts's avatar
      doc: child_process corrections and cleanups · ed186c97
      Sam Roberts authored
      - Make explicit that .disconnected is set before the disconnect event,
        and it is not allowed to send messages after calling .disconnect(),
        even while waiting for a delayed disconect event.
      - Remove obsolete claim that explicit exit is required
      - Describe silent: in the options for fork()
      - Describe .connected as the property it is, not just as an aside in
        the disconnect() method
      ed186c97
    • Fedor Indutny's avatar
      cpplint: disallow if one-liners · 2bc30f23
      Fedor Indutny authored
      2bc30f23
    • Fedor Indutny's avatar
      cpplint: disallow comma-first in C++ · 7063c59b
      Fedor Indutny authored
      7063c59b
    • Ben Noordhuis's avatar
      dns: set hostname property on error object · a2d1cbef
      Ben Noordhuis authored
      Make debugging and logging easier: when a DNS lookup for a hostname
      fails, set the hostname as a property on the error object.
      
      Fixes #5393.
      a2d1cbef