mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
d2ad9b4fb6
External modules need a way to decorate their objects so that node can recognize it as a host object for serialization process. Exposing a way for turning off instead of turning on is much safer. PR-URL: https://github.com/nodejs/node/pull/55234 Refs: https://github.com/nodejs/node/pull/55178 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
51 lines
882 B
JavaScript
51 lines
882 B
JavaScript
'use strict';
|
|
|
|
const {
|
|
isMainThread,
|
|
SHARE_ENV,
|
|
resourceLimits,
|
|
setEnvironmentData,
|
|
getEnvironmentData,
|
|
threadId,
|
|
Worker,
|
|
} = require('internal/worker');
|
|
|
|
const {
|
|
MessagePort,
|
|
MessageChannel,
|
|
markAsUncloneable,
|
|
moveMessagePortToContext,
|
|
receiveMessageOnPort,
|
|
BroadcastChannel,
|
|
} = require('internal/worker/io');
|
|
|
|
const {
|
|
postMessageToThread,
|
|
} = require('internal/worker/messaging');
|
|
|
|
const {
|
|
markAsUntransferable,
|
|
isMarkedAsUntransferable,
|
|
} = require('internal/buffer');
|
|
|
|
module.exports = {
|
|
isMainThread,
|
|
MessagePort,
|
|
MessageChannel,
|
|
markAsUncloneable,
|
|
markAsUntransferable,
|
|
isMarkedAsUntransferable,
|
|
moveMessagePortToContext,
|
|
receiveMessageOnPort,
|
|
resourceLimits,
|
|
postMessageToThread,
|
|
threadId,
|
|
SHARE_ENV,
|
|
Worker,
|
|
parentPort: null,
|
|
workerData: null,
|
|
BroadcastChannel,
|
|
setEnvironmentData,
|
|
getEnvironmentData,
|
|
};
|