Closed GoogleCodeExporter closed 9 years ago
test case : ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("jav8"); Invocable invocable = (Invocable) engine; engine.eval( "function Person(me) { this.me = me };"+ "Person.prototype.say = function (you) {" + " return this.me + ' say, hello ' + you; "+ "}; "+ "var me = new Person('Flier'); " ); V8Context ctxt = ((V8ScriptEngine) engine).getV8Context(); V8Object me = (V8Object) ctxt.getGlobal().get("me"); String result = ( (String) invocable.invokeMethod(me, "say", "francois")); ///[object Object] say, hello francois
Original issue reported on code.google.com by francois...@gmail.com on 22 Jul 2013 at 8:29
francois...@gmail.com
please verify the patch with SVN trunk code after r86
Original comment by flier...@gmail.com on 23 Dec 2013 at 11:20
flier...@gmail.com
Original issue reported on code.google.com by
francois...@gmail.com
on 22 Jul 2013 at 8:29