vm: store MicrotaskQueue in ContextifyContext directly by joyeecheung · Pull Request #48982 · nodejs/node

@joyeecheung

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.

@nodejs-github-bot added c++

Issues and PRs that require attention from people who are familiar with C++.

lib / src

Issues and PRs related to general changes in the lib or src directory.

needs-ci

PRs that need a full CI run.

labels

Aug 1, 2023

Qard

Qard

Qard approved these changes Aug 15, 2023

This was referenced

Aug 17, 2023

UlisesGascon pushed a commit that referenced this pull request

Sep 10, 2023
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.

PR-URL: #48982
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>