Skip to content

Crash fix in WSH runtime#1536

Open
gnh1201 wants to merge 9 commits intozloirock:masterfrom
gnh1201:wsh-crash-fix
Open

Crash fix in WSH runtime#1536
gnh1201 wants to merge 9 commits intozloirock:masterfrom
gnh1201:wsh-crash-fix

Conversation

@gnh1201
Copy link
Copy Markdown
Contributor

@gnh1201 gnh1201 commented Apr 9, 2026

The existing code forces the invocation of the htmlfile module even in the WSH environment, which can cause crashes on machines where calling the htmlfile module is restricted (e.g., due to unknown changes in IE-related settings).

In the case of WSH (ornon-browser ES3 environment), its usage differs significantly from that of IE (as it is a standalone runtime rather than a web browser), so there is no real need to invoke the htmlfile module. The issue can be resolved by not calling htmlfile at all in the WSH environment.

The related issue is as follows:

@gnh1201
Copy link
Copy Markdown
Contributor Author

gnh1201 commented Apr 9, 2026

#970 #966

Comment thread packages/core-js/internals/object-create.js Outdated
@gnh1201
Copy link
Copy Markdown
Contributor Author

gnh1201 commented Apr 10, 2026

For now, I’ve only addressed the app crash issue. I’ll update the code shortly with improvements that more closely align with the intended purpose of Object.create.

gnh1201 added 2 commits April 11, 2026 01:44
Refactor NullProtoObjectViaActiveX and add error handling for 32-bit MSScriptControl.
@gnh1201
Copy link
Copy Markdown
Contributor Author

gnh1201 commented Apr 10, 2026

On 32-bit systems only (64-bit is not supported), there is a way to obtain a fresh "Object" constructor. I implemented this in my changes as a function called NullProtoObjectViaSc32bit.

If we cannot give up null-prototype objects, using the NullProtoObjectViaSc32bit approach could be a viable option.

@gnh1201
Copy link
Copy Markdown
Contributor Author

gnh1201 commented Apr 11, 2026

I have added a fallback for 64-bit systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants