Title: [254325] trunk/Source/WebKit
- Revision
- 254325
- Author
- ross.kirsl...@sony.com
- Date
- 2020-01-09 20:44:38 -0800 (Thu, 09 Jan 2020)
Log Message
REGRESSION(r253868): Socket-based remote inspector cannot inspect any target
https://bugs.webkit.org/show_bug.cgi?id=206045
Reviewed by Don Olmstead.
Revert part of patch, ensuring Target struct stays consistent with socket inspector's messaging protocol.
* UIProcess/socket/RemoteInspectorClient.cpp:
(WebKit::RemoteInspectorClient::setTargetList):
(WebKit::debuggableTypeToString): Deleted.
* UIProcess/socket/RemoteInspectorClient.h:
* UIProcess/socket/RemoteInspectorProtocolHandler.cpp:
(WebKit::RemoteInspectorProtocolHandler::targetListChanged):
(WebKit::debuggableTypeToString): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (254324 => 254325)
--- trunk/Source/WebKit/ChangeLog 2020-01-10 03:59:13 UTC (rev 254324)
+++ trunk/Source/WebKit/ChangeLog 2020-01-10 04:44:38 UTC (rev 254325)
@@ -1,3 +1,20 @@
+2020-01-09 Ross Kirsling <ross.kirsl...@sony.com>
+
+ REGRESSION(r253868): Socket-based remote inspector cannot inspect any target
+ https://bugs.webkit.org/show_bug.cgi?id=206045
+
+ Reviewed by Don Olmstead.
+
+ Revert part of patch, ensuring Target struct stays consistent with socket inspector's messaging protocol.
+
+ * UIProcess/socket/RemoteInspectorClient.cpp:
+ (WebKit::RemoteInspectorClient::setTargetList):
+ (WebKit::debuggableTypeToString): Deleted.
+ * UIProcess/socket/RemoteInspectorClient.h:
+ * UIProcess/socket/RemoteInspectorProtocolHandler.cpp:
+ (WebKit::RemoteInspectorProtocolHandler::targetListChanged):
+ (WebKit::debuggableTypeToString): Deleted.
+
2020-01-09 Tim Horton <timothy_hor...@apple.com>
Adopt TARGET_OS_MACCATALYST in more places
Modified: trunk/Source/WebKit/UIProcess/socket/RemoteInspectorClient.cpp (254324 => 254325)
--- trunk/Source/WebKit/UIProcess/socket/RemoteInspectorClient.cpp 2020-01-10 03:59:13 UTC (rev 254324)
+++ trunk/Source/WebKit/UIProcess/socket/RemoteInspectorClient.cpp 2020-01-10 04:44:38 UTC (rev 254325)
@@ -201,23 +201,6 @@
m_backendCommandsURL = makeString("data:text/_javascript_;base64,", base64Encode(event.message->utf8()));
}
-static String debuggableTypeToString(Inspector::DebuggableType debuggableType)
-{
- switch (debuggableType) {
- case Inspector::DebuggableType::_javascript_:
- return "_javascript_"_s;
- case Inspector::DebuggableType::Page:
- return "page"_s;
- case Inspector::DebuggableType::ServiceWorker:
- return "service-worker"_s;
- case Inspector::DebuggableType::WebPage:
- return "web-page"_s;
- }
-
- ASSERT_NOT_REACHED();
- return String();
-}
-
void RemoteInspectorClient::setTargetList(const Event& event)
{
if (!event.connectionID || !event.message)
@@ -241,7 +224,7 @@
if (!itemObject->getInteger("targetID"_s, target.id)
|| !itemObject->getString("name"_s, target.name)
|| !itemObject->getString("url"_s, target.url)
- || !itemObject->getString("type"_s, debuggableTypeToString(target.type)))
+ || !itemObject->getString("type"_s, target.type))
continue;
targetList.append(WTFMove(target));
Modified: trunk/Source/WebKit/UIProcess/socket/RemoteInspectorClient.h (254324 => 254325)
--- trunk/Source/WebKit/UIProcess/socket/RemoteInspectorClient.h 2020-01-10 03:59:13 UTC (rev 254324)
+++ trunk/Source/WebKit/UIProcess/socket/RemoteInspectorClient.h 2020-01-10 04:44:38 UTC (rev 254325)
@@ -56,9 +56,11 @@
RemoteInspectorClient(URL, RemoteInspectorObserver&);
~RemoteInspectorClient();
+ // FIXME: We should update the messaging protocol to use DebuggableType instead of String for the target type.
+ // https://bugs.webkit.org/show_bug.cgi?id=206047
struct Target {
TargetID id;
- Inspector::DebuggableType type;
+ String type;
String name;
String url;
};
Modified: trunk/Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp (254324 => 254325)
--- trunk/Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp 2020-01-10 03:59:13 UTC (rev 254324)
+++ trunk/Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp 2020-01-10 04:44:38 UTC (rev 254325)
@@ -95,23 +95,6 @@
return WTF::nullopt;
}
-static String debuggableTypeToString(Inspector::DebuggableType debuggableType)
-{
- switch (debuggableType) {
- case Inspector::DebuggableType::_javascript_:
- return "_javascript_"_s;
- case Inspector::DebuggableType::Page:
- return "page"_s;
- case Inspector::DebuggableType::ServiceWorker:
- return "service-worker"_s;
- case Inspector::DebuggableType::WebPage:
- return "web-page"_s;
- }
-
- ASSERT_NOT_REACHED();
- return String();
-}
-
void RemoteInspectorProtocolHandler::inspect(const String& hostAndPort, ConnectionID connectionID, TargetID targetID, const String& type)
{
auto debuggableType = parseDebuggableTypeFromString(type);
@@ -145,7 +128,7 @@
html.append(makeString(
"<tbody><tr>"
"<td class=\"data\"><div class=\"targetname\">", target.name, "</div><div class=\"targeturl\">", target.url, "</div></td>"
- "<td class=\"input\"><input type=\"button\" value=\"Inspect\" _onclick_=\"window.webkit.messageHandlers.inspector.postMessage(\\'", connectionID, ":", target.id, ":", debuggableTypeToString(target.type), "\\');\"></td>"
+ "<td class=\"input\"><input type=\"button\" value=\"Inspect\" _onclick_=\"window.webkit.messageHandlers.inspector.postMessage(\\'", connectionID, ":", target.id, ":", target.type, "\\');\"></td>"
"</tr></tbody>"
));
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes