{"action":"opened","issue":{"url":"https://api.github.com/repos/javadelight/delight-nashorn-sandbox/issues/6","repository_url":"https://api.github.com/repos/javadelight/delight-nashorn-sandbox","labels_url":"https://api.github.com/repos/javadelight/delight-nashorn-sandbox/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/javadelight/delight-nashorn-sandbox/issues/6/comments","events_url":"https://api.github.com/repos/javadelight/delight-nashorn-sandbox/issues/6/events","html_url":"https://github.com/javadelight/delight-nashorn-sandbox/issues/6","id":163297917,"number":6,"title":"Restricted to return only one object!","user":{"login":"eduveks","id":5670920,"avatar_url":"https://avatars.githubusercontent.com/u/5670920?v=3","gravatar_id":"","url":"https://api.github.com/users/eduveks","html_url":"https://github.com/eduveks","followers_url":"https://api.github.com/users/eduveks/followers","following_url":"https://api.github.com/users/eduveks/following{/other_user}","gists_url":"https://api.github.com/users/eduveks/gists{/gist_id}","starred_url":"https://api.github.com/users/eduveks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduveks/subscriptions","organizations_url":"https://api.github.com/users/eduveks/orgs","repos_url":"https://api.github.com/users/eduveks/repos","events_url":"https://api.github.com/users/eduveks/events{/privacy}","received_events_url":"https://api.github.com/users/eduveks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-01T00:50:15Z","updated_at":"2016-07-01T00:50:15Z","closed_at":null,"body":"Will be great if possible grab any global variable of the script.\r\n\r\nAs is possible using the native ScriptEngine of the Nashorn.\r\n\r\n`Object scriptVar = engine.get(\"any_variable\");`\r\n\r\nWith NashornSandbox this is impossible!\r\n\r\nAn idea:\r\n\r\n```\r\nnashornSandbox.extract(\"my_script_var\");\r\nnashornSandbox.eval(\"my_script_var = 1;\");\r\nObject myScriptVar = nashornSandbox.get(\"my_script_var\");\r\nnashornSandbox.clean();\r\n```\r\n\r\nWith this solution will be able to say first each variable the ScriptEngine inside the thread need to collect in an Map.\r\n\r\nAnd an method to clear the Map to prevent memory usage with trash.\r\n"}}
{"actor":{"display_login":"eduveks"}}