Bug 1439315 - 5 - defineLazyScriptGetter controller.js. r=standard8 draft
authorMarco Bonardo <mbonardo@mozilla.com>
Wed, 28 Feb 2018 12:31:37 +0100
changeset 761873 a72bbdee84965d716b14d5ddbb020579cdc83f8c
parent 761872 a78d1513e46f85375e4e75377550940d40c25b70
child 761874 9e9f885db98c72a857c941b2eb6b8a294d1b570e
push id101023
push usermak77@bonardo.net
push dateThu, 01 Mar 2018 15:34:13 +0000
reviewersstandard8
bugs1439315
milestone60.0a1
Bug 1439315 - 5 - defineLazyScriptGetter controller.js. r=standard8 MozReview-Commit-ID: 4Kq3XvJNNGB
browser/components/places/content/controller.js
browser/components/places/content/placesOverlay.xul
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -1,18 +1,13 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.defineModuleGetter(this, "ForgetAboutSite",
-                               "resource://gre/modules/ForgetAboutSite.jsm");
-ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils",
-                               "resource://gre/modules/PrivateBrowsingUtils.jsm");
-
 /**
  * Represents an insertion point within a container where we can insert
  * items.
  * @param {object} an object containing the following properties:
  *   - parentId
  *     The identifier of the parent container
  *   - parentGuid
  *     The unique identifier of the parent container
--- a/browser/components/places/content/placesOverlay.xul
+++ b/browser/components/places/content/placesOverlay.xul
@@ -20,21 +20,27 @@
   <script type="application/javascript"><![CDATA[
     ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
     ChromeUtils.defineModuleGetter(window,
       "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
     ChromeUtils.defineModuleGetter(window,
       "PlacesUIUtils", "resource:///modules/PlacesUIUtils.jsm");
     ChromeUtils.defineModuleGetter(window,
       "PlacesTransactions", "resource://gre/modules/PlacesTransactions.jsm");
+    ChromeUtils.defineModuleGetter(window,
+      "ForgetAboutSite", "resource://gre/modules/ForgetAboutSite.jsm");
+    ChromeUtils.defineModuleGetter(window,
+      "PrivateBrowsingUtils", "resource://gre/modules/PrivateBrowsingUtils.jsm");
+
     XPCOMUtils.defineLazyScriptGetter(window, "PlacesTreeView",
       "chrome://browser/content/places/treeView.js");
+    XPCOMUtils.defineLazyScriptGetter(window,
+      ["PlacesInsertionPoint", "PlacesController", "PlacesControllerDragHelper"],
+      "chrome://browser/content/places/controller.js");
   ]]></script>
-  <script type="application/javascript"
-          src="chrome://browser/content/places/controller.js"/>
 
   <!-- Bookmarks and history tooltip -->
   <tooltip id="bhTooltip" noautohide="true"
            onpopupshowing="return window.top.BookmarksEventHandler.fillInBHTooltip(document, event)">
     <vbox id="bhTooltipTextBox" flex="1">
       <label id="bhtTitleText" class="tooltip-label" />
       <label id="bhtUrlText" crop="center" class="tooltip-label uri-element" />
     </vbox>