@@ -489,7 +489,6 @@ static PHP_METHOD(V8Isolate, SetCaptureStackTraceForUncaughtExceptions) {
489
489
static_cast <v8::StackTrace::StackTraceOptions>(options & PHP_V8_STACK_TRACE_OPTIONS));
490
490
}
491
491
492
-
493
492
static PHP_METHOD (V8Isolate, IsDead) {
494
493
if (zend_parse_parameters_none () == FAILURE) {
495
494
return ;
@@ -501,6 +500,17 @@ static PHP_METHOD(V8Isolate, IsDead) {
501
500
RETURN_BOOL (isolate->IsDead ());
502
501
}
503
502
503
+ static PHP_METHOD (V8Isolate, IsInUse) {
504
+ if (zend_parse_parameters_none () == FAILURE) {
505
+ return ;
506
+ }
507
+
508
+ PHP_V8_ISOLATE_FETCH_WITH_CHECK (getThis (), php_v8_isolate);
509
+ PHP_V8_DECLARE_ISOLATE (php_v8_isolate);
510
+
511
+ RETURN_BOOL (isolate->IsInUse ());
512
+ }
513
+
504
514
505
515
ZEND_BEGIN_ARG_INFO_EX (arginfo_v8_isolate___construct, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0 )
506
516
ZEND_ARG_OBJ_INFO(0 , snapshot, V8\\StartupData, 1 )
@@ -574,6 +584,10 @@ ZEND_END_ARG_INFO()
574
584
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_v8_isolate_IsDead, ZEND_RETURN_VALUE, 0 , _IS_BOOL, NULL , 0 )
575
585
ZEND_END_ARG_INFO()
576
586
587
+ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_v8_isolate_IsInUse, ZEND_RETURN_VALUE, 0 , _IS_BOOL, NULL , 0 )
588
+ ZEND_END_ARG_INFO()
589
+
590
+
577
591
static const zend_function_entry php_v8_isolate_methods[] = {
578
592
PHP_ME (V8Isolate, __construct, arginfo_v8_isolate___construct, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
579
593
@@ -603,6 +617,7 @@ static const zend_function_entry php_v8_isolate_methods[] = {
603
617
604
618
PHP_ME (V8Isolate, SetCaptureStackTraceForUncaughtExceptions, arginfo_v8_isolate_SetCaptureStackTraceForUncaughtExceptions, ZEND_ACC_PUBLIC)
605
619
PHP_ME (V8Isolate, IsDead, arginfo_v8_isolate_IsDead, ZEND_ACC_PUBLIC)
620
+ PHP_ME (V8Isolate, IsInUse, arginfo_v8_isolate_IsInUse, ZEND_ACC_PUBLIC)
606
621
607
622
PHP_FE_END
608
623
};
0 commit comments