Skip to content

Commit 2b2591d

Browse files
joyeecheungtargos
authored andcommitted
esm: make hasAsyncGraph non-enumerable
Otherwise the debug() calls would attempt to display it and throws an error. PR-URL: #59905 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 6790093 commit 2b2591d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/module_wrap.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ using v8::ObjectTemplate;
5656
using v8::PrimitiveArray;
5757
using v8::Promise;
5858
using v8::PromiseRejectEvent;
59+
using v8::PropertyAttribute;
5960
using v8::PropertyCallbackInfo;
6061
using v8::ScriptCompiler;
6162
using v8::ScriptOrigin;
@@ -1391,7 +1392,10 @@ void ModuleWrap::CreatePerIsolateProperties(IsolateData* isolate_data,
13911392
SetConstructorFunction(isolate, target, "ModuleWrap", tpl);
13921393

13931394
tpl->InstanceTemplate()->SetLazyDataProperty(
1394-
FIXED_ONE_BYTE_STRING(isolate, "hasAsyncGraph"), HasAsyncGraph);
1395+
FIXED_ONE_BYTE_STRING(isolate, "hasAsyncGraph"),
1396+
HasAsyncGraph,
1397+
Local<Value>(),
1398+
PropertyAttribute::DontEnum);
13951399

13961400
isolate_data->set_module_wrap_constructor_template(tpl);
13971401

0 commit comments

Comments
 (0)