Title: [224704] trunk/Source
Revision
224704
Author
[email protected]
Date
2017-11-10 14:10:05 -0800 (Fri, 10 Nov 2017)

Log Message

Web Inspector: Make http status codes be "integer" instead of "number" in protocol
https://bugs.webkit.org/show_bug.cgi?id=179543

Patch by Joseph Pecoraro <[email protected]> on 2017-11-10
Reviewed by Antoine Quint.

Source/_javascript_Core:

* inspector/protocol/Network.json:
Use a better type for the status code.

Source/WebCore:

* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
No need for the temporary or type change.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (224703 => 224704)


--- trunk/Source/_javascript_Core/ChangeLog	2017-11-10 22:03:06 UTC (rev 224703)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-11-10 22:10:05 UTC (rev 224704)
@@ -1,3 +1,13 @@
+2017-11-10  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Make http status codes be "integer" instead of "number" in protocol
+        https://bugs.webkit.org/show_bug.cgi?id=179543
+
+        Reviewed by Antoine Quint.
+
+        * inspector/protocol/Network.json:
+        Use a better type for the status code.
+
 2017-11-10  Robin Morisset  <[email protected]>
 
         The memory consumption of DFG::BasicBlock can be easily reduced a bit

Modified: trunk/Source/_javascript_Core/inspector/protocol/Network.json (224703 => 224704)


--- trunk/Source/_javascript_Core/inspector/protocol/Network.json	2017-11-10 22:03:06 UTC (rev 224703)
+++ trunk/Source/_javascript_Core/inspector/protocol/Network.json	2017-11-10 22:10:05 UTC (rev 224704)
@@ -65,7 +65,7 @@
             "description": "HTTP response data.",
             "properties": [
                 { "name": "url", "type": "string", "description": "Response URL. This URL can be different from CachedResource.url in case of redirect." },
-                { "name": "status", "type": "number", "description": "HTTP response status code." },
+                { "name": "status", "type": "integer", "description": "HTTP response status code." },
                 { "name": "statusText", "type": "string", "description": "HTTP response status text." },
                 { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." },
                 { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." },
@@ -106,7 +106,7 @@
             "type": "object",
             "description": "WebSocket response data.",
             "properties": [
-                { "name": "status", "type": "number", "description": "HTTP response status code." },
+                { "name": "status", "type": "integer", "description": "HTTP response status code." },
                 { "name": "statusText", "type": "string", "description": "HTTP response status text." },
                 { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
             ]
@@ -191,7 +191,7 @@
             "returns": [
                 { "name": "content", "type": "string", "description": "Resource content." },
                 { "name": "mimeType", "type": "string", "description": "Resource mimeType." },
-                { "name": "status", "type": "number", "description": "HTTP response status code." }
+                { "name": "status", "type": "integer", "description": "HTTP response status code." }
             ]
         },
         {

Modified: trunk/Source/WebCore/ChangeLog (224703 => 224704)


--- trunk/Source/WebCore/ChangeLog	2017-11-10 22:03:06 UTC (rev 224703)
+++ trunk/Source/WebCore/ChangeLog	2017-11-10 22:10:05 UTC (rev 224704)
@@ -1,3 +1,14 @@
+2017-11-10  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Make http status codes be "integer" instead of "number" in protocol
+        https://bugs.webkit.org/show_bug.cgi?id=179543
+
+        Reviewed by Antoine Quint.
+
+        * inspector/agents/InspectorNetworkAgent.cpp:
+        (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
+        No need for the temporary or type change.
+
 2017-11-10  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r224602 and r224697.

Modified: trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp (224703 => 224704)


--- trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp	2017-11-10 22:03:06 UTC (rev 224703)
+++ trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp	2017-11-10 22:10:05 UTC (rev 224704)
@@ -287,12 +287,11 @@
     if (response.isNull())
         return nullptr;
 
-    double status = response.httpStatusCode();
     Ref<InspectorObject> headers = buildObjectForHeaders(response.httpHeaderFields());
 
     auto responseObject = Inspector::Protocol::Network::Response::create()
         .setUrl(response.url().string())
-        .setStatus(status)
+        .setStatus(response.httpStatusCode())
         .setStatusText(response.httpStatusText())
         .setHeaders(WTFMove(headers))
         .setMimeType(response.mimeType())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to