diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-04-24 19:38:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-24 19:38:33 +0200 |
commit | 810a3245a8c609c495be4dace044713b9717f0c0 (patch) | |
tree | 26a7b3461fd6ad27256cbb5492535996889aa55c /browser/base | |
parent | 444b1a26abe8521eefe2bf657497f43b523cfca3 (diff) | |
parent | 9b88e7cf78c6845805883c6ede9b83768675d9b0 (diff) | |
download | UXP-810a3245a8c609c495be4dace044713b9717f0c0.tar UXP-810a3245a8c609c495be4dace044713b9717f0c0.tar.gz UXP-810a3245a8c609c495be4dace044713b9717f0c0.tar.lz UXP-810a3245a8c609c495be4dace044713b9717f0c0.tar.xz UXP-810a3245a8c609c495be4dace044713b9717f0c0.zip |
Merge pull request #259 from janekptacijarabaci/error_CloudSync_2
moebius#209: Throws an error - "CloudSync is not defined"
Diffstat (limited to 'browser/base')
-rw-r--r-- | browser/base/content/browser-syncui.js | 12 | ||||
-rw-r--r-- | browser/base/jar.mn | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/browser/base/content/browser-syncui.js b/browser/base/content/browser-syncui.js index c5c2995c8..51bcb15d5 100644 --- a/browser/base/content/browser-syncui.js +++ b/browser/base/content/browser-syncui.js @@ -4,10 +4,10 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -if (AppConstants.MOZ_SERVICES_CLOUDSYNC) { - XPCOMUtils.defineLazyModuleGetter(this, "CloudSync", - "resource://gre/modules/CloudSync.jsm"); -} +#ifdef MOZ_SERVICES_CLOUDSYNC +XPCOMUtils.defineLazyModuleGetter(this, "CloudSync", + "resource://gre/modules/CloudSync.jsm"); +#endif XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts", "resource://gre/modules/FxAccounts.jsm"); @@ -170,9 +170,13 @@ var gSyncUI = { document.getElementById("sync-setup-state").hidden = true; document.getElementById("sync-syncnow-state").hidden = true; +#ifdef MOZ_SERVICES_CLOUDSYNC if (CloudSync && CloudSync.ready && CloudSync().adapters.count) { document.getElementById("sync-syncnow-state").hidden = false; } else if (loginFailed) { +#else + if (loginFailed) { +#endif // unhiding this element makes the menubar show the login failure state. document.getElementById("sync-reauth-state").hidden = false; } else if (needsSetup) { diff --git a/browser/base/jar.mn b/browser/base/jar.mn index 63ae6c366..c58265351 100644 --- a/browser/base/jar.mn +++ b/browser/base/jar.mn @@ -87,7 +87,7 @@ browser.jar: content/browser/browser-safebrowsing.js (content/browser-safebrowsing.js) content/browser/browser-sidebar.js (content/browser-sidebar.js) content/browser/browser-social.js (content/browser-social.js) - content/browser/browser-syncui.js (content/browser-syncui.js) +* content/browser/browser-syncui.js (content/browser-syncui.js) * content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml) #ifdef CAN_DRAW_IN_TITLEBAR content/browser/browser-tabsintitlebar.js (content/browser-tabsintitlebar.js) |