vm: store MicrotaskQueue in ContextifyContext directly by joyeecheung · Pull Request #48982 · nodejs/node
Previously the ContextifyContext holds a MicrotaskQueueWrap which in turns holds a MicrotaskQueue in a shared pointer. The indirection is actually unnecessary, we can directly hold the MicrotaskQueue via a unique pointer in ContextifyContext, the lifetime would still remain the same but the graph would be simpler, and this removes the additional JS -> C++ to create the wrapper object.
added
c++
labels
Aug 1, 2023Qard approved these changes Aug 15, 2023
This was referenced
Aug 17, 2023UlisesGascon pushed a commit that referenced this pull request
Sep 10, 2023Previously the ContextifyContext holds a MicrotaskQueueWrap which in turns holds a MicrotaskQueue in a shared pointer. The indirection is actually unnecessary, we can directly hold the MicrotaskQueue via a unique pointer in ContextifyContext, the lifetime would still remain the same but the graph would be simpler, and this removes the additional JS -> C++ to create the wrapper object. PR-URL: #48982 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters