diff --git a/v8js_timer.cc b/v8js_timer.cc index a3ae679..cb678f1 100644 --- a/v8js_timer.cc +++ b/v8js_timer.cc @@ -45,7 +45,11 @@ static void v8js_timer_interrupt_handler(v8::Isolate *isolate, void *data) { /* do { if (send_notification) { +#if PHP_V8_API_VERSION >= 3028036 isolate->LowMemoryNotification(); +#else + v8::V8::LowMemoryNotification(); +#endif has_sent_notification = true; } diff --git a/v8js_v8.cc b/v8js_v8.cc index 1ab13ab..8d53665 100644 --- a/v8js_v8.cc +++ b/v8js_v8.cc @@ -210,7 +210,11 @@ void v8js_v8_call(v8js_ctx *c, zval **return_value, isolate->GetHeapStatistics(&hs); if (hs.used_heap_size() > memory_limit) { +#if PHP_V8_API_VERSION >= 3028036 isolate->LowMemoryNotification(); +#else + v8::V8::LowMemoryNotification(); +#endif isolate->GetHeapStatistics(&hs); if (hs.used_heap_size() > memory_limit) {