This repository has been archived by the owner. It is now read-only.
Permalink
Switch branches/tags
Commits on Dec 20, 2014
  1. Merge branch 'v0.10' into merge-review2

    trevnorris committed Dec 16, 2014
    Reverted caeb677 for being unable to port the change to deps/v8. The
    change will be ported directly in a later commit.
    
    Conflicts:
    	ChangeLog
    	configure
    	doc/api/child_process.markdown
    	doc/api/tls.markdown
    	doc/api/url.markdown
    	lib/assert.js
    	lib/child_process.js
    	lib/crypto.js
    	lib/dgram.js
    	lib/http.js
    	lib/net.js
    	lib/timers.js
    	lib/tls.js
    	src/node.cc
    	src/node.h
    	src/node.js
    	src/node_crypto.cc
    	src/node_version.h
    	test/common.js
    	test/simple/test-child-process-spawn-typeerror.js
    	tools/certdata.txt
Commits on Dec 15, 2014
  1. src: remove icu_config

    trevnorris committed Dec 15, 2014
    ICU support in v0.12 generates a new icu_config.gypi. This was
    accidentally committed after switching branches. The file has been removed
    and added to .gitignore.
    
    Fixes: 0d05123 "timers: fix unref() memory leak"
  2. build: configure return exit status from gyp

    srl295 authored and Julien Gilli committed Dec 10, 2014
    Previously, 'configure' would not return an exit status
    if gyp blows up. This can be tested via:
    
        date >> node.gyp ; ./configure && echo A-OK
    
    You will get "A-OK" even though gyp had failed.
    
    Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
  3. docs: clarify url.format documentation

    Julien Gilli
    Julien Gilli committed Dec 1, 2014
    The original documentation was slightly confusing. It seemed that the
    list of items described the properties of the urlObj object, while it
    was actually describing the formatting process. This change makes this
    clearer.
    
    Fixes #8796.
    
    Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Commits on Dec 12, 2014
  1. doc: fix typo secureOptions in tls

    silverwind authored and Julien Gilli committed Oct 24, 2014
    Documentation mentioned 'securityOptions', where it should have read
    'secureOptions'.
    
    Fixes #8608.
    
    Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
Commits on Dec 11, 2014
  1. test: add test for spawnSync() env option

    cjihrig authored and trevnorris committed Dec 9, 2014
    PR-URL: #8845
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  2. lib,src: fix spawnSync ignoring its 'env' option

    juamedgod authored and trevnorris committed Oct 14, 2014
    PR-URL: #8546
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Commits on Dec 10, 2014
  1. test: mark more tests as flaky

    orangemocha committed Dec 10, 2014
    Marking these two tests as flaky, since they have been failing
    intermittenly in recent builds:
    test-debug-signal-cluster
    test-cluster-basic
  2. deps: update libuv to 1.0.2

    saghul authored and trevnorris committed Dec 9, 2014
    PR-URL: #8847
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Dec 9, 2014
  1. deps: update libuv to 0.10.30

    saghul authored and trevnorris committed Dec 9, 2014
    PR-URL: #8849
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  2. build: do not generate support for libuv's probes

    Julien Gilli
    Julien Gilli committed Dec 3, 2014
    Dtrace probes were removed from libuv recently, but their usage by node
    was not completely removed, causing build breaks on SmartOS.
    
    Even though the build is working on other platforms, these probes are
    not fired by libuv anymore, so there's no point in using them on these
    platforms too.
    
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Commits on Dec 8, 2014
  1. doc: clearer log messages in net code samples

    pkcs Julien Gilli
    pkcs authored and Julien Gilli committed Nov 23, 2014
    Code examples in documentation for net.createServer and
    net.createConnection contained confusing log messages. This change makes
    them clearer.
    
    Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
Commits on Dec 7, 2014
  1. docs: fix streams example for write() after end()

    a0viedo authored and Julien Gilli committed Dec 6, 2014
    Currently there's an example using http.ServerResponse stream, which
    has a known bug and will not throw an error while writing after end().
    Changed to a writable stream from fs which behaves as expected.
    
    fix #8814
    
    Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
