Description[ES6 modules] Fix context leak. ModuleScript should use TraceWrapperV8Reference to hold onto v8::Module.
Before this CL, ModuleScript referenced v8::Module via SharedPersistent<> in ScriptModule.
This created cycle of v8::Context -> V8PerContextData -> Modulator -> ModuleMap -> ModuleScript -(persistent)-> v8::Module -> v8::Context.
This CL breaks the cycle (partially) by making ModuleScript use TraceWrapperV8Reference to reference v8::Module, and create ScriptModule on the fly.
More CLs will follow to break other parts of the cycle graph.
BUG=594639, 725816
Review-Url: https://codereview.chromium.org/2903813002
Cr-Commit-Position: refs/heads/master@{#474543}
Committed: https://chromium.googlesource.com/chromium/src/+/7fa31ddf3b196d9873d615e7aabe4285fed4cef8
Patch Set 1 #Patch Set 2 : expected.txt #
Total comments: 2
Patch Set 3 : testfix #Messages
Total messages: 20 (12 generated)
|