Title: [106246] trunk/Source/WebCore
Revision
106246
Author
[email protected]
Date
2012-01-30 08:40:55 -0800 (Mon, 30 Jan 2012)

Log Message

Web Inspector: protocol validator should fail if one of response fields turns optional
https://bugs.webkit.org/show_bug.cgi?id=76452

Reviewed by Yury Semikhatsky.

* inspector/Inspector-0.1.json:
* inspector/Inspector.json:
* inspector/generate-inspector-protocol-version:
(compare_commands):
(compare_events):
(compare_params_list):
(compare_types):
(self_test):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (106245 => 106246)


--- trunk/Source/WebCore/ChangeLog	2012-01-30 16:17:01 UTC (rev 106245)
+++ trunk/Source/WebCore/ChangeLog	2012-01-30 16:40:55 UTC (rev 106246)
@@ -1,3 +1,19 @@
+2012-01-30  Pavel Feldman  <[email protected]>
+
+        Web Inspector: protocol validator should fail if one of response fields turns optional
+        https://bugs.webkit.org/show_bug.cgi?id=76452
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/Inspector-0.1.json:
+        * inspector/Inspector.json:
+        * inspector/generate-inspector-protocol-version:
+        (compare_commands):
+        (compare_events):
+        (compare_params_list):
+        (compare_types):
+        (self_test):
+
 2012-01-30  Yury Semikhatsky  <[email protected]>
 
         Web Inspector: keyboard navigation through comparison view in heap profiler should update retainers view

Modified: trunk/Source/WebCore/inspector/Inspector.json (106245 => 106246)


--- trunk/Source/WebCore/inspector/Inspector.json	2012-01-30 16:17:01 UTC (rev 106245)
+++ trunk/Source/WebCore/inspector/Inspector.json	2012-01-30 16:40:55 UTC (rev 106246)
@@ -367,8 +367,7 @@
                     { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." },
                     { "name": "value", "type": "any", "optional": true, "description": "Remote object value (in case of primitive values or JSON values if it was requested)." },
                     { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
-                    { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
-                    { "name": "functionName", "type": "string", "optional": true, "description": "User-friendly name of the function represented by this object." }
+                    { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." }
                 ]
             },
             {

Modified: trunk/Source/WebCore/inspector/generate-inspector-protocol-version (106245 => 106246)


--- trunk/Source/WebCore/inspector/generate-inspector-protocol-version	2012-01-30 16:17:01 UTC (rev 106245)
+++ trunk/Source/WebCore/inspector/generate-inspector-protocol-version	2012-01-30 16:40:55 UTC (rev 106246)
@@ -123,6 +123,9 @@
             continue
 
         param_2 = params_2[name]
+        if param_2 and "optional" in param_2 and not "optional" in param_1:
+            errors.append("required parameter is now optional: %s" % name)
+            continue;
         type_1 = extract_type(param_1, types_map_1, errors)
         type_2 = extract_type(param_2, types_map_2, errors)
         compare_types("param " + name, type_1, type_2, types_map_1, types_map_2, depth, errors)
@@ -226,6 +229,7 @@
                     ],
                     "returns": [
                         { "name": "mimeType", "type": "string" },
+                        { "name": "nonOptionalMimeType", "type": "string" },
                         { "name": "optionalMimeType", "type": "string", "optional": True }
                     ]
                 }
@@ -273,6 +277,9 @@
                     "name": "setExtraHTTPHeaders",
                     "parameters": [
                         { "name": "headers", "type": "object" },
+                    ],
+                    "returns": [
+                        { "name": "nonOptionalMimeType", "type": "string", "optional": True }
                     ]
                 }
             ],
@@ -291,6 +298,7 @@
     golden_errors = [
         "Network.setUserAgentOverride: command is missing",
         "Network.setExtraHTTPHeaders: required parameter is missing: mimeType",
+        "Network.setExtraHTTPHeaders: required parameter is now optional: nonOptionalMimeType",
         "Network.loadingFailed: event is missing",
         "Network.requestWillBeSent: required parameter is missing: postData",
         "Network.requestWillBeSent: required parameter is missing: documentURL" ]
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to