On 1/10/19 6:15 PM, Kyle Machulis wrote:
- Removal of [noscript] methods in interfaces in favor of direct calls via
Cast() where possible.

This seems generally reasonably, though I'd like to put in a bit of a vote for the pattern I recently used for nsIPrincipal::IsSystemPrincipal, which looks like this:

IDL:

    %{C++
      inline bool IsSystemPrincipal() const;
    %}

C++ (in BasePrincipal.h):

  inline bool nsIPrincipal::IsSystemPrincipal() const {
    return BasePrincipal::Cast(this)->IsSystemPrincipal();
  }

which avoids having the Cast() calls scattered all over the place...

- Direct getters through Cast() where possible, infallible (also where
possible) otherwise.

Yes, please.

-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to