Bug 1524688: Part 34 - Convert gfx SanityTest to static registration. r=mattwoodrow
authorKris Maglione <maglione.k@gmail.com>
Wed, 30 Jan 2019 10:37:01 -0800
changeset 520367 ad0168bf0506488b1891ae1b14ab4a5637013e93
parent 520366 ea73c355d08c0d1dfffe0b2c2730e23dffc8930a
child 520368 8dd9f80c2e022ea03cc8de1b057525f0e783cc05
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
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 34 - Convert gfx SanityTest to static registration. r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D18444
browser/installer/package-manifest.in
toolkit/components/gfx/GfxSanityTest.manifest
toolkit/components/gfx/SanityTest.js
toolkit/components/gfx/SanityTest.jsm
toolkit/components/gfx/components.conf
toolkit/components/gfx/moz.build
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -506,22 +506,16 @@ bin/libfreebl_32int64_3.so
 @BINPATH@/@MOZ_CLANG_RT_ASAN_LIB@
 #endif
 
 
 ; media
 @RESPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@
 @RESPATH@/gmp-clearkey/0.1/manifest.json
 
-; gfx
-#ifdef XP_WIN
-@RESPATH@/components/GfxSanityTest.manifest
-@RESPATH@/components/SanityTest.js
-#endif
-
 #ifdef MOZ_DMD
 ; DMD
 @RESPATH@/dmd.py
 @RESPATH@/fix_stack_using_bpsyms.py
 #ifdef XP_MACOSX
 @RESPATH@/fix_macosx_stack.py
 #endif
 #ifdef XP_LINUX
deleted file mode 100644
--- a/toolkit/components/gfx/GfxSanityTest.manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-component {f3a8ca4d-4c83-456b-aee2-6a2cbf11e9bd} SanityTest.js process=main
-contract @mozilla.org/sanity-test;1 {f3a8ca4d-4c83-456b-aee2-6a2cbf11e9bd} process=main
-category profile-after-change SanityTest @mozilla.org/sanity-test;1 process=main
rename from toolkit/components/gfx/SanityTest.js
rename to toolkit/components/gfx/SanityTest.jsm
--- a/toolkit/components/gfx/SanityTest.js
+++ b/toolkit/components/gfx/SanityTest.jsm
@@ -1,21 +1,19 @@
 /* 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/. */
 
 "use strict";
 
 const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "AppConstants",
   "resource://gre/modules/AppConstants.jsm");
 
-const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 const FRAME_SCRIPT_URL = "chrome://gfxsanity/content/gfxFrameScript.js";
 
 const PAGE_WIDTH = 160;
 const PAGE_HEIGHT = 234;
 const LEFT_EDGE = 8;
 const TOP_EDGE = 8;
 const CANVAS_WIDTH = 32;
 const CANVAS_HEIGHT = 64;
@@ -381,9 +379,9 @@ SanityTest.prototype = {
     sanityTest.moveTo(100000000, 1000000000);
     // In multi-screens with different dpi setup, the window may have been
     // incorrectly resized.
     sanityTest.resizeTo(PAGE_WIDTH, PAGE_HEIGHT);
     tester.scheduleTest(sanityTest);
   },
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SanityTest]);
+var EXPORTED_SYMBOLS = ["SanityTest"];
new file mode 100644
--- /dev/null
+++ b/toolkit/components/gfx/components.conf
@@ -0,0 +1,16 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+Classes = [
+    {
+        'cid': '{f3a8ca4d-4c83-456b-aee2-6a2cbf11e9bd}',
+        'contract_ids': ['@mozilla.org/sanity-test;1'],
+        'jsm': 'resource://gre/modules/SanityTest.jsm',
+        'constructor': 'SanityTest',
+        'processes': ProcessSelector.MAIN_PROCESS_ONLY,
+        'categories': {'profile-after-change': 'SanityTest'},
+    },
+]
--- a/toolkit/components/gfx/moz.build
+++ b/toolkit/components/gfx/moz.build
@@ -2,14 +2,17 @@
 # vim: set filetype=python:
 # 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/.
 
 with Files('**'):
     BUG_COMPONENT = ('Core', 'Graphics')
 
-EXTRA_COMPONENTS += [
-    'GfxSanityTest.manifest',
-    'SanityTest.js',
+EXTRA_JS_MODULES += [
+    'SanityTest.jsm',
+]
+
+XPCOM_MANIFESTS += [
+    'components.conf',
 ]
 
 JAR_MANIFESTS += ['jar.mn']