mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
8ea9191e05
--HG-- extra : rebase_source : 1bbadefa0a86dd3c56c038089242647027c88d8f
34 lines
1.0 KiB
JavaScript
34 lines
1.0 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";
|
|
|
|
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
|
|
|
Cu.import("resource://gre/modules/Services.jsm", this);
|
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
|
|
|
/**
|
|
* This component makes crash data available throughout the application.
|
|
*
|
|
* It is a service because some background activity will eventually occur.
|
|
*/
|
|
this.CrashService = function () {};
|
|
|
|
CrashService.prototype = Object.freeze({
|
|
classID: Components.ID("{92668367-1b17-4190-86b2-1061b2179744}"),
|
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
|
|
|
|
observe: function (subject, topic, data) {
|
|
switch (topic) {
|
|
case "profile-after-change":
|
|
// Side-effect is the singleton is instantiated.
|
|
let m = Services.crashmanager;
|
|
break;
|
|
}
|
|
},
|
|
});
|
|
|
|
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([CrashService]);
|