I'm loathe to have something like RenderFrameHostObserver; our experience with having multiple observers in the browser process for WC and RVH were not good (confusing as to where callbacks/state go). It also seems burdensome to require every WCO to also create RFHOs and manage their lifetime.
Hey Charlie,I know I have heard thoughts about splitting up WebContentsObserver many times before, as it presents a huge vtable, there's 1000s of wasted calls each time it is used, and it is very hard to hold with so many things. Given that, I was curious if you see RenderFrameHostObserver to be aligned with splitting up WebContentsObserver or if it is doing something entirely different?If it's aligned then maybe that changes the discussion a little bit, or maybe not?Cheers,Dana
--
You received this message because you are subscribed to the Google Groups "content-owners" group.
To unsubscribe from this group and stop receiving emails from it, send an email to content-owner...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/content-owners/CAH%2B8MBaXb77mBhKVfPWKDktX%2B%2Bn2sr779aTE2jS9NW8QAtd4OQ%40mail.gmail.com.
I know I have heard thoughts about splitting up WebContentsObserver many times before, as it presents a huge vtable, there's 1000s of wasted calls each time it is used, and it is very hard to hold with so many things
Indeed, that is the major reason for RFHO creation, in the single case of BFCache. I could revert it back and add the logic to WCO, but I also would love to know about the ideas of splitting WCO. Do you have any previous metrics/number/discussion?On Wed, Jan 11, 2023 at 1:50 AM Kentaro Hara <har...@chromium.org> wrote:+1 to Charlie that we should discuss whether we want to split WCO into more specific observers or not in general -- if the answer is yes, RFHO is great; otherwise not :)From my perspective, the biggest cons of the giant WCO is the performance overhead of wasted method calls. Do we have any evidence to believe that the overhead is a problem in practice?On Wed, Jan 11, 2023 at 4:16 AM <dan...@chromium.org> wrote:
On Tue, Jan 10, 2023 at 2:14 PM Charlie Reis <cr...@chromium.org> wrote:
Yes, there may indeed be reasons to consider it. I just don't want to add it for convenience in a single CL without thinking about the wide-ranging implications (e.g., making features choose between WCO and RFHO, which APIs belong where, what happens as new APIs get added to one and not the other, etc). This feels like something that should have a design doc and discussion, with a clear statement of the problems we're trying to solve by introducing a new observer interface (like the ones you mention). It's also a place where we should carefully consider any API changes that might reduce the likelihood of RFH UaFs.
All agreement from me there.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/content-owners/CAHtyhaR_bG8Q3YMSxPgv5T3pPQL%2BZnUNu7_SEDP_13NDXwCOqQ%40mail.gmail.com.
--Kentaro Hara, Tokyo