Commit 1226e052 authored by Marco Bonardo's avatar Marco Bonardo Committed by Matthew Finkel
Browse files

Bug 1590538 - Don't pass an empty object to urlbar-user-start-navigation...

Bug 1590538 - Don't pass an empty object to urlbar-user-start-navigation because it doesn't handle it properly. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D50634

--HG--
extra : moz-landing-system : lando
parent 9ed3c1f8
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1217,9 +1217,9 @@ class UrlbarInput {
   * @param {nsIInputStream} [params.postData]
   *   The POST data associated with a search submission.
   * @param {boolean} [params.allowInheritPrincipal]
   *   If the principal may be inherited
   * @param {object} [result]
   *   Details of the selected result, if any
   *   Whether the principal can be inherited.
   * @param {object} [resultDetails]
   *   Details of the selected result, if any.
   * @param {UrlbarUtils.RESULT_TYPE} [result.type]
   *   Details of the result type, if any.
   * @param {UrlbarUtils.RESULT_SOURCE} [result.source]
@@ -1230,7 +1230,7 @@ class UrlbarInput {
    url,
    openUILinkWhere,
    params,
    result = {},
    resultDetails = null,
    browser = this.window.gBrowser.selectedBrowser
  ) {
    // No point in setting these because we'll handleRevert() a few rows below.
@@ -1286,7 +1286,7 @@ class UrlbarInput {
    }

    // Notify about the start of navigation.
    this._notifyStartNavigation(result);
    this._notifyStartNavigation(resultDetails);

    try {
      this.window.openTrustedLinkIn(url, openUILinkWhere, params);
@@ -1407,7 +1407,7 @@ class UrlbarInput {
   * if they aren't being used, e.g. WebNavigation.
   *
   * @param {UrlbarResult} result
   *   The result that was selected, if any.
   *   Details of the result that was selected, if any.
   */
  _notifyStartNavigation(result) {
    Services.obs.notifyObservers({ result }, "urlbar-user-start-navigation");