wasi: use kEmptyObject

PR-URL: https://github.com/nodejs/node/pull/43159
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
LiviaMedeiros 2022-05-21 17:57:20 +08:00 committed by Antoine du Hamel
parent 0313102aaa
commit 51e7f751c7
No known key found for this signature in database
GPG Key ID: 21D900FFDB233756

View File

@ -13,7 +13,10 @@ const {
ERR_INVALID_ARG_TYPE,
ERR_WASI_ALREADY_STARTED
} = require('internal/errors').codes;
const { emitExperimentalWarning } = require('internal/util');
const {
emitExperimentalWarning,
kEmptyObject,
} = require('internal/util');
const { isArrayBuffer } = require('internal/util/types');
const {
validateArray,
@ -55,7 +58,7 @@ function setupInstance(self, instance) {
}
class WASI {
constructor(options = {}) {
constructor(options = kEmptyObject) {
validateObject(options, 'options');
if (options.args !== undefined)