From 0281b41da717ebafbb2417b4bf0417945f3a8564 Mon Sep 17 00:00:00 2001 From: Nikolay Kharitonov Date: Mon, 1 Jan 2024 01:55:29 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F=20fix=20runtime=20object?= =?UTF-8?q?=20leak?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DEV-389 --- lib/runtime/runtime.js | 2 +- lib/runtime/system-functions.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/runtime/runtime.js b/lib/runtime/runtime.js index 38178b4..12cce48 100644 --- a/lib/runtime/runtime.js +++ b/lib/runtime/runtime.js @@ -53,7 +53,7 @@ global._init = (function() { }; global._start = function (data) { - Object.setPrototypeOf(data, null); + systemFunctions.Object.setPrototypeOf(data, null); let activeSegments, publicSegments, defaultPublicSegment, activeForeignSegment; let startTime, startDirtyTime = nowCpuTime(); diff --git a/lib/runtime/system-functions.js b/lib/runtime/system-functions.js index 10ee31a..013a0aa 100644 --- a/lib/runtime/system-functions.js +++ b/lib/runtime/system-functions.js @@ -1,7 +1,8 @@ const systemFunctions = { Object: { create: Object.create, - keys: Object.keys + keys: Object.keys, + setPrototypeOf: Object.setPrototypeOf }, JSON: { stringify: JSON.stringify,