diff --git a/browser/components/extensions/ext-history.js b/browser/components/extensions/ext-history.js index 8738e3d0a7cd..5670d27957ee 100644 --- a/browser/components/extensions/ext-history.js +++ b/browser/components/extensions/ext-history.js @@ -65,9 +65,9 @@ const convertNodeToHistoryItem = node => { const convertNodeToVisitItem = node => { return { id: node.pageGuid, - visitId: node.visitId, + visitId: String(node.visitId), visitTime: PlacesUtils.toDate(node.time).getTime(), - referringVisitId: node.fromVisitId, + referringVisitId: String(node.fromVisitId), transition: getTransition(node.visitType), }; }; diff --git a/browser/components/extensions/schemas/devtools_inspected_window.json b/browser/components/extensions/schemas/devtools_inspected_window.json index 542ab2088461..13d1d99bfb18 100644 --- a/browser/components/extensions/schemas/devtools_inspected_window.json +++ b/browser/components/extensions/schemas/devtools_inspected_window.json @@ -136,13 +136,13 @@ "parameters": [ { "name": "result", - "type": "object", - "additionalProperties": {"type": "any"}, + "type": "any", "description": "The result of evaluation." }, { "name": "exceptionInfo", "type": "object", + "optional": true, "description": "An object providing details if an exception occurred while evaluating the expression.", "properties": { "isError": { diff --git a/browser/components/extensions/schemas/tabs.json b/browser/components/extensions/schemas/tabs.json index 77518ffed231..ef7a82f101dc 100644 --- a/browser/components/extensions/schemas/tabs.json +++ b/browser/components/extensions/schemas/tabs.json @@ -58,7 +58,7 @@ "properties": { "id": {"type": "integer", "minimum": -1, "optional": true, "description": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to $(ref:tabs.TAB_ID_NONE) for apps and devtools windows."}, "index": {"type": "integer", "minimum": -1, "description": "The zero-based index of the tab within its window."}, - "windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window the tab is contained within."}, + "windowId": {"type": "integer", "optional": true, "minimum": 0, "description": "The ID of the window the tab is contained within."}, "openerTabId": {"unsupported": true, "type": "integer", "minimum": 0, "optional": true, "description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."}, "selected": {"type": "boolean", "description": "Whether the tab is selected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted).", "unsupported": true}, "highlighted": {"type": "boolean", "description": "Whether the tab is highlighted. Works as an alias of active"}, @@ -74,8 +74,8 @@ "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}, "width": {"type": "integer", "optional": true, "description": "The width of the tab in pixels."}, "height": {"type": "integer", "optional": true, "description": "The height of the tab in pixels."}, - "sessionId": {"unsupported": true, "type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API."}, - "cookieStoreId": {"type": "string", "description": "The CookieStoreId used for the tab."} + "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API."}, + "cookieStoreId": {"type": "string", "optional": true, "description": "The CookieStoreId used for the tab."} } }, { @@ -506,6 +506,7 @@ { "name": "tab", "$ref": "Tab", + "optional": true, "description": "Details about the created tab. Will contain the ID of the new tab." } ] diff --git a/mobile/android/components/extensions/schemas/tabs.json b/mobile/android/components/extensions/schemas/tabs.json index 2adbb0b05773..423263e7550a 100644 --- a/mobile/android/components/extensions/schemas/tabs.json +++ b/mobile/android/components/extensions/schemas/tabs.json @@ -58,7 +58,7 @@ "properties": { "id": {"type": "integer", "minimum": -1, "optional": true, "description": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to $(ref:tabs.TAB_ID_NONE) for apps and devtools windows."}, "index": {"type": "integer", "minimum": -1, "description": "The zero-based index of the tab within its window."}, - "windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window the tab is contained within."}, + "windowId": {"type": "integer", "optional": true, "minimum": 0, "description": "The ID of the window the tab is contained within."}, "openerTabId": {"unsupported": true, "type": "integer", "minimum": 0, "optional": true, "description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."}, "selected": {"type": "boolean", "description": "Whether the tab is selected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted).", "unsupported": true}, "highlighted": {"type": "boolean", "description": "Whether the tab is highlighted. Works as an alias of active."}, @@ -74,8 +74,8 @@ "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}, "width": {"type": "integer", "optional": true, "description": "The width of the tab in pixels."}, "height": {"type": "integer", "optional": true, "description": "The height of the tab in pixels."}, - "sessionId": {"unsupported": true, "type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API."}, - "cookieStoreId": {"type": "string", "description": "The CookieStoreId used for the tab."} + "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API."}, + "cookieStoreId": {"type": "string", "optional": true, "description": "The CookieStoreId used for the tab."} } }, { @@ -409,6 +409,7 @@ { "name": "tab", "$ref": "Tab", + "optional": true, "description": "Details about the created tab. Will contain the ID of the new tab." } ] diff --git a/toolkit/components/extensions/schemas/alarms.json b/toolkit/components/extensions/schemas/alarms.json index 2a72a284252b..77eaf1ec1d36 100644 --- a/toolkit/components/extensions/schemas/alarms.json +++ b/toolkit/components/extensions/schemas/alarms.json @@ -70,7 +70,11 @@ "type": "function", "name": "callback", "parameters": [ - { "name": "alarm", "$ref": "Alarm" } + { + "name": "alarm", + "$ref": "Alarm", + "optional": true + } ] } ] diff --git a/toolkit/components/extensions/schemas/cookies.json b/toolkit/components/extensions/schemas/cookies.json index 1a26407719a0..170cee061344 100644 --- a/toolkit/components/extensions/schemas/cookies.json +++ b/toolkit/components/extensions/schemas/cookies.json @@ -45,7 +45,8 @@ "description": "Represents a cookie store in the browser. An incognito mode window, for instance, uses a separate cookie store from a non-incognito window.", "properties": { "id": {"type": "string", "description": "The unique identifier for the cookie store."}, - "tabIds": {"type": "array", "items": {"type": "integer"}, "description": "Identifiers of all the browser tabs that share this cookie store."} + "tabIds": {"type": "array", "items": {"type": "integer"}, "description": "Identifiers of all the browser tabs that share this cookie store."}, + "incognito": {"type": "boolean", "description": "Indicates if this is an incognito cookie store"} } }, { diff --git a/toolkit/components/extensions/schemas/downloads.json b/toolkit/components/extensions/schemas/downloads.json index dcd43e4e153d..2e851b83b551 100644 --- a/toolkit/components/extensions/schemas/downloads.json +++ b/toolkit/components/extensions/schemas/downloads.json @@ -96,7 +96,8 @@ "type": "string" }, "referrer": { - "type": "string" + "type": "string", + "optional": true }, "filename": { "description": "Absolute local path.", diff --git a/toolkit/components/extensions/schemas/management.json b/toolkit/components/extensions/schemas/management.json index dbbd21c2d852..f00fade4a983 100644 --- a/toolkit/components/extensions/schemas/management.json +++ b/toolkit/components/extensions/schemas/management.json @@ -46,7 +46,7 @@ "id": "ExtensionType", "description": "The type of this extension. Will always be 'extension'.", "type": "string", - "enum": ["extension"] + "enum": ["extension", "theme"] }, { "id": "ExtensionInstallType", diff --git a/toolkit/components/extensions/schemas/manifest.json b/toolkit/components/extensions/schemas/manifest.json index 0e0c904a5276..2458c339e25e 100644 --- a/toolkit/components/extensions/schemas/manifest.json +++ b/toolkit/components/extensions/schemas/manifest.json @@ -332,6 +332,24 @@ } ] }, + { + "id": "MatchPatternInternal", + "description": "Same as MatchPattern above, but includes moz-extension protocol", + "choices": [ + { + "type": "string", + "enum": [""] + }, + { + "type": "string", + "pattern": "^(https?|wss?|file|ftp|moz-extension|\\*)://(\\*|\\*\\.[^*/]+|[^*/]+)/.*$" + }, + { + "type": "string", + "pattern": "^file:///.*$" + } + ] + }, { "id": "ContentScript", "type": "object", diff --git a/toolkit/components/extensions/schemas/notifications.json b/toolkit/components/extensions/schemas/notifications.json index 12878e8c8ec9..5691d6c3ebb1 100644 --- a/toolkit/components/extensions/schemas/notifications.json +++ b/toolkit/components/extensions/schemas/notifications.json @@ -316,6 +316,7 @@ { "name": "notifications", "type": "object", + "additionalProperties": {"$ref": "CreateNotificationOptions"}, "description": "The set of notifications currently in the system." } ] diff --git a/toolkit/components/extensions/schemas/permissions.json b/toolkit/components/extensions/schemas/permissions.json index 9a289ae9dcf1..429aec2c17e0 100644 --- a/toolkit/components/extensions/schemas/permissions.json +++ b/toolkit/components/extensions/schemas/permissions.json @@ -33,7 +33,7 @@ }, "origins": { "type": "array", - "items": { "$ref": "manifest.MatchPattern" }, + "items": { "$ref": "manifest.MatchPatternInternal" }, "optional": true, "default": [] } diff --git a/toolkit/components/extensions/schemas/web_navigation.json b/toolkit/components/extensions/schemas/web_navigation.json index b9204d34eb85..41daec75929d 100644 --- a/toolkit/components/extensions/schemas/web_navigation.json +++ b/toolkit/components/extensions/schemas/web_navigation.json @@ -73,7 +73,7 @@ "description": "Information about the requested frame, null if the specified frame ID and/or tab ID are invalid.", "properties": { "errorOccurred": { - "unsupported": true, + "optional": true, "type": "boolean", "description": "True if the last navigation in this frame was interrupted by an error, i.e. the onErrorOccurred event fired." }, @@ -81,6 +81,14 @@ "type": "string", "description": "The URL currently associated with this frame, if the frame identified by the frameId existed at one point in the given tab. The fact that an URL is associated with a given frameId does not imply that the corresponding frame still exists." }, + "tabId": { + "type": "integer", + "description": "The ID of the tab in which the frame is." + }, + "frameId": { + "type": "integer", + "description": "The ID of the frame. 0 indicates that this is the main frame; a positive value indicates the ID of a subframe." + }, "parentFrameId": { "type": "integer", "description": "ID of frame that wraps the frame. Set to -1 of no parent frame exists." @@ -118,7 +126,7 @@ "type": "object", "properties": { "errorOccurred": { - "unsupported": true, + "optional": true, "type": "boolean", "description": "True if the last navigation in this frame was interrupted by an error, i.e. the onErrorOccurred event fired." }, @@ -127,6 +135,10 @@ "type": "integer", "description": "The ID of the process runs the renderer for this tab." }, + "tabId": { + "type": "integer", + "description": "The ID of the tab in which the frame is." + }, "frameId": { "type": "integer", "description": "The ID of the frame. 0 indicates that this is the main frame; a positive value indicates the ID of a subframe."