Web Inspector: Make http status codes be "integer" instead of "number" in protocol
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Nov 2017 22:10:05 +0000 (22:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Nov 2017 22:10:05 +0000 (22:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179543

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-11-10
Reviewed by Antoine Quint.

Source/JavaScriptCore:

* 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224704 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/protocol/Network.json
Source/WebCore/ChangeLog
Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp

index 2ce651d..877f9b1 100644 (file)
@@ -1,3 +1,13 @@
+2017-11-10  Joseph Pecoraro  <pecoraro@apple.com>
+
+        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  <rmorisset@apple.com>
 
         The memory consumption of DFG::BasicBlock can be easily reduced a bit
index 099b40a..1a6b17a 100644 (file)
@@ -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." },
             "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." }
             ]
             "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." }
             ]
         },
         {
index da83b50..c0321b0 100644 (file)
@@ -1,3 +1,14 @@
+2017-11-10  Joseph Pecoraro  <pecoraro@apple.com>
+
+        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  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r224602 and r224697.
index 25d56b7..d75c90a 100644 (file)
@@ -287,12 +287,11 @@ RefPtr<Inspector::Protocol::Network::Response> InspectorNetworkAgent::buildObjec
     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())