While embedding V8 in C++ application I have faced following problem
( Windows version).
Having next script :
tmp = foo();
if(0 == tmp.length)
{
bar();
};
foo() may return null. I understand that used "if" case is incorrect
and should be changed to "if(tmp && 0 == tmp.length)", but V8 behavior
is really strange in case of trying to access properties of "null" or
"undefined" object.
It just aborts application execution by calling stdlib.h abort().
void OS::Abort() {
if (!IsDebuggerPresent()) {
#ifdef _MSC_VER
// Make the MSVCRT do a silent abort.
_set_abort_behavior(0, _WRITE_ABORT_MSG);
_set_abort_behavior(0, _CALL_REPORTFAULT);
#endif // _MSC_VER
abort();
} else {
DebugBreak();
}
}
with following error displayed
#
# Fatal error in d:\work\v8\repo\src\handles-inl.h, line 48
# CHECK(location_ != 0) failed
#
Is there any way to prevent V8 application close?
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users