mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
ad02e0d241
Make setImmediate() immune to `process` global tampering by removing the dependency on the `process._immediateCallback` property. PR-URL: https://github.com/nodejs/node/pull/17736 Fixes: https://github.com/nodejs/node/issues/17681 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
6 lines
143 B
JavaScript
6 lines
143 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
common.globalCheck = false;
|
|
global.process = {}; // Boom!
|
|
setImmediate(common.mustCall());
|