toolkit/components/crashmonitor/nsCrashMonitor.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/crashmonitor/nsCrashMonitor.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,29 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
     1.9 +Components.utils.import("resource://gre/modules/Services.jsm");
    1.10 +
    1.11 +let Scope = {}
    1.12 +Components.utils.import("resource://gre/modules/CrashMonitor.jsm", Scope);
    1.13 +let MonitorAPI = Scope.CrashMonitor;
    1.14 +
    1.15 +function CrashMonitor() {};
    1.16 +
    1.17 +CrashMonitor.prototype = {
    1.18 +
    1.19 +  classID: Components.ID("{d9d75e86-8f17-4c57-993e-f738f0d86d42}"),
    1.20 +  contractID: "@mozilla.org/toolkit/crashmonitor;1",
    1.21 +
    1.22 +  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIObserver]),
    1.23 +
    1.24 +  observe: function (aSubject, aTopic, aData) {
    1.25 +    switch (aTopic) {
    1.26 +    case "profile-after-change":
    1.27 +      MonitorAPI.init();
    1.28 +    }
    1.29 +  },
    1.30 +};
    1.31 +
    1.32 +this.NSGetFactory = XPCOMUtils.generateNSGetFactory([CrashMonitor]);

mercurial