2013-11-15 19:46:44 +04:00
|
|
|
/* 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/. */
|
|
|
|
|
2018-01-30 02:20:18 +03:00
|
|
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
|
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
2013-11-15 19:46:44 +04:00
|
|
|
|
2017-10-15 21:50:30 +03:00
|
|
|
var Scope = {};
|
2018-01-30 02:20:18 +03:00
|
|
|
ChromeUtils.import("resource://gre/modules/CrashMonitor.jsm", Scope);
|
2015-09-15 21:19:45 +03:00
|
|
|
var MonitorAPI = Scope.CrashMonitor;
|
2013-11-15 19:46:44 +04:00
|
|
|
|
2016-02-04 04:27:36 +03:00
|
|
|
function CrashMonitor() {}
|
2013-11-15 19:46:44 +04:00
|
|
|
|
|
|
|
CrashMonitor.prototype = {
|
|
|
|
|
|
|
|
classID: Components.ID("{d9d75e86-8f17-4c57-993e-f738f0d86d42}"),
|
|
|
|
contractID: "@mozilla.org/toolkit/crashmonitor;1",
|
|
|
|
|
2018-04-23 06:55:06 +03:00
|
|
|
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
|
2013-11-15 19:46:44 +04:00
|
|
|
|
2016-12-30 02:34:54 +03:00
|
|
|
observe(aSubject, aTopic, aData) {
|
2013-11-15 19:46:44 +04:00
|
|
|
switch (aTopic) {
|
|
|
|
case "profile-after-change":
|
|
|
|
MonitorAPI.init();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([CrashMonitor]);
|