mirror of
https://github.com/nodejs/node.git
synced 2024-11-22 07:37:56 +01:00
78a15702dd
JSTransferable wrapper object is a short-lived wrapper in the scope of the serialization or the deserialization. Make the JSTransferable wrapper object pointer as a strongly-referenced detached BaseObjectPtr so that a JSTransferable wrapper object and its target object will never be garbage-collected during a ser-des process, and the wrapper object will be immediately destroyed when the process is completed. PR-URL: https://github.com/nodejs/node/pull/50026 Fixes: https://github.com/nodejs/node/issues/49852 Fixes: https://github.com/nodejs/node/issues/49844 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
9 lines
194 B
JavaScript
9 lines
194 B
JavaScript
// Flags: --max-old-space-size=10
|
|
'use strict';
|
|
require('../common');
|
|
const { createHistogram } = require('perf_hooks');
|
|
|
|
for (let i = 0; i < 1e4; i++) {
|
|
structuredClone(createHistogram());
|
|
}
|