mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00

Lift `aIid` to compile-time, as a template parameter `InterfaceT`. This simplifies the common case for using `Resolve()`, where the desired and supplied interfaces are the same. (For the as-yet-unattested case where they're not, retain the old functionality by means of a small family of `ResolveAs()` functions.) Additionally, to eliminate a swath of custom logic and magic-number choices surrounding `mHResult`, eliminate `mHResult` itself as well. Instead, since its value was derived from the creation of the underlying `IAgileReference`, any callers that might care can acquire it as an additional return value from a named-constructor function. These collectively trim `AgileReference`'s footprint down to a single `RefPtr`, with all its special member functions having only default implementations. Differential Revision: https://phabricator.services.mozilla.com/D196513