toolkit/components/finalizationwitness/nsIFinalizationWitnessService.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
michael@0 2 /* vim: set ts=2 et sw=2 tw=40: */
michael@0 3 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8
michael@0 9
michael@0 10 [scriptable, uuid(15686f9d-483e-4361-98cd-37f1e8f1e61d)]
michael@0 11 interface nsIFinalizationWitnessService: nsISupports
michael@0 12 {
michael@0 13 /**
michael@0 14 * Create a new Finalization Witness.
michael@0 15 *
michael@0 16 * A finalization witness is an object whose sole role is to
michael@0 17 * broadcast when it is garbage-collected. Once the witness is
michael@0 18 * created, call method its method |forget()| to prevent the
michael@0 19 * broadcast.
michael@0 20 *
michael@0 21 * @param aTopic The topic that the witness will broadcast using
michael@0 22 * Services.obs.
michael@0 23 * @param aString The string that the witness will broadcast.
michael@0 24 * @return An object with a single method |forget()|.
michael@0 25 */
michael@0 26 [implicit_jscontext]
michael@0 27 jsval make(in string aTopic, in wstring aString);
michael@0 28 };
michael@0 29
michael@0 30 %{ C++
michael@0 31
michael@0 32 #define FINALIZATIONWITNESSSERVICE_CID {0x15686f9d,0x483e,0x4361,{0x98,0xcd,0x37,0xf1,0xe8,0xf1,0xe6,0x1d}}
michael@0 33 #define FINALIZATIONWITNESSSERVICE_CONTRACTID "@mozilla.org/toolkit/finalizationwitness;1"
michael@0 34
michael@0 35 %}

mercurial