fune/toolkit/components/normandy/shield-content-process.js
Kris Maglione dfe5c95ca1 Bug 1479241: Don't eagerly load AboutPages.jsm in content processes. r=mythmon
MozReview-Commit-ID: 1ewRIxTVzJR

--HG--
rename : toolkit/components/normandy/content/shield-content-process.js => toolkit/components/normandy/shield-content-process.js
extra : source : f150e62dcbbdc14bec93db0705470a5d9e71737e
2018-07-31 14:13:03 -07:00

26 lines
1 KiB
JavaScript

/* 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";
/**
* Registers about: pages provided by Shield, and listens for a shutdown event
* from the add-on before un-registering them.
*
* This file is loaded as a process script. It is executed once for each
* process, including the parent one.
*/
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://normandy-content/AboutPages.jsm");
// generateNSGetFactory only knows how to register factory classes, with
// classID properties on their prototype, and a constructor that returns
// an instance. It can't handle singletons directly. So wrap the
// aboutStudies singleton in a trivial constructor function.
function AboutStudies() {
return AboutStudies.prototype;
}
AboutStudies.prototype = AboutPages.aboutStudies;
var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutStudies]);