From d283d0b0a7f422f82cf54173f832966f9ae02ebd Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Fri, 3 Apr 2015 07:51:00 -0700 Subject: [PATCH] Bug 1151585 - Use AppConstants in browser-child.js (r=felipe) --- toolkit/content/browser-child.js | 15 +++++++-------- toolkit/content/jar.mn | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/toolkit/content/browser-child.js b/toolkit/content/browser-child.js index 45e5d8150741..da4882c3a6f5 100644 --- a/toolkit/content/browser-child.js +++ b/toolkit/content/browser-child.js @@ -6,6 +6,7 @@ let Cc = Components.classes; let Ci = Components.interfaces; let Cu = Components.utils; +Cu.import("resource://gre/modules/AppConstants.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import('resource://gre/modules/XPCOMUtils.jsm'); Cu.import("resource://gre/modules/RemoteAddonsChild.jsm"); @@ -14,11 +15,11 @@ Cu.import("resource://gre/modules/Timer.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PageThumbUtils", "resource://gre/modules/PageThumbUtils.jsm"); -#ifdef MOZ_CRASHREPORTER -XPCOMUtils.defineLazyServiceGetter(this, "CrashReporter", - "@mozilla.org/xre/app-info;1", - "nsICrashReporter"); -#endif +if (AppConstants.MOZ_CRASHREPORTER) { + XPCOMUtils.defineLazyServiceGetter(this, "CrashReporter", + "@mozilla.org/xre/app-info;1", + "nsICrashReporter"); +} let FocusSyncHandler = { init: function() { @@ -256,10 +257,8 @@ let WebNavigation = { }, loadURI: function(uri, flags, referrer, referrerPolicy, baseURI) { -#ifdef MOZ_CRASHREPORTER - if (CrashReporter.enabled) + if (AppConstants.MOZ_CRASHREPORTER && CrashReporter.enabled) CrashReporter.annotateCrashReport("URL", uri); -#endif if (referrer) referrer = Services.io.newURI(referrer, null, null); if (baseURI) diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn index c69e9f143e47..4326ad17ce8a 100644 --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -31,7 +31,7 @@ toolkit.jar: content/global/directionDetector.html content/global/plugins.html content/global/plugins.css -* content/global/browser-child.js (browser-child.js) + content/global/browser-child.js (browser-child.js) content/global/browser-content.js (browser-content.js) *+ content/global/buildconfig.html (buildconfig.html) * content/global/contentAreaUtils.js (contentAreaUtils.js)