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
*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
{
//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
{
//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
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
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
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