Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherrypick commits from joyent/node #834

Closed
wants to merge 7 commits into from
Closed

Cherrypick commits from joyent/node #834

wants to merge 7 commits into from

Commits on Feb 13, 2015

  1. net: throw on invalid socket timeouts

    This commit restricts socket timeouts non-negative, finite
    numbers. Any other value throws a TypeError or RangeError.
    This prevents subtle bugs that can happen due to type
    coercion.
    
    Fixes: nodejs/node-v0.x-archive#8618
    PR-URL: nodejs/node-v0.x-archive#8884
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>
    Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
    
    Conflicts:
    	lib/timers.js
    	test/simple/test-net-settimeout.js
    	test/simple/test-net-socket-timeout.js
    cjihrig committed Feb 13, 2015
    Configuration menu
    Copy the full SHA
    faafbe7 View commit details
    Browse the repository at this point in the history
  2. doc: use correct signature for assert()

    The message argument is optional for both assert() and
    assert.ok(). This commit makes message optional for assert().
    
    PR-URL: nodejs/node-v0.x-archive#9003
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>
    bsnote authored and cjihrig committed Feb 13, 2015
    Configuration menu
    Copy the full SHA
    39be594 View commit details
    Browse the repository at this point in the history
  3. module: replace NativeModule.require

    The NativeModule system passes NativeModule.require transparently and so
    is unnecessary to call explicitly.
    
    The only one which should have the prefix is the in line 295, where
    actually implements a big fs-based module system and actually requires a
    native module. That is left unchanged.
    
    PR-URL: nodejs/node-v0.x-archive#9201
    Ref: nodejs/node-v0.x-archive#2009
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
    
    Conflicts:
    	lib/module.js
    Herbert Vojčík authored and cjihrig committed Feb 13, 2015
    Configuration menu
    Copy the full SHA
    970841d View commit details
    Browse the repository at this point in the history
  4. doc: fix code syntax

    Add a ';' to the end of a function call in documentation.
    
    PR-URL: nodejs/node-v0.x-archive#9198
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
    dandv authored and cjihrig committed Feb 13, 2015
    Configuration menu
    Copy the full SHA
    43907ca View commit details
    Browse the repository at this point in the history
  5. test: Timeout#unref() does not return instance

    Timeout#unref() call returns undefined, not this. The test already
    worked before, because the interval was still unref'd, and the test also
    succeeds without clearing the interval.
    
    PR-URL: nodejs/node-v0.x-archive#9171
    Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
    
    Conflicts:
    	test/simple/test-timers-unref.js
    jscissr authored and cjihrig committed Feb 13, 2015
    Configuration menu
    Copy the full SHA
    ff66973 View commit details
    Browse the repository at this point in the history
  6. doc: grammar fix in smalloc

    PR-URL: nodejs/node-v0.x-archive#9164
    Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
    Debjeet Biswas authored and cjihrig committed Feb 13, 2015
    Configuration menu
    Copy the full SHA
    22c0346 View commit details
    Browse the repository at this point in the history
  7. net: remove use of arguments in Server constructor

    The current implementation uses the arguments object in the Server()
    constructor. Since both arguments to Server() are optional, there was a
    high likelihood of accessing a non-existent element in arguments, which
    carries a performance overhead. This commit replaces the arguments
    object with named arguments.
    
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
    
    Conflicts:
    	lib/net.js
    cjihrig committed Feb 13, 2015
    Configuration menu
    Copy the full SHA
    a699cee View commit details
    Browse the repository at this point in the history