[webkit-reviews] review granted: [Bug 171904] Web Inspector: Web Sockets: Unable to inspect a WebSocket that receives >50 messages per second : [Attachment 311653] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 1 14:13:03 PDT 2017
Matt Baker <mattbaker at apple.com> has granted Nikita Vasilyev
<nvasilyev at apple.com>'s request for review:
Bug 171904: Web Inspector: Web Sockets: Unable to inspect a WebSocket that
receives >50 messages per second
https://bugs.webkit.org/show_bug.cgi?id=171904
Attachment 311653: Patch
https://bugs.webkit.org/attachment.cgi?id=311653&action=review
--- Comment #15 from Matt Baker <mattbaker at apple.com> ---
Comment on attachment 311653
--> https://bugs.webkit.org/attachment.cgi?id=311653
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=311653&action=review
r=me, with a comment.
> Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js:156
> + if (treeElement.status instanceof DocumentFragment ||
!treeElement.treeOutline)
The check for status instanceOf DocumentFragment is a little fragile, since
status could be technically be a DocumentFragment other than the goto/close
fragment that gets added below. This could be more future-proof by adding a
property to the status element:
treeElementAddedOrChanged(treeElement)
{
if (!treeElement.treeOutline)
return;
if (treeElement.status &&
treeElement.status[WebInspector.NetworkSidebarPanel.TreeElementStatusButtonSymb
ol])
return;
treeElement.status[WebInspector.NetworkSidebarPanel.TreeElementStatusButtonSymb
ol] = true;
...
}
Putting the property on status instead of treeElement also ensures that the
property can't get out of sync by someone setting the status elsewhere.
More information about the webkit-reviews
mailing list