0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 14:01:53 +00:00

Fix for SetFatalErrorHandler. This needs to be called for every context isolate.

This commit is contained in:
Simon Best 2013-04-14 11:19:50 +01:00
parent 7e90439cdf
commit e778b6d7af

View File

@ -518,9 +518,6 @@ static void php_v8js_init(TSRMLS_D) /* {{{ */
/* Initialize V8 */
v8::V8::Initialize();
/* Redirect fatal errors to PHP error handler */
v8::V8::SetFatalErrorHandler(php_v8js_fatal_error_handler);
/* Run only once */
V8JSG(v8_initialized) = 1;
}
@ -582,6 +579,10 @@ static PHP_METHOD(V8Js, __construct)
/* Handle scope */
v8::HandleScope handle_scope(c->isolate);
/* Redirect fatal errors to PHP error handler */
// This needs to be done within the context isolate
v8::V8::SetFatalErrorHandler(php_v8js_fatal_error_handler);
/* Create global template for global object */
// Now we are using multiple isolates this needs to be created for every context