code: private void recordInterfaces(FunctionType constructor, JSType relatedType, Property p) {
      Iterable<ObjectType> interfaces = ancestorInterfaces.get(constructor);
      if (interfaces == null) {
        interfaces = constructor.getAncestorInterfaces();
        ancestorInterfaces.put(constructor, interfaces);
      }
      for (ObjectType itype : interfaces) {
        JSType top = getTypeWithProperty(p.name, itype);
        if (top != null) {
          p.addType(itype, relatedType);
        }
        // If this interface invalidated this property, return now.
        if (p.skipRenaming) {
          return;
        }
      }
    }
docs: Records that this property could be referenced from any interface that this type inherits from.
  
  <p>If the property p is defined only on a subtype of constructor, then this method has no
  effect. But we tried modifying getTypeWithProperty to tell us when the returned type is a
  subtype, and then skip those calls to recordInterface, and there was no speed-up. And it made
  the code harder to understand, so we don't do it.