mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-03 15:41:55 +00:00
Fix for SetFatalErrorHandler. This needs to be called for every context isolate.
This commit is contained in:
parent
7e90439cdf
commit
e778b6d7af
7
v8js.cc
7
v8js.cc
@ -518,9 +518,6 @@ static void php_v8js_init(TSRMLS_D) /* {{{ */
|
|||||||
/* Initialize V8 */
|
/* Initialize V8 */
|
||||||
v8::V8::Initialize();
|
v8::V8::Initialize();
|
||||||
|
|
||||||
/* Redirect fatal errors to PHP error handler */
|
|
||||||
v8::V8::SetFatalErrorHandler(php_v8js_fatal_error_handler);
|
|
||||||
|
|
||||||
/* Run only once */
|
/* Run only once */
|
||||||
V8JSG(v8_initialized) = 1;
|
V8JSG(v8_initialized) = 1;
|
||||||
}
|
}
|
||||||
@ -582,6 +579,10 @@ static PHP_METHOD(V8Js, __construct)
|
|||||||
/* Handle scope */
|
/* Handle scope */
|
||||||
v8::HandleScope handle_scope(c->isolate);
|
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 */
|
/* Create global template for global object */
|
||||||
// Now we are using multiple isolates this needs to be created for every context
|
// Now we are using multiple isolates this needs to be created for every context
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user