From 062e01361736795884cc3f544743c566f8b66b48 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 25 Nov 2016 19:17:26 -0800 Subject: [PATCH] ircd::js: GC Weak pointer callback logging stubs. --- include/ircd/js/runtime.h | 2 ++ ircd/js.cc | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/include/ircd/js/runtime.h b/include/ircd/js/runtime.h index 9ede24a65..e6d8e8d6f 100644 --- a/include/ircd/js/runtime.h +++ b/include/ircd/js/runtime.h @@ -34,6 +34,8 @@ class runtime static void handle_finalize(JSFreeOp *, JSFinalizeStatus, bool is_compartment, void *) noexcept; static void handle_trace_gray(JSTracer *, void *) noexcept; static void handle_trace_extra(JSTracer *, void *) noexcept; + static void handle_weak_pointer_zone(JSRuntime *, void *) noexcept; + static void handle_weak_pointer_compartment(JSRuntime *, JSCompartment *, void *) noexcept; static void handle_slice(JSRuntime *, JS::GCProgress, const JS::GCDescription &) noexcept; static void handle_zone_sweep(JS::Zone *) noexcept; static void handle_zone_destroy(JS::Zone *) noexcept; diff --git a/ircd/js.cc b/ircd/js.cc index e6e775d56..ae3524a02 100644 --- a/ircd/js.cc +++ b/ircd/js.cc @@ -3744,6 +3744,28 @@ noexcept reflect(progress)); } +void +ircd::js::runtime::handle_weak_pointer_compartment(JSRuntime *const rt, + JSCompartment *const comp, + void *const data) +noexcept +{ + log.debug("runtime(%p): weak pointer compartment(%p) %p", + (const void *)rt, + (const void *)comp, + data); +} + +void +ircd::js::runtime::handle_weak_pointer_zone(JSRuntime *const rt, + void *const data) +noexcept +{ + log.debug("runtime(%p): weak pointer zone %p", + (const void *)rt, + data); +} + void ircd::js::runtime::handle_trace_extra(JSTracer *const tracer, void *const priv)