mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 09:08:46 +00:00

Replace the Buffer constructor with a FastBuffer in v8.deserialize in order to avoid calling the Buffer constructor and thus triggering a deprecation warning from code inside the core. Fixes: https://github.com/nodejs/node/issues/21181 PR-URL: https://github.com/nodejs/node/pull/21196 Fixes: https://github.com/nodejs/node/issues/21181 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
9 lines
217 B
JavaScript
9 lines
217 B
JavaScript
// Flags: --pending-deprecation --no-warnings
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
const v8 = require('v8');
|
|
|
|
process.on('warning', common.mustNotCall());
|
|
v8.deserialize(v8.serialize(Buffer.alloc(0)));
|