1. Sep 03, 2013
    • isaacs's avatar
      process: Add internal _rawDebug() method · 906a175a
      isaacs authored
      This is useful when we need to push some debugging messages out to
      stderr, without going through the Writable class, or triggering any kind
      of nextTick or callback behavior.
      906a175a
    • isaacs's avatar
      src: Remove outdated comment re assert() · cb53cfd8
      isaacs authored
      It's a normal function now, not a macro.
      cb53cfd8
    • Ben Noordhuis's avatar
      uv: upgrade to v0.11.12 · ed8d97f5
      Ben Noordhuis authored
      * upgrade deps/uv/ to v0.11.12.
      * update files in src/ after a libuv API change.
      ed8d97f5
    • Ben Noordhuis's avatar
      src: clean up CLI argument parser · 185c515c
      Ben Noordhuis authored
      * Exit with an error message when the option is not a node or V8 option.
      
      * Remove the option_end_index global.  Needs to happen anyway for
        the multi-context work, might as well land it in master now.
      
      * Add a smidgen of const-correctness.
      
      * Pay off a few years of accrued technical debt.
      185c515c
    • Ben Noordhuis's avatar
      test: don't use --max-stack-size=0 · d6fb764c
      Ben Noordhuis authored
      --max-stack-size was removed in 3a87b31b, use --stack-size instead.
      What's more, a zero length stack will likely crash the process.
      d6fb764c
  2. Sep 01, 2013
  3. Aug 31, 2013
    • Ben Noordhuis's avatar
      Revert "src: call uv_loop_delete() on exit in debug mode" · 10ccbd50
      Ben Noordhuis authored
      Don't call uv_loop_delete() until we've figured out a way to gracefully
      close open handles.  See also commit 4915884d and its subsequent revert
      in commit 980cbd5.
      
      This reverts commit 556b890a.
      10ccbd50
    • Ben Noordhuis's avatar
      Revert "src: close libuv handles on exit" · bbed881e
      Ben Noordhuis authored
      This change is not entirely ready for prime time: it's making ~50 tests
      fail on Windows, mostly due to timeouts.  It's up for debate who is
      at fault here: node.js or libuv.
      
      It does however expose a libuv bug on OS X, where the event loop
      sometimes gets stuck in uv__io_poll() when there is a single
      UV_SHUTDOWN request left in the queue.  Needs further investigation.
      
      This reverts commit 4915884d.
      bbed881e
    • Trevor Norris's avatar
      test: move smalloc segfault tests to pummel · 8a272cab
      Trevor Norris authored
      These tests take a while to complete, and the issue only potentially
      appears under heavy load.
      8a272cab
    • Ben Noordhuis's avatar
      src: close libuv handles on exit · 4915884d
      Ben Noordhuis authored
      Commit 556b890a added a call to uv_loop_delete() with the intent of
      catching handle lifecycle bugs.  It worked because it exposed one:
      
          process.on('exit', function() {
            console.log('bye');  // Asserts.
          });
      
      When run, it asserts with the following message:
      
          Assertion failed: (!uv__has_active_reqs(loop)), function
          uv__loop_delete, file ../deps/uv/src/unix/loop.c, line 150.
      
      That's because libuv as of joyent/libuv@3f2d4d5 checks that there are
      no in-flight requests when the event loop is destroyed.  In the test
      case above, the write request for the string hasn't completed yet by
      the time node.js exits: the string itself has most likely been written
      but libuv hasn't had the opportunity to return the write request to
      node.js.
      
      That's why this commit adds a cleanup step right before exit where it
      explicitly closes all open handles, then waits until the event loop
      exits naturally.
      
      Named pipes (UNIX domain sockets) are shut down first in order to flush
      pending write requests.  Should go some way towards fixing the Windows
      issue where output on stdout/stderr sometimes gets truncated.
      
      Fixes joyent/libuv#911.
      4915884d
  4. Aug 29, 2013
    • Bert Belder's avatar
      uv: upgrade to v0.11.11 · e83a0cd0
      Bert Belder authored
      e83a0cd0
    • Ben Noordhuis's avatar
      a9eb96d0
    • Ben Noordhuis's avatar
      crypto: remove NodeBIO::GetMethod() · 653f62a7
      Ben Noordhuis authored
      Remove NodeBIO::GetMethod() and replace calls to BIO_new() with calls
      to the new NodeBIO::New() function.
      
      This commit basically reshuffles some code in order to make it explicit
      that the NodeBIO BIO_METHOD is const.
      653f62a7
    • Ben Noordhuis's avatar
      crypto: make root_cert_store variable extern · 8e596c4e
      Ben Noordhuis authored
      Before this commit it was declared static (in a header file!), meaning
      it got duplicated in every file that includes it.
      
      A few duplicated pointers is not the end of the world but it introduces
      a lot of potential for confusion because root_cert_store in file A is
      not the root_cert_store in file B.
      
      Moral of the story: don't declare static variables in header files.
      8e596c4e
    • Ben Noordhuis's avatar
      crypto: remove misleading comment · 21911db3
      Ben Noordhuis authored
      21911db3
    • Ben Noordhuis's avatar
      crypto: make error buffer non-static · 699f636d
      Ben Noordhuis authored
      Doesn't matter now but it will if/when we have support for multiple
      threads.
      699f636d
    • Domenic Denicola's avatar
      vm: document vm2's changes. · 02fde585
      Domenic Denicola authored
      - The caveats no longer apply.
      - Document options arguments, including `displayErrors` and the
        different things it means in each place.
      - Re-did examples to be more on point, e.g. `runInContext` example
        runs multiple scripts in the same context.
      - Documented how `vm.createContext`s meaning has substantially changed,
        and is now more of a "contextifier" than a "creator."
      - Reordered vm functions to be readable in order; the concept of
        contextifying needs to come before `runInContext` and
        `runInNewContext`.
      - Documented new `vm.isContext`.
      - Documented the `vm.Script` constructor, instead of `createScript`,
        since factory methods are silly and we wanted to document the class's
        methods anyway.
      - Documented `script.runInContext`.
      - Change stability to stable, if I may be so bold.
      02fde585
    • Domenic Denicola's avatar
      vm: update API to use options argument · fd365761
      Domenic Denicola authored
      Passing a filename is still supported in place of certain options
      arguments, for backward-compatibility, but timeout and display-errors
      are not translated since those were undocumented.
      
      Also managed to eliminate an extra stack trace line by not calling
      through the `createScript` export.
      
      Added a few message tests to show how `displayErrors` works.
      fd365761
    • Bert Belder's avatar
      de7d698d
    • Timothy J Fontaine's avatar
      timer_wrap: Timer.now always update loop time · 93b06246
      Timothy J Fontaine authored
      In `Timer.now` always update the loop time by calling uv_update_time.
      Previously we were trying to cache the loop time to prevent extra
      syscalls. While a noble goal, it can cause timers to fire early in
      certain circumstances. Especially seen in cpu bound work loads or work
      loads with synchronous file operations.
      93b06246
    • isaacs's avatar
      Merge remote-tracking branch 'ry/v0.10' · 96358613
      isaacs authored
      Conflicts:
      	AUTHORS
      	ChangeLog
      	deps/uv/ChangeLog
      	deps/uv/include/uv-darwin.h
      	deps/uv/src/unix/darwin.c
      	deps/uv/src/unix/fsevents.c
      	deps/uv/src/version.c
      	lib/_stream_writable.js
      	src/node_version.h
      96358613
    • isaacs's avatar
      stream: check _events before _events.error · fbb963b5
      isaacs authored
      This fixes the regression introduced by 54580791, which breaks the
      net/net-pipe benchmark script.
      
      Closes #6145
      fbb963b5
  5. Aug 28, 2013