--- a/browser/components/extensions/schemas/history.json+++ b/browser/components/extensions/schemas/history.json@@ -182,28 +182,42 @@ } } ] } ] }, { "name": "addUrl",- "unsupported": true, "type": "function",- "description": "Adds a URL to the history at the current time with a $(topic:transition-types)[transition type] of \"link\".",+ "description": "Adds a URL to the history with a default visitTime of the current time and a default $(topic:transition-types)[transition type] of \"link\".", "async": "callback", "parameters": [ { "name": "details", "type": "object", "properties": { "url": { "type": "string",- "description": "The URL to add."+ "description": "The URL to add. Must be a valid URL that can be added to history."+ },+ "title": {+ "type": "string",+ "optional": true,+ "description": "The title of the page."+ },+ "transition": {+ "$ref": "TransitionType",+ "optional": true,+ "description": "The $(topic:transition-types)[transition type] for this visit from its referrer."+ },+ "visitTime": {+ "$ref": "HistoryTime",+ "optional": true,+ "description": "The date when this visit occurred." } } }, { "name": "callback", "type": "function", "optional": true, "parameters": []@@ -240,22 +254,22 @@ "description": "Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.", "async": "callback", "parameters": [ { "name": "range", "type": "object", "properties": { "startTime": {- "type": "number",- "description": "Items added to history after this date, represented in milliseconds since the epoch."+ "$ref": "HistoryTime",+ "description": "Items added to history after this date." }, "endTime": {- "type": "number",- "description": "Items added to history before this date, represented in milliseconds since the epoch."+ "$ref": "HistoryTime",+ "description": "Items added to history before this date." } } }, { "name": "callback", "type": "function", "parameters": [] }

--- a/dom/base/nsDOMJSUtils.h+++ b/dom/base/nsDOMJSUtils.h@@ -7,34 +7,16 @@ #ifndef nsDOMJSUtils_h__ #define nsDOMJSUtils_h__ #include "nsIScriptContext.h" #include "jsapi.h" class nsIJSArgArray;-// seems like overkill for just this 1 function - but let's see what else-// falls out first.-inline nsIScriptContext *-GetScriptContextFromJSContext(JSContext *cx)-{- if (!(JS::ContextOptionsRef(cx).privateIsNSISupports())) {- return nullptr;- }-- nsCOMPtr<nsIScriptContext> scx =- do_QueryInterface(static_cast<nsISupports *>- (::JS_GetContextPrivate(cx)));-- // This will return a pointer to something that's about to be- // released, but that's ok here.- return scx;-}- // A factory function for turning a JS::Value argv into an nsIArray // but also supports an effecient way of extracting the original argv. // The resulting object will take a copy of the array, and ensure each // element is rooted. // Optionally, aArgv may be nullptr, in which case the array is allocated and // rooted, but all items remain nullptr. This presumably means the caller // will then QI us for nsIJSArgArray, and set our array elements. nsresult NS_CreateJSArgv(JSContext *aContext, uint32_t aArgc,