Bug 1374174 - Package UITour-lib.js only in onboarding extension to prevent noreference error. r=mossop draft
authorRex Lee <rexboy@mozilla.com>
Thu, 22 Jun 2017 16:19:16 +0800
changeset 598904 97493051a3f733a7788a6034e3310fa06fb7de80
parent 597883 e1e4a481b7e88dce163b9cccc2fb72032023befa
child 634608 b2945f10bfbddf9686ca5552d6d76c409a5a80c5
push id65349
push userbmo:rexboy@mozilla.com
push dateThu, 22 Jun 2017 10:45:47 +0000
reviewersmossop
bugs1374174
milestone56.0a1
Bug 1374174 - Package UITour-lib.js only in onboarding extension to prevent noreference error. r=mossop MozReview-Commit-ID: Fbxexo179pk
browser/components/uitour/jar.mn
browser/extensions/onboarding/content/onboarding.js
browser/extensions/onboarding/jar.mn
--- a/browser/components/uitour/jar.mn
+++ b/browser/components/uitour/jar.mn
@@ -1,7 +1,6 @@
 # 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/.
 
 browser.jar:
        content/browser/content-UITour.js
-       content/browser/UITour-lib.js
--- a/browser/extensions/onboarding/content/onboarding.js
+++ b/browser/extensions/onboarding/content/onboarding.js
@@ -9,17 +9,17 @@
 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/Preferences.jsm");
 
 const ONBOARDING_CSS_URL = "resource://onboarding/onboarding.css";
 const ABOUT_HOME_URL = "about:home";
 const ABOUT_NEWTAB_URL = "about:newtab";
 const BUNDLE_URI = "chrome://onboarding/locale/onboarding.properties";
-const UITOUR_JS_URI = "chrome://browser/content/UITour-lib.js";
+const UITOUR_JS_URI = "resource://onboarding/lib/UITour-lib.js";
 const TOUR_AGENT_JS_URI = "resource://onboarding/onboarding-tour-agent.js";
 const BRAND_SHORT_NAME = Services.strings
                      .createBundle("chrome://branding/locale/brand.properties")
                      .GetStringFromName("brandShortName");
 
 /**
  * Add any number of tours, following the format
  * {
--- a/browser/extensions/onboarding/jar.mn
+++ b/browser/extensions/onboarding/jar.mn
@@ -1,7 +1,11 @@
 # 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/.
 
 [features/onboarding@mozilla.org] chrome.jar:
 % resource onboarding %content/
   content/ (content/*)
+  # Package UITour-lib.js in here rather than under
+  # /browser/components/uitour to avoid "unreferenced files" error when
+  # Onboarding extension is not built.
+  content/lib/UITour-lib.js (/browser/components/uitour/UITour-lib.js)