Hi Vladimir, V8 should throw similar exception.
This assertion either indicates an V8 API misuse (e.g. you are trying to use empty Handle<>) or a bug in V8. Can you please provide more details about the issue (version of V8, crash stack trace, etc)? Do you have a standalone reproduction for this crash? -- Vyacheslav Egorov On Tue, Dec 21, 2010 at 12:19 PM, Vladimir Stepanov < [email protected]> wrote: > 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 > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
