Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Merge nodejs/master
Browse files Browse the repository at this point in the history
Merge 7cff6e8 as of 2017-10-03.
This is an automatically created merge. For any problems please
contact @kunalspathak.
  • Loading branch information
chakrabot committed Oct 9, 2017
2 parents 4569fd2 + 7cff6e8 commit 9d58517
Show file tree
Hide file tree
Showing 27 changed files with 643 additions and 450 deletions.
14 changes: 12 additions & 2 deletions benchmark/http2/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,27 @@ const PORT = common.PORT;
const bench = common.createBenchmark(main, {
streams: [100, 200, 1000],
length: [64 * 1024, 128 * 1024, 256 * 1024, 1024 * 1024],
size: [100000]
}, { flags: ['--no-warnings'] });

function main(conf) {
const m = +conf.streams;
const l = +conf.length;
const s = +conf.size;
const http2 = require('http2');
const server = http2.createServer();
server.on('stream', (stream) => {
stream.respond();
stream.write('ü'.repeat(l));
stream.end();
let written = 0;
function write() {
stream.write('ü'.repeat(s));
written += s;
if (written < l)
setImmediate(write);
else
stream.end();
}
write();
});
server.listen(PORT, () => {
bench.http({
Expand Down
10 changes: 10 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,16 @@ function for [`util.inspect()`][] is deprecated. Use [`util.inspect.custom`][]
instead. For backwards compatibility with Node.js prior to version 6.4.0, both
may be specified.
<a id="DEP0080"></a>
### DEP0080: path.\_makeLong()
Type: Documentation-only
The internal `path._makeLong()` was not intended for public use. However,
userland modules have found it useful. The internal API has been deprecated
and replaced with an identical, public `path.toNamespacedPath()` method.
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
[`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer
Expand Down
18 changes: 18 additions & 0 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,12 @@ also able to define their own types when using the public embedder API.

Used when attempting to perform an operation outside the bounds of a `Buffer`.

<a id="ERR_BUFFER_TOO_LARGE"></a>
### ERR_BUFFER_TOO_LARGE

Used when an attempt has been made to create a `Buffer` larger than the
maximum allowed size.

<a id="ERR_CHILD_CLOSED_BEFORE_REPLY"></a>
### ERR_CHILD_CLOSED_BEFORE_REPLY

Expand Down Expand Up @@ -879,6 +885,12 @@ Used when a given index is out of the accepted range (e.g. negative offsets).
Used generically to identify that an argument of the wrong type has been passed
to a Node.js API.

<a id="ERR_INVALID_ARG_VALUE"></a>
### ERR_INVALID_ARG_VALUE

Used generically to identify that an invalid or unsupported value has been
passed for a given argument.

<a id="ERR_INVALID_ARRAY_LENGTH"></a>
### ERR_INVALID_ARRAY_LENGTH

Expand Down Expand Up @@ -1277,6 +1289,12 @@ entry types were found.

Used when a given value is out of the accepted range.

<a id="ERR_ZLIB_BINDING_CLOSED"></a>
### ERR_ZLIB_BINDING_CLOSED

Used when an attempt is made to use a `zlib` object after it has already been
closed.

[`ERR_INVALID_ARG_TYPE`]: #ERR_INVALID_ARG_TYPE
[`subprocess.kill()`]: child_process.html#child_process_subprocess_kill_signal
[`subprocess.send()`]: child_process.html#child_process_subprocess_send_message_sendhandle_options_callback
Expand Down
16 changes: 16 additions & 0 deletions doc/api/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,21 @@ On Windows:
accepted as path segment separators; however, the `path` methods only add
backward slashes (`\`).

## path.toNamespacedPath(path)
<!-- YAML
added: REPLACEME
-->

* `path` {string}
* Returns: {string}

On Windows systems only, returns an equivalent [namespace-prefixed path][] for
the given `path`. If `path` is not a string, `path` will be returned without
modifications.

This method is meaningful only on Windows system. On posix systems, the
method is non-operational and always returns `path` without modifications.

## path.win32
<!-- YAML
added: v0.11.15
Expand All @@ -559,3 +574,4 @@ of the `path` methods.
[`path.sep`]: #path_path_sep
[`path.win32`]: #path_path_win32
[MSDN-Rel-Path]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx#fully_qualified_vs._relative_paths
[namespace-prefixed path]: https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
4 changes: 2 additions & 2 deletions lib/async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const errors = require('internal/errors');
* hooks for each type.
*
* async_id_fields is a Float64Array wrapping the double array of
* Environment::AsyncHooks::uid_fields_[]. Each index contains the ids for the
* various asynchronous states of the application. These are:
* Environment::AsyncHooks::async_id_fields_[]. Each index contains the ids for
* the various asynchronous states of the application. These are:
* kExecutionAsyncId: The async_id assigned to the resource responsible for the
* current execution stack.
* kTriggerAsyncId: The trigger_async_id of the resource responsible for
Expand Down
Loading

0 comments on commit 9d58517

Please sign in to comment.