GeezerVison is showing github.com — esm: make hasAsyncGraph non-enumerable · nodejs/node@2b2591d
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/module_wrap.cc +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -56,6 +56,7 @@ using v8::ObjectTemplate; |
56 | 56 | using v8::PrimitiveArray; |
57 | 57 | using v8::Promise; |
58 | 58 | using v8::PromiseRejectEvent; |
| 59 | +using v8::PropertyAttribute; |
59 | 60 | using v8::PropertyCallbackInfo; |
60 | 61 | using v8::ScriptCompiler; |
61 | 62 | using v8::ScriptOrigin; |
@@ -1391,7 +1392,10 @@ void ModuleWrap::CreatePerIsolateProperties(IsolateData* isolate_data, |
1391 | 1392 | SetConstructorFunction(isolate, target, "ModuleWrap", tpl); |
1392 | 1393 |
|
1393 | 1394 | 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); |
1395 | 1399 |
|
1396 | 1400 | isolate_data->set_module_wrap_constructor_template(tpl); |
1397 | 1401 |
|
|