Skip to content

Conversation

Xmader
Copy link
Member

@Xmader Xmader commented Jun 12, 2024

If the last expression value is a JS type that can't currently be converted to a Python type in PythonMonkey
(e.g. JS Symbol type),
pmjs should ignore it completely instead of trying to covert it so hard (segfault/error).

@Xmader
Copy link
Member Author

Xmader commented Jun 12, 2024

The main change in this PR is

pm.eval(mainModuleSource.read(), {'filename': fullFilename, 'noScriptRval': True})


Test file:

// pr362.js
console.log(Symbol('abc'));
Symbol('xxx');

Without the 'noScriptRval': True change in require.py

With the change:

@philippedistributive philippedistributive merged commit 6b75d8f into main Jun 12, 2024
@philippedistributive philippedistributive deleted the Xmader/fix/pmjs-rval branch June 12, 2024 14:57
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