Commits on Dec 5, 2014
  1. doc: fix grammar in tls and timers

    brendanashworth authored and Julien Gilli committed Dec 5, 2014
    Replace 'a' with 'an' where appropriate.
  2. doc: fix grammar and wording in tls and timers

    brendanashworth authored and Julien Gilli committed Oct 19, 2014
    In `tls.markdown`, there was a misuse of 'a' which has been replaced
    with 'an'.
    
    In `timers.markdown`...
      line 31: misuse of 'a', replaced with 'an'
      line 59: unclear wording, haywire 'a', added new comma
  3. doc: mention callback for http res/req write & end

    JacksonTian authored and Julien Gilli committed Dec 2, 2014
    Add documentation for the callback parameter of http.ClientRequest's and
    http.ServerResponse's write and end methods.
  4. uv: float patch to revert tty breakage

    trevnorris committed Dec 5, 2014
    Float libuv/libuv@484a3a9 to fix incorrect
    indentation in REPL.
  5. async-wrap: add event hooks

    trevnorris committed Nov 20, 2014
    Call a user-defined callback at specific points in the lifetime of an
    asynchronous event. Which are on instantiation, just before/after the
    callback has been run.
    
    **If any of these callbacks throws an exception, there is no forgiveness
    or recovery. A message will be displayed and a core file dumped.**
    
    Currently these only tie into AsyncWrap, meaning no call to a hook
    callback will be made for timers or process.nextTick() events. Though
    those will be added in a future commit.
    
    Here are a few notes on how to make the hooks work:
    
    - The "this" of all event hook callbacks is the request object.
    
    - The zero field (kCallInitHook) of the flags object passed to
      setupHooks() must be set != 0 before the init callback will be called.
    
    - kCallInitHook only affects the calling of the init callback. If the
      request object has been run through the create callback it will always
      run the before/after callbacks. Regardless of kCallInitHook.
    
    - In the init callback the property "_asyncQueue" must be attached to
      the request object. e.g.
    
      function initHook() {
        this._asyncQueue = {};
      }
    
    - DO NOT inspect the properties of the object in the init callback.
      Since the object is in the middle of being instantiated there are some
      cases when a getter is not complete, and doing so will cause Node to
      crash.
    
    PR-URL: #8110
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
    Reviewed-by: Fedor Indutny <fedor@indutny.com>
    Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
    Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
  6. async-wrap: explicitly pass parent

    trevnorris committed Nov 17, 2014
    When instantiating a new AsyncWrap allow the parent AsyncWrap to be
    passed. This is useful for cases like TCP incoming connections, so the
    connection can be tied to the server receiving the connection.
    
    Because the current architecture instantiates the *Wrap inside a
    v8::FunctionCallback, the parent pointer is currently wrapped inside a
    new v8::External every time and passed as an argument. This adds ~80ns
    to instantiation time.
    
    A future optimization would be to add the v8::External as the data field
    when creating the v8::FunctionTemplate, change the pointer just before
    making the call then NULL'ing it out afterwards. This adds enough code
    complexity that it will not be attempted until the current approach
    demonstrates it is a bottle neck.
    
    PR-URL: #8110
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
    Reviewed-by: Fedor Indutny <fedor@indutny.com>
    Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
    Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
  7. async-wrap: expose async-wrap as binding

    trevnorris committed Nov 15, 2014
    Expose basic hooks for AsyncWrap via the async_wrap binding. Right now
    only the PROVIDER types are exposed. This is a preliminary step before
    more functionality is added.
    
    PR-URL: #8110
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
    Reviewed-by: Fedor Indutny <fedor@indutny.com>
    Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
    Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
  8. src: remove unnecessary template parameter

    trevnorris committed Nov 14, 2014
    The template class information is received via the type of the first
    argument. So there is no need to use Wrap<T>(handle).
    
    PR-URL: #8110
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
    Reviewed-by: Fedor Indutny <fedor@indutny.com>
    Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
    Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
  9. src: all wrap's now use actual FunctionTemplate

    trevnorris committed Aug 26, 2014
    Instead of simply creating a new v8::Object to contain the connection
    information, instantiate a new instance of a FunctionTemplate. This will
    allow future improvements for debugging and performance probes.
    
    Additionally, the "provider" argument in the ReqWrap constructor is no
    longer optional.
    
    PR-URL: #8110
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
    Reviewed-by: Fedor Indutny <fedor@indutny.com>
    Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
    Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
  10. node: fix throws before timer module is loaded

    trevnorris committed Nov 13, 2014
    An edge case could occur when the setImmediate() in _fatalException()
    would fire before the timers module had been loaded globally, causing
    Node to crash.
    
    PR-URL: #8110
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
    Reviewed-by: Fedor Indutny <fedor@indutny.com>
    Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
    Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
  11. node, async-wrap: remove MakeDomainCallback

    trevnorris committed Nov 13, 2014
    C++ won't deoptimize like JS if specific conditional branches are
    sporadically met in the future. Combined with the amount of code
    duplication removal and simplified maintenance complexity, it makes more
    sense to merge MakeCallback and MakeDomainCallback.
    
    Additionally, type casting in V8 before verifying what that type is will
    cause V8 to abort in debug mode if that type isn't what was expected.
    Fix this by first checking the v8::Value before casting.
    
    PR-URL: #8110
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
    Reviewed-by: Fedor Indutny <fedor@indutny.com>
    Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
    Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
  12. async-wrap: move MakeCallback to .cc

    trevnorris committed Nov 12, 2014
    MakeCallback is too large a function to be inlined. Likewise, only
    having header files will not allow for any part of AsyncWrap to be
    exposed cleanly via NODE_MODULE_CONTEXT_AWARE_BUILTIN().
    
    PR-URL: #8110
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
    Reviewed-by: Fedor Indutny <fedor@indutny.com>
    Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
    Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
  13. src: remove Async Listener

    trevnorris committed Nov 12, 2014
    Async Listener was the name of the user-facing JS API, and is being
    completely removed. Instead low level hooks directly into the mechanism
    that AL used will be introduced in a future commit.
    
    PR-URL: #8110
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
    Reviewed-by: Fedor Indutny <fedor@indutny.com>
    Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
    Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Commits on Dec 4, 2014
  1. test: runner support for flaky tests

    orangemocha committed Nov 7, 2014
    Adding --flaky-tests option, to allow regarding flaky tests failures
    as non-fatal.
    
    Currently only observed by the TapProgressIndicator, which will
    add a # TODO directive to tests classified as flaky. According to the
    TAP specification, the test harness is supposed to treat failures
    that have a # TODO directive as non-fatal.
  2. zlib: do not Unref() if wasn't Ref()ed

    indutny committed Nov 6, 2014
    In very unlikely case, where `deflateInit2()` may return error (right
    now happening only on exhausting all memory), the `ZCtx::Error()` will
    be called and will try to `Unref()` the handle. But the problem is that
    this handle was never `Ref()`ed, so it will trigger an assertion error
    and crash the program.
    
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    PR-URL: #8687
  3. crypto: update root certificates

    bnoordhuis authored and indutny committed Nov 9, 2013
    Update tools/certdata.txt to [0] (last updated on 2014-11-14) and
    rebuild src/node_root_certs.h.
    
    Refs #8679 and #8709.
    
    [0] https://hg.mozilla.org/mozilla-central/raw-file/64206634959a/security/nss/lib/ckfw/builtins/certdata.txt
  4. tools: customize mk-ca-bundle.pl

    bnoordhuis authored and indutny committed Nov 9, 2013
    Remove unneeded functionality and tweak the generated output so we
    can #include it in C++ source code.
    
    This is a back-port of commit e159073 from the master branch.
  5. tools: bundle mk-ca-bundle.pl from upstream curl

    bnoordhuis authored and indutny committed Nov 9, 2013
    This is a back-port of commit 5ab863d from the master branch.
  6. node: fix bad assert

    trevnorris committed Dec 4, 2014
    It was my mistake to change an assert check. This changes it back to how
    the assert was originally done.
    
    Fixes: c131c1f "modules: adding load linked modules feature"
    Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Commits on Dec 3, 2014
  1. doc: set logical umask in process.umask example

    kampde authored and trevnorris committed Jul 31, 2014
    0644 seems to be the desired mode for new files (as it is a very weird
    umask), and to achieve that the correct umask would be 0022.
    
    PR-URL: #8039
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  2. url: change hostname regex to negate invalid chars

    jondavidjohn authored and trevnorris committed Nov 27, 2014
    Regarding #8520
    
    This changes hostname validation from a whitelist regex approach
    to a blacklist regex approach as described in https://url.spec.whatwg.org/#host-parsing.
    
    url.parse misinterpreted `https://good.com+.evil.org/`
    as `https://good.com/+.evil.org/`.  If we use url.parse to check the
    validity of the hostname, the test passes, but in the browser the
    user is redirected to the evil.org website.