Commits on Mar 17, 2014
  1. pipe_wrap: use Instantiate() method

    Retrieve a new client object via PipeWrap::Instantiate(). This method
    performs appropriate checks to make sure everything is as it should be.
    trevnorris committed Mar 17, 2014
  2. headers: remove env.h from node_internals.h

    `env.h` is an internal header file and should not be copied or exposed
    to the users.
    Additionally, export convenience `Throw*` methods with `v8::Isolate*` as
    a first argument.
    indutny committed Mar 17, 2014
  3. deps: update v8 to

    indutny committed Mar 17, 2014
Commits on Mar 16, 2014
  1. src: fix tracing infrastructure after v8 upgrade

    Fix up the dtrace/etw/systemtap infrastructure after the V8 upgrade in
    commit 1c7bf24.  The win32 changes are untested but can hardly make
    things worse because node doesn't build on windows right now.
    Fixes #7313 with some luck.
    bnoordhuis committed with indutny Mar 15, 2014
  2. src: don't call DecodeWrite() on Buffers

    Don't call DecodeWrite() with a Buffer as its argument because it in
    turn calls StringBytes::Write() and that method expects a Local<String>.
    "Why then does that function take a Local<Value>?" I hear you ask.
    Good question but I don't have the answer.  I added a CHECK for good
    measure and what do you know, all of a sudden a large number of crypto
    tests started failing.
    Calling DecodeWrite(BINARY) on a buffer is nonsensical anyway: if you
    want the contents of the buffer, just copy out the data, there is no
    need to decode it - and that's exactly what this commit does.
    Fixes a great many instances of the following run-time error in debug
        FATAL ERROR: v8::String::Cast() Could not convert to string
    bnoordhuis committed with indutny Mar 15, 2014
  3. src: fix up smalloc weak persistent usage

    Fix a regression that was introduced in commit ce04c72 after the
    upgrade to V8 3.24.
    The new weak persistent handle API no longer gives you the original
    persistent but still requires that you clear it inside your weak
    Rearrange the code in src/ to keep track of the persistent
    handle with the least amount of pain and try hard to share as much
    code as possible between the 'just free it' and 'invoke my callback'
    versions of the smalloc API.
    Fixes #7309.
    bnoordhuis committed with indutny Mar 15, 2014
  4. src: add CHECK_{GE,GT,LE,LT} macros

    Conform to the Google styleguide more and make cpplint happy, add more
    CHECK macros.
    Preemptively addresses cpplint's readability/check warnings ("Consider
    using CHECK_GT instead of CHECK(a > b)".)
    bnoordhuis committed with indutny Mar 15, 2014
  5. src: deduplicate CHECK_EQ/CHECK_NE macros

    DRY the macros, there is no need to define them twice depending on
    whether NDEBUG is defined or not.
    bnoordhuis committed with indutny Mar 15, 2014
  6. src: fix segfaults, fix 32 bits integer negation

    Make calls to v8::Isolate::AdjustAmountOfExternalAllocatedMemory() take
    special care when negating 32 bits unsigned types like size_t.
    Before this commit, values were negated before they got promoted to
    64 bits, meaning that on 32 bits architectures, a value like 42 got
    cast to 4294967254 instead of -42.
    That in turn made the garbage collector start scavenging like crazy
    because it thought the system was out of memory.
    That's bad enough but calls to AdjustAmountOfExternalAllocatedMemory()
    were made from weak callbacks, i.e. at a time when the garbage collector
    was already busy.  It triggered asserts in debug builds and caused
    random crashes and memory corruption in release builds.
    The behavior in release builds is arguably a V8 bug and should perhaps
    be reported upstream.
    Partially fixes #7309 but requires further bug fixes to src/
    that I'll address in a follow-up commit.
    bnoordhuis committed with indutny Mar 14, 2014
  7. src: squelch -Wmaybe-uninitialized warning

    The variable isn't actually used uninitialized but g++ 4.8 doesn't know
    that.  Set it to NULL to silence the following compiler warning:
        ../src/ warning: 'data' may be used
        uninitialized in this function [-Wmaybe-uninitialized]
             unsigned a = hex2bin(src[i * 2 + 0]);
        ../src/ note: 'data' was declared here
           const char* data;
    bnoordhuis committed with indutny Mar 14, 2014
  8. src: remove unused ExternString constructor

    Remove an unused (and unsafe) constructor.  Unsafe because it doesn't
    initialize the data_ field.
    bnoordhuis committed with indutny Mar 14, 2014
Commits on Mar 13, 2014
  1. src, test: fix up ObjectWrap, `make test-addons`

    V8 was upgraded from 3.22 to 3.24 in commit 1c7bf24.  Upgrade source
    files in test/addons/ and automatically generated tests from
    doc/api/addons.markdown to the new V8 API.
    This coincidentally fixes a bug in src/node_object_wrap.h where it was
    still using the old V8 weak persistent handle interface, which is gone
    in 3.24.
    bnoordhuis committed with indutny Mar 13, 2014
  2. src: update to v8 3.24 APIs

    indutny committed Mar 13, 2014
  3. deps: update v8 to 3.24.40

    indutny committed Mar 13, 2014
