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,12 @@ Intercepted ContextifyContext::PropertySetterCallback(
567574 return Intercepted::kNo ;
568575 }
569576
577+ per_process::Debug (DebugCategory::CONTEXTIFY,
578+ " PropertySetter(name: %s, value: %s), use-strict(%s)\n " ,
579+ property,
580+ value,
581+ args.ShouldThrowOnError ());
582+
570583 Local<Context> context = ctx->context ();
571584 PropertyAttribute attributes = PropertyAttribute::None;
572585 bool is_declared_on_global_proxy = ctx->global_proxy ()
@@ -655,6 +668,9 @@ Intercepted ContextifyContext::PropertyDescriptorCallback(
655668 return Intercepted::kNo ;
656669 }
657670
671+ per_process::Debug (
672+ DebugCategory::CONTEXTIFY, " PropertyDescriptor(name: %s)\n " , property);
673+
658674 Local<Context> context = ctx->context ();
659675
660676 Local<Object> sandbox = ctx->sandbox ();
@@ -681,6 +697,9 @@ Intercepted ContextifyContext::PropertyDefinerCallback(
681697 return Intercepted::kNo ;
682698 }
683699
700+ per_process::Debug (
701+ DebugCategory::CONTEXTIFY, " PropertyDefiner(name: %s)\n " , property);
702+
684703 Local<Context> context = ctx->context ();
685704 Isolate* isolate = Isolate::GetCurrent ();
686705
@@ -751,6 +770,9 @@ Intercepted ContextifyContext::PropertyDeleterCallback(
751770 return Intercepted::kNo ;
752771 }
753772
773+ per_process::Debug (
774+ DebugCategory::CONTEXTIFY, " PropertyDeleter(name: %s)\n " , property);
775+
754776 Maybe<bool > success = ctx->sandbox ()->Delete (ctx->context (), property);
755777
756778 if (success.FromMaybe (false )) {
@@ -778,6 +800,8 @@ void ContextifyContext::PropertyEnumeratorCallback(
778800 // Still initializing
779801 if (IsStillInitializing (ctx)) return ;
780802
803+ per_process::Debug (DebugCategory::CONTEXTIFY, " PropertyEnumerator()\n " );
804+
781805 Local<Array> properties;
782806 // Only get own named properties, exclude indices.
783807 if (!ctx->sandbox ()
@@ -809,6 +833,9 @@ void ContextifyContext::IndexedPropertyEnumeratorCallback(
809833 // Still initializing
810834 if (IsStillInitializing (ctx)) return ;
811835
836+ per_process::Debug (DebugCategory::CONTEXTIFY,
837+ " IndexedPropertyEnumerator()\n " );
838+
812839 Local<Array> properties;
813840
814841 // Only get own index properties.
0 commit comments