We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4eb03f commit d5bd0dbCopy full SHA for d5bd0db
src/node_contextify.cc
@@ -609,11 +609,15 @@ void ContextifyContext::PropertyDefinerCallback(
609
bool read_only =
610
static_cast<int>(attributes) &
611
static_cast<int>(PropertyAttribute::ReadOnly);
612
+ bool dont_delete =
613
+ static_cast<int>(attributes) &
614
+ static_cast<int>(PropertyAttribute::DontDelete);
615
- // If the property is set on the global as read_only, don't change it on
- // the global or sandbox.
- if (is_declared && read_only)
616
+ // If the property is set on the global as neither writable nor
617
+ // configurable, don't change it on the global or sandbox.
618
+ if (is_declared && read_only && dont_delete) {
619
return;
620
+ }
621
622
Local<Object> sandbox = ctx->sandbox();
623
0 commit comments