2323
2424#include " base_object-inl.h"
2525#include " cppgc/allocation.h"
26+ #include " debug_utils-inl.h"
2627#include " memory_tracker-inl.h"
2728#include " module_wrap.h"
2829#include " node_context_data.h"
@@ -484,6 +485,9 @@ Intercepted ContextifyContext::PropertyQueryCallback(
484485 return Intercepted::kNo ;
485486 }
486487
488+ per_process::Debug (
489+ DebugCategory::CONTEXTIFY, " PropertyQuery(%s)\n " , property);
490+
487491 Local<Context> context = ctx->context ();
488492 Local<Object> sandbox = ctx->sandbox ();
489493
@@ -530,6 +534,9 @@ Intercepted ContextifyContext::PropertyGetterCallback(
530534 return Intercepted::kNo ;
531535 }
532536
537+ per_process::Debug (
538+ DebugCategory::CONTEXTIFY, " PropertyGetter(name: %s)\n " , property);
539+
533540 Local<Context> context = ctx->context ();
534541 Local<Object> sandbox = ctx->sandbox ();
535542
@@ -567,6 +574,13 @@ Intercepted ContextifyContext::PropertySetterCallback(
567574 return Intercepted::kNo ;
568575 }
569576
577+ per_process::Debug (
578+ DebugCategory::CONTEXTIFY,
579+ " PropertySetter(name: %s, value: %s), use-strict(%s)\n " ,
580+ property,
581+ value,
582+ args.ShouldThrowOnError ());
583+
570584 Local<Context> context = ctx->context ();
571585 PropertyAttribute attributes = PropertyAttribute::None;
572586 bool is_declared_on_global_proxy = ctx->global_proxy ()
@@ -644,6 +658,9 @@ Intercepted ContextifyContext::PropertyDescriptorCallback(
644658 return Intercepted::kNo ;
645659 }
646660
661+ per_process::Debug (
662+ DebugCategory::CONTEXTIFY, " PropertyDescriptor(name: %s)\n " , property);
663+
647664 Local<Context> context = ctx->context ();
648665
649666 Local<Object> sandbox = ctx->sandbox ();
@@ -670,6 +687,9 @@ Intercepted ContextifyContext::PropertyDefinerCallback(
670687 return Intercepted::kNo ;
671688 }
672689
690+ per_process::Debug (
691+ DebugCategory::CONTEXTIFY, " PropertyDefiner(name: %s)\n " , property);
692+
673693 Local<Context> context = ctx->context ();
674694 Isolate* isolate = Isolate::GetCurrent ();
675695
@@ -740,6 +760,9 @@ Intercepted ContextifyContext::PropertyDeleterCallback(
740760 return Intercepted::kNo ;
741761 }
742762
763+ per_process::Debug (
764+ DebugCategory::CONTEXTIFY, " PropertyDeleter(name: %s)\n " , property);
765+
743766 Maybe<bool > success = ctx->sandbox ()->Delete (ctx->context (), property);
744767
745768 if (success.FromMaybe (false )) {
@@ -767,6 +790,8 @@ void ContextifyContext::PropertyEnumeratorCallback(
767790 // Still initializing
768791 if (IsStillInitializing (ctx)) return ;
769792
793+ per_process::Debug (DebugCategory::CONTEXTIFY, " PropertyEnumerator()\n " );
794+
770795 Local<Array> properties;
771796 // Only get own named properties, exclude indices.
772797 if (!ctx->sandbox ()
@@ -798,6 +823,9 @@ void ContextifyContext::IndexedPropertyEnumeratorCallback(
798823 // Still initializing
799824 if (IsStillInitializing (ctx)) return ;
800825
826+ per_process::Debug (DebugCategory::CONTEXTIFY,
827+ " IndexedPropertyEnumerator()\n " );
828+
801829 Local<Array> properties;
802830
803831 // Only get own index properties.
0 commit comments