Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow sandboxed Invocable::invoke* #42

Merged
merged 2 commits into from
Feb 21, 2018

Conversation

escitalopram
Copy link

I need to invoke JS functions from Java using javax.script.Invocable, which must also be sandboxed. Therefore, I factored out the code needed for execution of ScriptEngine methods in a new thread and added getSandboxedInvocable() that transparently sandboxes the Invocable::invoke* methods. However, the Invocable::getInterface() methods are only stubs. They could be implemented in a similar fashion using object proxies, if somebody (or I) needs them in the future.
What do you think?

@mxro
Copy link
Collaborator

mxro commented Feb 20, 2018

Hi!

Thank you for the pull request! That all looks good. Could you add a quick unit test which uses the feature how you would want to use it? I could create one but I think it would be best if it could be based on the particular requirement you have.

@escitalopram
Copy link
Author

Added some tests.

@mxro mxro merged commit 369bd11 into javadelight:master Feb 21, 2018
@mxro
Copy link
Collaborator

mxro commented Feb 21, 2018

Perfect, thanks! Merged and released in new version 0.1.12!

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