fix(javascript): preserve intrinsic alias capture timing
Validate each alias read after initialization and retain the original function capture across copies. Share declaration initializer facts with RPC and Electron analysis, including class declarations used for fresh-target identity. Accept single-statement control blocks while keeping lexical roles and added operations checked. Cover the capture regressions through inert source and public CLI/MCP workflows.
This commit is contained in:
@@ -50,7 +50,9 @@ cliTest.for(["CLI", "stdio MCP"] as const)(
|
||||
Object.defineProperty(localClass,"x",{value:1});
|
||||
const localRegExp = /local/;
|
||||
Object.defineProperty(localRegExp,"x",{value:1});
|
||||
${ROLLDOWN_MODULE_INTEROP}
|
||||
const captured = Object.defineProperty;
|
||||
Object.defineProperty = custom;
|
||||
${ROLLDOWN_MODULE_INTEROP.replace("__defProp = Object.defineProperty", "__defProp = captured")}
|
||||
let electron = require("electron");
|
||||
electron = __toESM(electron, 1);
|
||||
new electron.BrowserWindow({webPreferences:{preload:"./preload.js"}});
|
||||
|
||||
Reference in New Issue
Block a user