toolkit/components/crashes/CrashService.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 "use strict";
     7 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
     9 Cu.import("resource://gre/modules/Services.jsm", this);
    10 Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
    12 /**
    13  * This component makes crash data available throughout the application.
    14  *
    15  * It is a service because some background activity will eventually occur.
    16  */
    17 this.CrashService = function () {};
    19 CrashService.prototype = Object.freeze({
    20   classID: Components.ID("{92668367-1b17-4190-86b2-1061b2179744}"),
    21   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
    23   observe: function (subject, topic, data) {
    24     switch (topic) {
    25       case "profile-after-change":
    26         // Side-effect is the singleton is instantiated.
    27         let m = Services.crashmanager;
    28         break;
    29     }
    30   },
    31 });
    33 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([CrashService]);

mercurial