From 12f6088ba088f7b97eaa67b3bf48aaf49a0f6f9c Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sat, 18 Apr 2026 12:20:49 +0900 Subject: [PATCH] Handle ScriptControl failures gracefully Replace the explicit error throw when ScriptControl-based object creation fails with a safe fallback factory that returns an empty object. This prevents runtime errors in 64-bit environments and during subsequent enumBugKeys cleanup by returning a benign constructor instead of throwing. --- app/assets/js/core-js-3.49.0.wsh.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/js/core-js-3.49.0.wsh.js b/app/assets/js/core-js-3.49.0.wsh.js index 212a995..9e3793b 100644 --- a/app/assets/js/core-js-3.49.0.wsh.js +++ b/app/assets/js/core-js-3.49.0.wsh.js @@ -2418,8 +2418,12 @@ var NullProtoObjectViaSc64bit = function () { sc64bit.Language = 'JScript'; return sc64bit.Eval('Object'); } catch (error) { - // Throw explicit error if ScriptControl is not available in 64-bit environment - throw new Error('A compatible ScriptControl version is required to support null-prototype objects on 64-bit environments.'); + // If all attempts to retrieve a new object from an external instance fail, + // the existing object is returned. + // This prevents errors during the key deletion process using enumBugKeys afterward. + return function() { + return {}; + } } }