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 2aa3e3b as of 2018-02-11
This commit was automatically generated. For any problems, please contact jackhorton

Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
  • Loading branch information
chakrabot committed Feb 14, 2018
2 parents 5ac557c + 2aa3e3b commit 6e93807
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 17 deletions.
14 changes: 7 additions & 7 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,10 @@ NAPI_NO_RETURN void napi_fatal_error(const char* location,

- `[in] location`: Optional location at which the error occurred.
- `[in] location_len`: The length of the location in bytes, or
NAPI_AUTO_LENGTH if it is null-terminated.
`NAPI_AUTO_LENGTH` if it is null-terminated.
- `[in] message`: The message associated with the error.
- `[in] message_len`: The length of the message in bytes, or
NAPI_AUTO_LENGTH if it is
`NAPI_AUTO_LENGTH` if it is
null-terminated.

The function call does not return, the process will be terminated.
Expand Down Expand Up @@ -1255,7 +1255,7 @@ napi_status napi_create_function(napi_env env,
- `[in] utf8name`: A string representing the name of the function encoded as
UTF8.
- `[in] length`: The length of the utf8name in bytes, or
NAPI_AUTO_LENGTH if it is null-terminated.
`NAPI_AUTO_LENGTH` if it is null-terminated.
- `[in] cb`: A function pointer to the native function to be invoked when the
created function is invoked from JavaScript.
- `[in] data`: Optional arbitrary context data to be passed into the native
Expand Down Expand Up @@ -1483,7 +1483,7 @@ napi_status napi_create_string_latin1(napi_env env,
- `[in] env`: The environment that the API is invoked under.
- `[in] str`: Character buffer representing a ISO-8859-1-encoded string.
- `[in] length`: The length of the string in bytes, or
NAPI_AUTO_LENGTH if it is null-terminated.
`NAPI_AUTO_LENGTH` if it is null-terminated.
- `[out] result`: A `napi_value` representing a JavaScript String.

Returns `napi_ok` if the API succeeded.
Expand All @@ -1507,7 +1507,7 @@ napi_status napi_create_string_utf16(napi_env env,
- `[in] env`: The environment that the API is invoked under.
- `[in] str`: Character buffer representing a UTF16-LE-encoded string.
- `[in] length`: The length of the string in two-byte code units, or
NAPI_AUTO_LENGTH if it is null-terminated.
`NAPI_AUTO_LENGTH` if it is null-terminated.
- `[out] result`: A `napi_value` representing a JavaScript String.

Returns `napi_ok` if the API succeeded.
Expand All @@ -1530,7 +1530,7 @@ napi_status napi_create_string_utf8(napi_env env,

- `[in] env`: The environment that the API is invoked under.
- `[in] str`: Character buffer representing a UTF8-encoded string.
- `[in] length`: The length of the string in bytes, or NAPI_AUTO_LENGTH
- `[in] length`: The length of the string in bytes, or `NAPI_AUTO_LENGTH`
if it is null-terminated.
- `[out] result`: A `napi_value` representing a JavaScript String.

Expand Down Expand Up @@ -3052,7 +3052,7 @@ napi_status napi_define_class(napi_env env,
- `[in] utf8name`: Name of the JavaScript constructor function; this is
not required to be the same as the C++ class name, though it is recommended
for clarity.
- `[in] length`: The length of the utf8name in bytes, or NAPI_AUTO_LENGTH
- `[in] length`: The length of the utf8name in bytes, or `NAPI_AUTO_LENGTH`
if it is null-terminated.
- `[in] constructor`: Callback function that handles constructing instances
of the class. (This should be a static method on the class, not an actual
Expand Down
5 changes: 0 additions & 5 deletions lib/internal/loader/ModuleWrap.js

This file was deleted.

13 changes: 13 additions & 0 deletions lib/internal/test/binding.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';

process.emitWarning(
'These APIs are exposed only for testing and are not ' +
'tracked by any versioning system or deprecation process.',
'internal/test/binding');

// These exports should be scoped as specifically as possible
// to avoid exposing APIs because even with that warning and
// this file being internal people will still try to abuse it.
module.exports = {
ModuleWrap: internalBinding('module_wrap').ModuleWrap,
};
3 changes: 1 addition & 2 deletions lib/internal/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ class URLSearchParams {
constructor(init = undefined) {
if (init === null || init === undefined) {
this[searchParams] = [];
} else if ((typeof init === 'object' && init !== null) ||
typeof init === 'function') {
} else if (typeof init === 'object' || typeof init === 'function') {
const method = init[Symbol.iterator];
if (method === this[Symbol.iterator]) {
// While the spec does not have this branch, we can use it as a
Expand Down
2 changes: 1 addition & 1 deletion lib/timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ function enroll(item, msecs) {

exports.enroll = util.deprecate(enroll,
'timers.enroll() is deprecated. ' +
'Please use clearTimeout instead.',
'Please use setTimeout instead.',
'DEP0095');


Expand Down
2 changes: 1 addition & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
'lib/internal/loader/DefaultResolve.js',
'lib/internal/loader/ModuleJob.js',
'lib/internal/loader/ModuleMap.js',
'lib/internal/loader/ModuleWrap.js',
'lib/internal/loader/Translators.js',
'lib/internal/safe_globals.js',
'lib/internal/net.js',
Expand All @@ -127,6 +126,7 @@
'lib/internal/repl.js',
'lib/internal/repl/await.js',
'lib/internal/socket_list.js',
'lib/internal/test/binding.js',
'lib/internal/test/unicode.js',
'lib/internal/timers.js',
'lib/internal/tls.js',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-internal-module-wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const common = require('../common');
common.crashOnUnhandledRejection();
const assert = require('assert');

const ModuleWrap = require('internal/loader/ModuleWrap');
const { ModuleWrap } = require('internal/test/binding');
const { getPromiseDetails, isPromise } = process.binding('util');
const setTimeoutAsync = require('util').promisify(setTimeout);

Expand Down

0 comments on commit 6e93807

Please sign in to comment.