Skip to content

Commit

Permalink
🔒️ fix runtime object leak
Browse files Browse the repository at this point in the history
DEV-389
  • Loading branch information
o4kapuk committed Jan 1, 2024
1 parent 12ae124 commit 0281b41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/runtime/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 2 additions & 1 deletion lib/runtime/system-functions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const systemFunctions = {
Object: {
create: Object.create,
keys: Object.keys
keys: Object.keys,
setPrototypeOf: Object.setPrototypeOf
},
JSON: {
stringify: JSON.stringify,
Expand Down

0 comments on commit 0281b41

Please sign in to comment.