[webkit-reviews] review granted: [Bug 172878] Web Inspector: Add ContextMenu item to log WebSocket object to console : [Attachment 312014] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 7 13:46:40 PDT 2017


Joseph Pecoraro <joepeck at webkit.org> has granted Devin Rousso
<drousso at apple.com>'s request for review:
Bug 172878: Web Inspector: Add ContextMenu item to log WebSocket object to
console
https://bugs.webkit.org/show_bug.cgi?id=172878

Attachment 312014: Patch

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




--- Comment #5 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 312014
  --> https://bugs.webkit.org/attachment.cgi?id=312014
Patch

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

r=me

> Source/WebCore/ChangeLog:16
> +	   Loops over the static allActiveWebSockets to find one with the given
requestId.  If found,

Style: one space after a period, always.

> Source/JavaScriptCore/inspector/protocol/Network.json:201
> +		   { "name": "requestId", "$ref": "RequestId", "description":
"Identifier of the WebSocket resource to resolve" },

Nit: The description is a sentences, end it in a period.

> Source/WebCore/inspector/InspectorNetworkAgent.cpp:845
> +    String objectGroupName = objectGroup ? *objectGroup : emptyString();

I think you can just use String() instead of emptyString(). If so that should
be slightly cheaper.

> Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js:183
> +	   super.populateContextMenu(contextMenu, event);
> +
>	   WebInspector.appendContextMenuItemsForSourceCode(contextMenu,
this._resource);
>  
>	   super.populateContextMenu(contextMenu, event);

super.foo() is now here twice. That seems incorrect. Eliminate the new one?

>
LayoutTests/http/tests/websocket/tests/hybi/inspector/resolveWebSocket.html:33
> +	       const objectGroup = undefined;

We frequently use the "test" object group in tests. You could use that instead
of undefined.

>
LayoutTests/http/tests/websocket/tests/hybi/inspector/resolveWebSocket.html:54
> +	       const requestIdentifier = "-1";

Lets make a more unlikely to exist ID here. Like "DOES_NOT_EXIST" or something
super obvious.


More information about the webkit-reviews mailing list