Switch branches/tags
Commits on Sep 4, 2013
  1. 2013.08.21, Version 0.11.7 (Unstable)

    * uv: upgrade to v0.11.13
    * v8: upgrade to 3.20.17
    * buffer: adhere to INSPECT_MAX_BYTES (Timothy J Fontaine)
    * buffer: fix regression for large buffer creation (Trevor Norris)
    * buffer: don't throw if slice length too long (Trevor Norris)
    * buffer: Buffer(buf) constructor copies into the proper buffer (Ben Noordhuis)
    * cli: remove --max-stack-size (Ben Noordhuis)
    * cli: unknown command line options are errors (Ben Noordhuis)
    * child_process: exec accept buffer as an encoding (Seth Fitzsimmons)
    * crypto: make randomBytes/pbkdf2 callbacks domain aware (Ben Noordhuis)
    * domain: deprecate domain.dispose(). (Forrest L Norvell)
    * fs: Expose birthtime on stat objects (isaacs)
    * http: Only send connection:keep-alive if necessary (isaacs)
    * repl: Catch syntax errors better (isaacs, Nathan Rajlich)
    * stream: change default highWaterMark for objectMode to 16 (Mathias Buus)
    * stream: make setEncoding/pause/resume chainable (Julian Gruber, isaacs)
    * util: pass opts to custom inspect functions (Timothy J Fontaine)
    * vm: rewritten to behave like Contextify (Domenic Denicola)
    tjfontaine committed Sep 4, 2013
  2. http: Only send connection:keep-alive if necessary

    In cases where the Agent has maxSockets=Infinity, and
    keepAlive=false, there's no case where we won't immediately close the
    connection after the response is completed.
    Since we're going to close it anyway, send a `connection:close` header
    rather than a `connection:keep-alive` header.  Still send the
    `connection:keep-alive` if the agent will actually reuse the socket,
    Closes #5838
    isaacs committed Aug 18, 2013
  3. repl: Simplify paren wrap, continuation-detection

    This simplifies the logic that was in isSyntaxError, as well as the
    choice to wrap command input in parens to coerce to an expression
    1. Rather than a growing blacklist of allowed-to-throw syntax errors,
    just sniff for the one we really care about ("Unexpected end of input")
    and let all the others pass through.
    2. Wrapping {a:1} in parens makes sense, because blocks and line labels
    are silly and confusing and should not be in JavaScript at all.
    However, wrapping functions and other types of programs in parens is
    weird and required yet *more* hacking to work around.  By only wrapping
    statements that start with { and end with }, we can handle the confusing
    use-case, without having to then do extra work for functions and other
    This also fixes the repl wart where `console.log)(` works in the repl,
    but only by virtue of the fact that it's wrapped in parens first, as
    well as potential side effects of double-running the commands, such as:
        > x = 1
        > eval('x++; throw new SyntaxError("e")')
        ... ^C
        > x
    isaacs committed Aug 29, 2013
  4. repl: treat "Assignment to const" as syntax error

    Adding a new `repl-harmony` test file here because adding the
    `--use_strict --harmony` flags on the main repl test file was causing
    lots of unrelated failures, due to global variable assignments and
    things like that. This new test file is based off of the original
    repl.js test file, but has a lot of the tests stripped out. A test case
    for this commit is included though.
    Fixes #6132.
    TooTallNate committed with isaacs Aug 27, 2013
  5. repl: Catch syntax errors better

    Replace the growing list of 'isSyntaxError' whackamole conditions with a
    smarter approach.  This creates a vm Script object *first*, which will
    parse the code and raise a SyntaxError right away.
    We still do need the test function, but only because strict mode syntax
    errors are not recoverable, and should be raised right away.  Really, we
    should probably *only* continue on "unexpected end of input" SyntaxErrors.
    Also fixes a very difficult-to-test nit where the '...' indentation is
    not properly cleared when you ^C out of a syntax error.
    Closes #6093
    isaacs committed Aug 28, 2013
  6. uv: upgrade to v0.11.13

    This commit changes src/ and src/ just enough to
    get by (i.e. to compile and function correctly.)
    The new libuv API allows for more cleanup and deduplication but I'm
    saving that for another day.
    bnoordhuis committed Sep 4, 2013
  7. build: remove unused Carbon dependency

    Libuv as of joyent/libuv@d48168a no longer has link-time dependencies
    on the Carbon framework or any other frameworks.
    bnoordhuis committed Sep 4, 2013
