Bug 1509610 - Set default value for optional openParams parameter. r=Standard8
authorDão Gottwald <dao@mozilla.com>
Mon, 26 Nov 2018 10:58:54 +0000
changeset 507177 19f0f3b9cf1a589c9c7ed1074c0a513ddbdd9d9a
parent 507176 2ba86b9e4cc85efd75c3b22e4728135012930e39
child 507178 7bff5a02441019a61423d4038174e6514cf0c252
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs1509610
milestone65.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 1509610 - Set default value for optional openParams parameter. r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D12812
browser/components/urlbar/UrlbarInput.jsm
--- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -184,17 +184,17 @@ class UrlbarInput {
    *
    * @param {Event} event The event triggering the open.
    * @param {string} [openWhere] Where we expect the result to be opened.
    * @param {object} [openParams]
    *   The parameters related to where the result will be opened.
    * @param {object} [triggeringPrincipal]
    *   The principal that the action was triggered from.
    */
-  handleCommand(event, openWhere, openParams, triggeringPrincipal) {
+  handleCommand(event, openWhere, openParams = {}, triggeringPrincipal = null) {
     let isMouseEvent = event instanceof this.window.MouseEvent;
     if (isMouseEvent && event.button == 2) {
       // Do nothing for right clicks.
       return;
     }
 
     // TODO: Hook up one-off button handling.
     // Determine whether to use the selected one-off search button.  In