Introduce WebContentsObserverList to encapsulate common behaviour
Add a dedicated helper struct for holding WebContentsObservers. This allows us to ensure that iteration over all observers can be detected: - This can replace existing is_notifying_observer_ WebContentsImpl member and ensure that it's set for almost all observer iterations. - This allows us to emit a trace event covering observer iteration. Escape hatch is kept for now for the three places which want to return value as soon as matching observer is found. Also WeakPtr-based logic is added to RenderViewTerminated as some observers are actually trying to delete WebContents there. R=nasko@chromium.org Change-Id: Ic94cf9bbc83b2d9bfe93a3090a4f4af3fd8f60dc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343269Reviewed-by:Sami Kyöstilä <skyostil@chromium.org> Reviewed-by:
Nasko Oskov <nasko@chromium.org> Commit-Queue: Alexander Timin <altimin@chromium.org> Cr-Commit-Position: refs/heads/master@{#797266}
Showing
This diff is collapsed.
Please register or sign in to comment