From 5909cef47a4aaf458e41e0d2a46b88972b934dff Mon Sep 17 00:00:00 2001 From: trav90 Date: Sat, 12 May 2018 08:17:44 -0500 Subject: Make safebrowsing optional at build time - Part 1: browser/ --- browser/base/content/browser.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'browser/base/content/browser.js') diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 2380f5d21..8679bca83 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -60,8 +60,10 @@ Cu.import("resource://gre/modules/NotificationDB.jsm"); ["webrtcUI", "resource:///modules/webrtcUI.jsm", ] ].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource)); -XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing", - "resource://gre/modules/SafeBrowsing.jsm"); +#ifdef MOZ_SAFE_BROWSING + XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing", + "resource://gre/modules/SafeBrowsing.jsm"); +#endif // lazy service getters [ @@ -1200,8 +1202,10 @@ var gBrowserInit = { } } +#ifdef MOZ_SAFE_BROWSING // Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008. setTimeout(function() { SafeBrowsing.init(); }, 2000); +#endif Services.obs.addObserver(gIdentityHandler, "perm-changed", false); Services.obs.addObserver(gSessionHistoryObserver, "browser:purge-session-history", false); -- cgit v1.2.3 From 3a9d1b5351f275ae49a93ea36934c4a8a65ad93b Mon Sep 17 00:00:00 2001 From: Ascrod <32915892+Ascrod@users.noreply.github.com> Date: Thu, 24 May 2018 16:29:56 -0400 Subject: Remove the Social API --- browser/base/content/browser.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'browser/base/content/browser.js') diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 8679bca83..4b8ec864b 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -44,7 +44,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm"); ["ShortcutUtils", "resource://gre/modules/ShortcutUtils.jsm"], ["SimpleServiceDiscovery", "resource://gre/modules/SimpleServiceDiscovery.jsm"], ["SitePermissions", "resource:///modules/SitePermissions.jsm"], - ["Social", "resource:///modules/Social.jsm"], ["TabCrashHandler", "resource:///modules/ContentCrashHandlers.jsm"], ["Task", "resource://gre/modules/Task.jsm"], ["TelemetryStopwatch", "resource://gre/modules/TelemetryStopwatch.jsm"], @@ -1405,8 +1404,6 @@ var gBrowserInit = { // Enable the Restore Last Session command if needed RestoreLastSessionObserver.init(); - SocialUI.init(); - // Start monitoring slow add-ons AddonWatcher.init(); @@ -1537,7 +1534,6 @@ var gBrowserInit = { gPrefService.removeObserver(ctrlTab.prefName, ctrlTab); ctrlTab.uninit(); - SocialUI.uninit(); gBrowserThumbnails.uninit(); FullZoom.destroy(); @@ -4297,9 +4293,7 @@ var XULBrowserWindow = { // Called before links are navigated to to allow us to retarget them if needed. onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) { - let target = BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab); - SocialUI.closeSocialPanelForLinkTraversal(target, linkNode); - return target; + return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab); }, // Check whether this URI should load in the current process @@ -4480,8 +4474,6 @@ var XULBrowserWindow = { gIdentityHandler.onLocationChange(); - SocialUI.updateState(); - UITour.onLocationChange(location); gTabletModePageCounter.inc(); -- cgit v1.2.3 From 72bab89cf6c77c9ee95a977c306e6ce317b84835 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 25 May 2018 20:45:48 +0000 Subject: Revert "Remove the Social API" --- browser/base/content/browser.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'browser/base/content/browser.js') diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 4b8ec864b..8679bca83 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -44,6 +44,7 @@ Cu.import("resource://gre/modules/NotificationDB.jsm"); ["ShortcutUtils", "resource://gre/modules/ShortcutUtils.jsm"], ["SimpleServiceDiscovery", "resource://gre/modules/SimpleServiceDiscovery.jsm"], ["SitePermissions", "resource:///modules/SitePermissions.jsm"], + ["Social", "resource:///modules/Social.jsm"], ["TabCrashHandler", "resource:///modules/ContentCrashHandlers.jsm"], ["Task", "resource://gre/modules/Task.jsm"], ["TelemetryStopwatch", "resource://gre/modules/TelemetryStopwatch.jsm"], @@ -1404,6 +1405,8 @@ var gBrowserInit = { // Enable the Restore Last Session command if needed RestoreLastSessionObserver.init(); + SocialUI.init(); + // Start monitoring slow add-ons AddonWatcher.init(); @@ -1534,6 +1537,7 @@ var gBrowserInit = { gPrefService.removeObserver(ctrlTab.prefName, ctrlTab); ctrlTab.uninit(); + SocialUI.uninit(); gBrowserThumbnails.uninit(); FullZoom.destroy(); @@ -4293,7 +4297,9 @@ var XULBrowserWindow = { // Called before links are navigated to to allow us to retarget them if needed. onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) { - return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab); + let target = BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab); + SocialUI.closeSocialPanelForLinkTraversal(target, linkNode); + return target; }, // Check whether this URI should load in the current process @@ -4474,6 +4480,8 @@ var XULBrowserWindow = { gIdentityHandler.onLocationChange(); + SocialUI.updateState(); + UITour.onLocationChange(location); gTabletModePageCounter.inc(); -- cgit v1.2.3 From 5f89c3da66862d82fa27092986c4065aba3574ff Mon Sep 17 00:00:00 2001 From: Ascrod <32915892+Ascrod@users.noreply.github.com> Date: Wed, 30 May 2018 17:45:05 -0400 Subject: Remove Social API. --- browser/base/content/browser.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'browser/base/content/browser.js') diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 8679bca83..4b8ec864b 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -44,7 +44,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm"); ["ShortcutUtils", "resource://gre/modules/ShortcutUtils.jsm"], ["SimpleServiceDiscovery", "resource://gre/modules/SimpleServiceDiscovery.jsm"], ["SitePermissions", "resource:///modules/SitePermissions.jsm"], - ["Social", "resource:///modules/Social.jsm"], ["TabCrashHandler", "resource:///modules/ContentCrashHandlers.jsm"], ["Task", "resource://gre/modules/Task.jsm"], ["TelemetryStopwatch", "resource://gre/modules/TelemetryStopwatch.jsm"], @@ -1405,8 +1404,6 @@ var gBrowserInit = { // Enable the Restore Last Session command if needed RestoreLastSessionObserver.init(); - SocialUI.init(); - // Start monitoring slow add-ons AddonWatcher.init(); @@ -1537,7 +1534,6 @@ var gBrowserInit = { gPrefService.removeObserver(ctrlTab.prefName, ctrlTab); ctrlTab.uninit(); - SocialUI.uninit(); gBrowserThumbnails.uninit(); FullZoom.destroy(); @@ -4297,9 +4293,7 @@ var XULBrowserWindow = { // Called before links are navigated to to allow us to retarget them if needed. onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) { - let target = BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab); - SocialUI.closeSocialPanelForLinkTraversal(target, linkNode); - return target; + return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab); }, // Check whether this URI should load in the current process @@ -4480,8 +4474,6 @@ var XULBrowserWindow = { gIdentityHandler.onLocationChange(); - SocialUI.updateState(); - UITour.onLocationChange(location); gTabletModePageCounter.inc(); -- cgit v1.2.3