mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00

We'd like to offer a way for developers to safely do asynchronous instantiations of COM objects. This patch adds a static CreateInstance method to mscom::EnsureMTA that facilitates this under certain conditions (as outlined in the comments). To help ensure that this is as safe as possible, we return a MozPromise that, once resolved, produces an AgileReference that may then be passed between threads, and may then be resolved when a specific thread needs to access the interface. Differential Revision: https://phabricator.services.mozilla.com/D44519 --HG-- extra : moz-landing-system : lando