This came out of comments in a code review: https://chromium-review.googlesource.com/c/chromium/src/+/1158117/3/third_party/blink/renderer/platform/loader/fetch/resource_client.h#56
Each Resource subclass expects that any clients that register with it will be of a given ResourceClient subclass. There used to be many ResourceClient subclasses with more complicated rules about which Resource went with which ResourceClient subclass, and we have a ResourceClientType enum that is used in DCHECKs to enforces those rules.
At this point, though, we have only 2 specialized types of ResourceClient, and that enum seems unnecessarily complex. We could probably replace it with virtual IsRawResourceClient() and IsFontResourceClient() functions on ResourceClient, and use those for the DCHECKs.
Comment 1 by bugdroid1@chromium.org
, Sep 7