Commits on Mar 12, 2014
  1. readline: consider newlines for cursor position

    Fixes #7266.
    Closes #7279.
    yorkie committed with TooTallNate Mar 9, 2014
  2. Now working on 0.11.13

    tjfontaine committed Mar 12, 2014
Commits on Mar 11, 2014
  1. 2014.03.11, Version 0.11.12 (Unstable)

    * uv: Upgrade to v0.11.22 (Timothy J Fontaine)
    * buffer: allow toString to accept Infinity for end (Brian White)
    * child_process: add spawnSync/execSync (Bert Belder, Timothy J Fontaine)
    * cluster: handle bind errors on Windows (Alexis Campailla)
    * contextify: handle infinite recursion errors (Fedor Indutny)
    * crypto: allow custom generator for DiffieHellman (Brian White)
    * crypto: allow setting add'l authenticated data (Brian White)
    * crypto: fix CipherFinal return value check (Brian White)
    * crypto: make NewSessionDoneCb public (Fedor Indutny)
    * dgram: pass the bytes sent to the send callback (Timothy J Fontaine)
    * dns: validate arguments in resolver (Kenan Sulayman)
    * dns: verify argument is valid function in resolve (Kenan Sulayman)
    * http: avoid duplicate keys in writeHead (David Björklund)
    * net: add localPort to connect options (Timothy J Fontaine)
    * node: do not print SyntaxError hints to stderr (Fedor Indutny)
    * node: invoke `beforeExit` again if loop was active (Fedor Indutny)
    * node: make AsyncListenerInst field more explicit (Trevor Norris)
    * os: networkInterfaces include scopeid for ipv6 (Xidorn Quan)
    * process: allow changing `exitCode` in `on('exit')` (Fedor Indutny)
    * readline: fix `line` event, if input emit 'end' (Yazhong Liu)
    * src: add tracing.v8.on('gc') statistics hooks (Ben Noordhuis)
    * src: add v8.getHeapStatistics() function (Ben Noordhuis)
    * src: emit 'beforeExit' event on process object (Ben Noordhuis)
    * src: move AsyncListener from process to tracing (Trevor Norris)
    * tls: fix crash in SNICallback (Fedor Indutny)
    * tls: introduce asynchronous `newSession` (Fedor Indutny)
    * util: show meaningful values for boxed primitives (Nathan Rajlich)
    * vm: don't copy Proxy object from parent context (Ben Noordhuis)
    * windows: make stdout/sterr pipes blocking (Alexis Campailla)
    * zlib: add sync versions for convenience methods (Nikolai Vavilov)
    tjfontaine committed Mar 11, 2014
  2. mdb_v8: update to latest version

     * ::jsstack -v prints function defintion
     * ::jsprint works with objects with only numeric properties
     * update tests to use builtin mdb_v8
     * add more symbols to postmortem script - pending upstream
    bcantrill committed with tjfontaine Mar 11, 2014
  3. src: update from uv_read2_start removal

    Previously if you wanted to be notified of pending handles for pipes
    you needed to use uv_read2_start, however in v0.11.22 you can query for
    pending handles independently.
    tjfontaine committed Mar 11, 2014
  4. uv: Upgrade to v0.11.22

    tjfontaine committed Mar 11, 2014
Commits on Mar 10, 2014
  1. Merge remote-tracking branch 'upstream/v0.10'

    tjfontaine committed Mar 10, 2014
  2. doc: remove an unused arg in process.stdin.

    The argument of process.stdin's readable event handler is not used.
    shuhei committed with tjfontaine Mar 9, 2014
  3. crypto: do not lowercase cipher/hash names

    `crypto.getCiphers()` and `crypto.getHashes()` should prefer lower-case
    variants of names, but should not introduce them.
    fix #7282
    indutny committed Mar 10, 2014
  4. test: timers-ordering should be more precise

    Internally we use hrtime to schedule when a timer will fire, to avoid
    the perils of clock drift or other external operation making time go
    backward. The timers ordering test should use the same timing mechanism
    tjfontaine committed Mar 10, 2014
Commits on Mar 6, 2014
  1. deps: fix v8 valgrind warning

    Fix the following valgrind warning:
        Conditional jump or move depends on uninitialised value(s)
            at 0x7D64E7: v8::internal::GlobalHandles::IterateAllRootsWithClassIds(v8::internal::ObjectVisitor*) (
            by 0x94DCDC: v8::internal::NativeObjectsExplorer::FillRetainedObjects() (
            # etc.
    This was fixed upstream in r12903 and released in 3.15.2 but that commit
    was never back-ported to the 3.14 branch that node.js v0.10 uses.
    The code itself works okay; this commit simply shuffles the clauses in
    an `if` statement to check that the node is in use before checking its
    class id (which is uninitialized if the node is not in use.)
    bnoordhuis committed with indutny Mar 6, 2014
Commits on Mar 5, 2014
  1. child_process: fix sending handle twice

    When sending a socket to a child process via IPC pipe,
    `child_process.js` picks a raw UV handle from `_handle` property, sends
    it, and assigns `null` to the property. Sending the same socket twice
    was resulting in a runtime error, since we weren't handling the empty
    `_handle` case.
    In case of `null` `_handle` we should send just a plain text message
    as passed it was passed to `.send()` and ignore the handle, letting
    users handle such cases themselves instead of throwing the error at
    fix #5469
    indutny committed with tjfontaine Feb 26, 2014