Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
Commit2e05cf1
module: fix leak of vm.SyntheticModule
Previously we maintain a strong persistent reference to theModuleWrap to retrieve the ID-to-ModuleWrap mapping fromthe HostImportModuleDynamicallyCallback using the number IDstored in the host-defined options. As a result the ModuleWrapwould be kept alive until the Environment is shut down, whichwould be a leak for user code. With the new symbol-basedhost-defined option we can just get the ModuleWrap from theJS-land WeakMap so there's now no need to maintain thisstrong reference. This would at least fix the leak forvm.SyntheticModule. vm.SourceTextModule is still leakingdue to the strong persistent reference to the v8::Module.PR-URL:#48510Backport-PR-URL:#51004Refs:#44211Refs:#42080Refs:#47096Refs:#43205Refs:#38695Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>1 parenta86a2e1 commit2e05cf1
File tree
2 files changed
+24
-0
lines changed- src
- test/es-module
2 files changed
+24
-0
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
| 67 | + | |
67 | 68 |
| |
68 | 69 |
| |
69 | 70 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + |
0 commit comments
Comments
(0)