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

Commit

Permalink
meta: merge node/master into node-chakracore/master
Browse files Browse the repository at this point in the history
Merge aec0190 as of 2018-03-29
This commit was automatically generated. For any problems, please contact jackhorton

Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
  • Loading branch information
chakrabot committed Mar 31, 2018
2 parents db8f126 + aec0190 commit 1fc5478
Show file tree
Hide file tree
Showing 27 changed files with 398 additions and 345 deletions.
4 changes: 2 additions & 2 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2065,8 +2065,8 @@ properties.
* `maxConcurrentStreams` {number} Specifies the maximum number of concurrent
streams permitted on an `Http2Session`. There is no default value which
implies, at least theoretically, 2<sup>31</sup>-1 streams may be open
concurrently at any given time in an `Http2Session`. The minimum value is
0. The maximum allowed value is 2<sup>31</sup>-1.
concurrently at any given time in an `Http2Session`. The minimum value
is 0. The maximum allowed value is 2<sup>31</sup>-1.
* `maxHeaderListSize` {number} Specifies the maximum size (uncompressed octets)
of header list that will be accepted. The minimum allowed value is 0. The
maximum allowed value is 2<sup>32</sup>-1. **Default:** 65535.
Expand Down
5 changes: 4 additions & 1 deletion lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,12 @@ function _convertCustomFds(options) {
}

function normalizeSpawnArguments(file, args, options) {
if (typeof file !== 'string' || file.length === 0)
if (typeof file !== 'string')
throw new ERR_INVALID_ARG_TYPE('file', 'string', file);

if (file.length === 0)
throw new ERR_INVALID_ARG_VALUE('file', file, 'cannot be empty');

if (Array.isArray(args)) {
args = args.slice(0);
} else if (args !== undefined &&
Expand Down
14 changes: 10 additions & 4 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,17 @@ const {

const { Buffer } = require('buffer');
const TTYWrap = process.binding('tty_wrap');
const { TCP, constants: TCPConstants } = process.binding('tcp_wrap');
const { Pipe, constants: PipeConstants } = process.binding('pipe_wrap');
const { TCPConnectWrap } = process.binding('tcp_wrap');
const { PipeConnectWrap } = process.binding('pipe_wrap');
const { ShutdownWrap } = process.binding('stream_wrap');
const {
TCP,
TCPConnectWrap,
constants: TCPConstants
} = process.binding('tcp_wrap');
const {
Pipe,
PipeConnectWrap,
constants: PipeConstants
} = process.binding('pipe_wrap');
const {
newAsyncId,
defaultTriggerAsyncIdScope,
Expand Down
13 changes: 6 additions & 7 deletions lib/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@ Stream.Stream = Stream;

// Internal utilities
try {
Stream._isUint8Array = require('internal/util/types').isUint8Array;
} catch (e) {
// Throws for code outside of Node.js core.

try {
Stream._isUint8Array = process.binding('util').isUint8Array;
} catch (e) {
const types = require('util').types;
if (types && typeof types.isUint8Array === 'function') {
Stream._isUint8Array = types.isUint8Array;
} else {
// This throws for Node < 4.2.0 because there's no util binding and
// returns undefined for Node < 7.4.0.
Stream._isUint8Array = process.binding('util').isUint8Array;
}
} catch (e) {
}

if (!Stream._isUint8Array) {
Expand Down
2 changes: 1 addition & 1 deletion lib/timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const kRefed = Symbol('refed');
// Therefore, it is very important that the timers implementation is performant
// and efficient.
//
// Note: It is suggested you first read though the lib/internal/linkedlist.js
// Note: It is suggested you first read through the lib/internal/linkedlist.js
// linked list implementation, since timers depend on it extensively. It can be
// somewhat counter-intuitive at first, as it is not actually a class. Instead,
// it is a set of helpers that operate on an existing object.
Expand Down
10 changes: 7 additions & 3 deletions lib/zlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ const {
ERR_ZLIB_INITIALIZATION_FAILED
} = require('internal/errors').codes;
const Transform = require('_stream_transform');
const { _extend } = require('util');
const { isAnyArrayBuffer } = process.binding('util');
const { isArrayBufferView } = require('internal/util/types');
const {
_extend,
types: {
isAnyArrayBuffer,
isArrayBufferView
}
} = require('util');
const binding = process.binding('zlib');
const assert = require('assert').ok;
const {
Expand Down
14 changes: 7 additions & 7 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,24 +292,25 @@ struct PackageConfig {

#define ENVIRONMENT_STRONG_PERSISTENT_PROPERTIES(V) \
V(as_external, v8::External) \
V(async_hooks_after_function, v8::Function) \
V(async_hooks_before_function, v8::Function) \
V(async_hooks_binding, v8::Object) \
V(async_hooks_destroy_function, v8::Function) \
V(async_hooks_init_function, v8::Function) \
V(async_hooks_before_function, v8::Function) \
V(async_hooks_after_function, v8::Function) \
V(async_hooks_promise_resolve_function, v8::Function) \
V(async_hooks_binding, v8::Object) \
V(buffer_prototype_object, v8::Object) \
V(context, v8::Context) \
V(domain_callback, v8::Function) \
V(fdclose_constructor_template, v8::ObjectTemplate) \
V(fd_constructor_template, v8::ObjectTemplate) \
V(filehandlereadwrap_template, v8::ObjectTemplate) \
V(fsreqpromise_constructor_template, v8::ObjectTemplate) \
V(fdclose_constructor_template, v8::ObjectTemplate) \
V(fs_use_promises_symbol, v8::Symbol) \
V(host_import_module_dynamically_callback, v8::Function) \
V(host_initialize_import_meta_object_callback, v8::Function) \
V(http2ping_constructor_template, v8::ObjectTemplate) \
V(http2stream_constructor_template, v8::ObjectTemplate) \
V(http2settings_constructor_template, v8::ObjectTemplate) \
V(http2stream_constructor_template, v8::ObjectTemplate) \
V(immediate_callback_function, v8::Function) \
V(inspector_console_api_object, v8::Object) \
V(pbkdf2_constructor_template, v8::ObjectTemplate) \
Expand All @@ -334,8 +335,7 @@ struct PackageConfig {
V(udp_constructor_function, v8::Function) \
V(vm_parsing_context_symbol, v8::Symbol) \
V(url_constructor_function, v8::Function) \
V(write_wrap_template, v8::ObjectTemplate) \
V(fs_use_promises_symbol, v8::Symbol)
V(write_wrap_template, v8::ObjectTemplate)

class Environment;

Expand Down
Loading

0 comments on commit 1fc5478

Please sign in to comment.