Bug 1343996: Forbid empty types and urls request filter arrays. r=rpl
authorKris Maglione <maglione.k@gmail.com>
Thu, 02 Mar 2017 12:51:44 -0800
changeset 345875 f58322b063085e28748b2a3f22be331e73404d3a
parent 345874 fdf4387356577e0c5732b1120d62163393107db9
child 345876 f67c47f25e6c8056bf22199d6d0596377526b7fa
push id31451
push usercbook@mozilla.com
push dateMon, 06 Mar 2017 09:52:09 +0000
treeherdermozilla-central@7099e03837e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrpl
bugs1343996
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1343996: Forbid empty types and urls request filter arrays. r=rpl MozReview-Commit-ID: IsMwRYVo9t9
toolkit/components/extensions/schemas/web_request.json
--- a/toolkit/components/extensions/schemas/web_request.json
+++ b/toolkit/components/extensions/schemas/web_request.json
@@ -97,23 +97,25 @@
       {
         "id": "RequestFilter",
         "type": "object",
         "description": "An object describing filters to apply to webRequest events.",
         "properties": {
           "urls": {
             "type": "array",
             "description": "A list of URLs or URL patterns. Requests that cannot match any of the URLs will be filtered out.",
-            "items": { "type": "string" }
+            "items": { "type": "string" },
+            "minItems": 1
           },
           "types": {
             "type": "array",
             "optional": true,
             "description": "A list of request types. Requests that cannot match any of the types will be filtered out.",
-            "items": { "$ref": "ResourceType" }
+            "items": { "$ref": "ResourceType" },
+            "minItems": 1
           },
           "tabId": { "type": "integer", "optional": true },
           "windowId": { "type": "integer", "optional": true }
         }
       },
       {
         "id": "HttpHeaders",
         "type": "array",