| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 91c8624 commit 55011d2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -198,6 +198,9 @@ const { | |||
| 198 | 198 | setInternalLoaders, | |
| 199 | 199 | } = internalBinding('builtins'); | |
| 200 | 200 | ||
| 201 | + const { ModuleWrap } = internalBinding('module_wrap'); | ||
| 202 | + ObjectSetPrototypeOf(ModuleWrap.prototype, null); | ||
| 203 | + | ||
| 201 | 204 | const getOwn = (target, property, receiver) => { | |
| 202 | 205 | return ObjectPrototypeHasOwnProperty(target, property) ? | |
| 203 | 206 | ReflectGet(target, property, receiver) : | |
@@ -338,16 +341,11 @@ class BuiltinModule { | |||
| 338 | 341 | const internal = StringPrototypeStartsWith(this.id, 'internal/'); | |
| 339 | 342 | this.exportKeys = internal ? [] : ObjectKeys(this.exports); | |
| 340 | 343 | } | |
| 341 | - this.getESMFacade(); | ||
| 342 | - this.syncExports(); | ||
| 343 | 344 | return this.exports; | |
| 344 | 345 | } | |
| 345 | 346 | ||
| 346 | 347 | getESMFacade() { | |
| 347 | 348 | if (this.module) return this.module; | |
| 348 | - const { ModuleWrap } = internalBinding('module_wrap'); | ||
| 349 | - // TODO(aduh95): move this to C++, alongside the initialization of the class. | ||
| 350 | - ObjectSetPrototypeOf(ModuleWrap.prototype, null); | ||
| 351 | 349 | const url = `node:${this.id}`; | |
| 352 | 350 | const builtin = this; | |
| 353 | 351 | const exportsKeys = ArrayPrototypeSlice(this.exportKeys); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments