Re: [v8-users] call c++ function in javascirpt can't set return value

2013-11-17 Thread Michael demiGod
Yeah, thank you for your answer. 在 2013年11月15日星期五UTC+8下午8时33分51秒,Ben Noordhuis写道: On Fri, Nov 15, 2013 at 3:33 AM, Michael demiGod dem...@gmail.comjavascript: wrote: cpp: static v8::Handlev8::Value myFunc(const v8::FunctionCallbackInfov8::Value args) { return Undefined

[v8-users] call c++ function in javascirpt can't set return value

2013-11-14 Thread Michael demiGod
*cpp:* static v8::Handlev8::Value myFunc(const v8::FunctionCallbackInfov8::Value args) { return Undefined(); } HandleObjectTemplate global_templ = ObjectTemplate::New() ; global_templ-Set(String::New(myFunc), FunctionTemplate::New(myFunc)) ; *console:* test.cc:138:80: error: invalid

[v8-users] Re: V8 how to swallow javascript uncaught exception and continue running script

2013-11-13 Thread Michael demiGod
{ //cleanup } var str = 'hello' + 'world'; On Friday, November 8, 2013 9:56:23 AM UTC+2, Michael demiGod wrote: script: 1 document.write('foo'); 2 var str = 'hello' + 'world'; 3 ... cpp: v8::TryCatch try_catch; v8::Handle result = script-Run(); result: test.js:1: Uncaught

[v8-users] Re: V8 how to swallow javascript uncaught exception and continue running script

2013-11-13 Thread Michael demiGod
{ //cleanup } var str = 'hello' + 'world'; On Friday, November 8, 2013 9:56:23 AM UTC+2, Michael demiGod wrote: script: 1 document.write('foo'); 2 var str = 'hello' + 'world'; 3 ... cpp: v8::TryCatch try_catch; v8::Handle result = script-Run(); result: test.js:1: Uncaught

Re: [v8-users] V8 how to swallow javascript uncaught exception and continue running script

2013-11-13 Thread Michael demiGod
Thank you for your answer, I achieved it by changing v8 source code. 在 2013年11月8日星期五UTC+8下午4时01分27秒,Jakob Kummerow写道: No. On Fri, Nov 8, 2013 at 8:56 AM, Michael demiGod dem...@gmail.comjavascript: wrote: script: 1 document.write('foo'); 2 var str = 'hello' + 'world'; 3 ... cpp

[v8-users] change V8 source to swallow javascript uncaught exception and continue running script for special usage

2013-11-08 Thread Michael demiGod
script: 1 document.write('foo'); 2 var str = 'hello' + 'world'; 3 ... cpp: v8::Handle result = script-Run(); result: test.js:1: Uncaught ReferenceError: document is not defined I want to change some v8 source code for specail usage, let it continue running script and get

[v8-users] V8 how to swallow javascript uncaught exception and continue running script

2013-11-07 Thread Michael demiGod
script: 1 document.write('foo'); 2 var str = 'hello' + 'world'; 3 ... cpp: v8::TryCatch try_catch; v8::Handle result = script-Run(); result: test.js:1: Uncaught ReferenceError: document is not defined Although I can use v8::trycatch to get exception info, I'll miss the following