[webkit-reviews] review granted: [Bug 196725] Web Inspector: REGRESSION: lazy agents used outside of frontend/instrumentation can be accessed before being created : [Attachment 367064] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 10 15:19:49 PDT 2019


Timothy Hatcher <timothy at apple.com> has granted Devin Rousso
<drousso at apple.com>'s request for review:
Bug 196725: Web Inspector: REGRESSION: lazy agents used outside of
frontend/instrumentation can be accessed before being created
https://bugs.webkit.org/show_bug.cgi?id=196725

Attachment 367064: Patch

https://bugs.webkit.org/attachment.cgi?id=367064&action=review




--- Comment #4 from Timothy Hatcher <timothy at apple.com> ---
Comment on attachment 367064
  --> https://bugs.webkit.org/attachment.cgi?id=367064
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=367064&action=review

> Source/WebCore/inspector/InspectorController.h:110
> -    InspectorPageAgent* pageAgent() const { return m_pageAgent; }
> +
> +    InspectorDOMAgent& ensureDOMAgent();
> +    WEBCORE_EXPORT InspectorPageAgent& ensurePageAgent();

Why not just have pageAgent() and a domAgent() getter create the agents if
needed and drop the need for the ensure functions?


More information about the webkit-reviews mailing list