Bug 1524688: Part 25 - Convert PageThumbsComponents to static registration. r=adw
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Tue, 29 Jan 2019 21:23:45 -0800
changeset 458998 18f156d6355a
parent 458997 f4eaebbe2e0f
child 458999 fe583e7aae8d
push id111909
push usermaglione.k@gmail.com
push dateThu, 14 Feb 2019 02:30:40 +0000
treeherdermozilla-inbound@81dc12cc9257 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1524688
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1524688: Part 25 - Convert PageThumbsComponents to static registration. r=adw
browser/installer/package-manifest.in
toolkit/components/thumbnails/PageThumbsComponents.manifest
toolkit/components/thumbnails/PageThumbsStorageService.js
toolkit/components/thumbnails/PageThumbsStorageService.jsm
toolkit/components/thumbnails/components.conf
toolkit/components/thumbnails/moz.build
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -188,34 +188,32 @@
 @RESPATH@/browser/components/aboutdevtoolstoolbox.manifest
 @RESPATH@/browser/components/aboutNewTabService.js
 @RESPATH@/browser/components/NewTabComponents.manifest
 @RESPATH@/browser/components/EnterprisePolicies.js
 @RESPATH@/browser/components/EnterprisePoliciesContent.js
 @RESPATH@/browser/components/EnterprisePolicies.manifest
 @RESPATH@/components/Downloads.manifest
 @RESPATH@/components/DownloadLegacy.js
-@RESPATH@/components/PageThumbsComponents.manifest
 @RESPATH@/components/crashmonitor.manifest
 @RESPATH@/components/nsCrashMonitor.js
 @RESPATH@/components/toolkitsearch.manifest
 #ifdef NIGHTLY_BUILD
 @RESPATH@/browser/components/payments.manifest
 @RESPATH@/browser/components/paymentUIService.js
 #endif
 @RESPATH@/components/WebVTT.manifest
 @RESPATH@/components/WebVTTParserWrapper.js
 @RESPATH@/components/nsHelperAppDlg.manifest
 @RESPATH@/components/nsHelperAppDlg.js
 @RESPATH@/components/extensions.manifest
 #ifdef MOZ_UPDATER
 @RESPATH@/components/nsUpdateService.manifest
 #endif
 @RESPATH@/components/ProcessSingleton.manifest
-@RESPATH@/components/PageThumbsStorageService.js
 @RESPATH@/components/mozProtocolHandler.js
 @RESPATH@/components/mozProtocolHandler.manifest
 @RESPATH@/components/nsDefaultCLH.manifest
 @RESPATH@/components/nsDefaultCLH.js
 @RESPATH@/components/ContentPrefService2.manifest
 @RESPATH@/components/ContentPrefService2.js
 @RESPATH@/components/nsContentDispatchChooser.manifest
 @RESPATH@/components/nsContentDispatchChooser.js
deleted file mode 100644
--- a/toolkit/components/thumbnails/PageThumbsComponents.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {97943eec-0e48-49ef-b7b7-cf4aa0109bb6} PageThumbsStorageService.js
-contract @mozilla.org/thumbnails/pagethumbs-service;1 {97943eec-0e48-49ef-b7b7-cf4aa0109bb6}
rename from toolkit/components/thumbnails/PageThumbsStorageService.js
rename to toolkit/components/thumbnails/PageThumbsStorageService.jsm
--- a/toolkit/components/thumbnails/PageThumbsStorageService.js
+++ b/toolkit/components/thumbnails/PageThumbsStorageService.jsm
@@ -52,9 +52,9 @@ PageThumbsStorageService.prototype = {
       let hex = "";
       for (let i = 0; i < aData.length; i++)
         hex += ("0" + aData.charCodeAt(i).toString(16)).slice(-2);
       return hex;
     },
 
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([PageThumbsStorageService]);
+var EXPORTED_SYMBOLS = ["PageThumbsStorageService"];
--- a/toolkit/components/thumbnails/components.conf
+++ b/toolkit/components/thumbnails/components.conf
@@ -6,9 +6,16 @@
 
 Classes = [
     {
         'cid': '{5a4ae9b5-f475-48ae-9dce-0b4c1d347884}',
         'contract_ids': ['@mozilla.org/network/protocol;1?name=moz-page-thumb'],
         'type': 'PageThumbsProtocol',
         'headers': ['/toolkit/components/thumbnails/PageThumbsProtocol.h'],
     },
+
+    {
+        'cid': '{97943eec-0e48-49ef-b7b7-cf4aa0109bb6}',
+        'contract_ids': ['@mozilla.org/thumbnails/pagethumbs-service;1'],
+        'jsm': 'resource://gre/modules/PageThumbsStorageService.jsm',
+        'constructor': 'PageThumbsStorageService',
+    },
 ]
--- a/toolkit/components/thumbnails/moz.build
+++ b/toolkit/components/thumbnails/moz.build
@@ -5,24 +5,20 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files('**'):
     BUG_COMPONENT = ('Firefox', 'New Tab Page')
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
 
-EXTRA_COMPONENTS += [
-    'PageThumbsComponents.manifest',
-    'PageThumbsStorageService.js',
-]
-
 EXTRA_JS_MODULES += [
     'BackgroundPageThumbs.jsm',
     'PageThumbs.jsm',
+    'PageThumbsStorageService.jsm',
     'PageThumbsWorker.js',
     'PageThumbUtils.jsm',
 ]
 
 UNIFIED_SOURCES += [
     'PageThumbsProtocol.cpp'
 ]