Bug 1439315 - 5 - defineLazyScriptGetter controller.js. r=standard8
MozReview-Commit-ID: 4Kq3XvJNNGB
--- 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>