`tryCatchDeoptimization` misses a callback when the helper is a property
Author: slowcheetahCreated Sep 28, 2026Updated Sep 29, 2026
Labelst¹ 🐞 bug
Rollup Version
4.63.5
Operating System (or Browser)
Ubuntu 22.04
Node Version (if applicable)
26.8.1
Link To Reproduction
Expected Behaviour
Object.getPrototypeOf(null) throws on every engine, so this module evaluates to true, and should
still do so after bundling: the callback is provided directly as an argument and the helper calls it
inside try, which is the case tryCatchDeoptimization keeps (#2918).
const helpers = { fails: exec => { try { exec(); return false; } catch { return true; } } };
export default helpers.fails(() => { Object.getPrototypeOf(null); });Actual Behaviour
The call is removed, so the bundle evaluates to false:
const helpers = { fails: exec => { try { exec(); return false; } catch { return true; } } };
var entry = helpers.fails(() => { }); // <- the call is gone
export { entry as default };Source: rollup/rollup