[webkit-reviews] review granted: [Bug 229632] Web Inspector: Refactor `WorkerInspectorAgent` to use weak pointers for `WorkerInspectorProxy`s : [Attachment 436803] Patch v1.2 - Address review notes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 30 13:34:48 PDT 2021


Chris Dumez <cdumez at apple.com> has granted Patrick Angle <pangle at apple.com>'s
request for review:
Bug 229632: Web Inspector: Refactor `WorkerInspectorAgent` to use weak pointers
for `WorkerInspectorProxy`s
https://bugs.webkit.org/show_bug.cgi?id=229632

Attachment 436803: Patch v1.2 - Address review notes

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




--- Comment #9 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 436803
  --> https://bugs.webkit.org/attachment.cgi?id=436803
Patch v1.2 - Address review notes

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

r=me with nits.

> Source/WebCore/inspector/agents/InspectorWorkerAgent.cpp:155
> +	   if (!proxyWeakPtr)

It looks better do do the null check after assigning to a strong pointer:
```
RefPtr proxy = proxyWeakPtr.get();
if (!proxy)
    continue;
```

> Source/WebCore/workers/WorkerInspectorProxy.h:80
> +    WorkerInspectorProxy(const String& identifier);

Should be marked explicit.


More information about the webkit-reviews mailing list