Commits on Sep 3, 2013
  1. string_bytes: use extern for length and write utf8

    If the string is external then the length can be quickly retrieved. This
    is especially faster for large strings that are being treated as UTF8.
    Also, if the string is external then there's no need for a full
    String::WriteUtf8 operation. A simple memcpy will do.
    trevnorris committed Sep 3, 2013
  2. process: Add internal _rawDebug() method

    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.
    isaacs committed Aug 21, 2013
  3. src: Remove outdated comment re assert()

    It's a normal function now, not a macro.
    isaacs committed Aug 21, 2013
Commits on Sep 2, 2013
  1. uv: upgrade to v0.11.12

    * upgrade deps/uv/ to v0.11.12.
    * update files in src/ after a libuv API change.
    bnoordhuis committed Sep 2, 2013
  2. src: clean up CLI argument parser

    * 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.
    bnoordhuis committed Sep 2, 2013
  3. test: don't use --max-stack-size=0

    --max-stack-size was removed in 3a87b31, use --stack-size instead.
    What's more, a zero length stack will likely crash the process.
    bnoordhuis committed Sep 2, 2013
Commits on Sep 1, 2013
  1. test: speed up simple/test-fs-watch

    Don't wait a full second before starting the watcher, 10 ms ought to be
    more than enough time.  Reduces running time from 1250 ms to 250 ms on
    my system.
    bnoordhuis committed Sep 1, 2013
  2. benchmark: Fix execArgv handling

    Bug in 01f3b46 causes the same benchmark to be run repeatedly.
    Not so useful for the compare scripts.
    isaacs committed Sep 1, 2013
Commits on Aug 31, 2013
  1. benchmark: Support passing v8 flags to benchmarks

    The better to test --use-strict effects on performance.
    (Spoiler: it has no measurable effect on performance.)
    isaacs committed Aug 31, 2013
Commits on Aug 30, 2013
  1. Revert "src: call uv_loop_delete() on exit in debug mode"

    Don't call uv_loop_delete() until we've figured out a way to gracefully
    close open handles.  See also commit 4915884 and its subsequent revert
    in commit 980cbd5.
    This reverts commit 556b890.
    bnoordhuis committed Aug 30, 2013
  2. Revert "src: close libuv handles on exit"

    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 4915884.
    bnoordhuis committed Aug 30, 2013
  3. test: move smalloc segfault tests to pummel

    These tests take a while to complete, and the issue only potentially
    appears under heavy load.
    trevnorris committed Aug 30, 2013
  4. src: close libuv handles on exit

    Commit 556b890 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
    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.
    bnoordhuis committed Aug 29, 2013
Commits on Aug 29, 2013
  1. uv: upgrade to v0.11.11

    piscisaureus committed Aug 29, 2013
  2. crypto: remove NodeBIO::GetMethod()

    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.
    bnoordhuis committed Aug 29, 2013
  3. crypto: make root_cert_store variable extern

    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.
    bnoordhuis committed Aug 29, 2013
  4. crypto: make error buffer non-static

    Doesn't matter now but it will if/when we have support for multiple
    bnoordhuis committed Aug 29, 2013
  5. vm: document vm2's changes.

    - 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
    - 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.
    domenic committed with isaacs Aug 24, 2013
  6. vm: update API to use options argument

    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.
    domenic committed with isaacs Aug 24, 2013
Commits on Aug 28, 2013
  1. timer_wrap: always update loop time

    In `` 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.
    tjfontaine committed Aug 28, 2013
  2. Merge remote-tracking branch 'ry/v0.10'

    isaacs committed Aug 28, 2013