Bug 1686838 [wpt PR 27194] - [webcodecs] Deprecate VideoFrame.destroy()., a=testonly
[gecko.git] / xpcom / base / nsIConsoleService.idl
blob446c56513bbbbcaddf1c3f67637dcae250fb7a2a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 interface nsIConsoleListener;
9 interface nsIConsoleMessage;
11 [scriptable, uuid(0eb81d20-c37e-42d4-82a8-ca9ae96bdf52)]
12 interface nsIConsoleService : nsISupports
14 void logMessage(in nsIConsoleMessage message);
16 /**
17 * Convenience method for logging simple messages.
19 void logStringMessage(in wstring message);
21 /**
22 * Get an array of all the messages logged so far.
24 Array<nsIConsoleMessage> getMessageArray();
26 /**
27 * To guard against stack overflows from listeners that could log
28 * messages (it's easy to do this inadvertently from listeners
29 * implemented in JavaScript), we don't call any listeners when
30 * another error is already being logged.
32 void registerListener(in nsIConsoleListener listener);
34 /**
35 * Each registered listener should also be unregistered.
37 void unregisterListener(in nsIConsoleListener listener);
39 /**
40 * Clear the message buffer (e.g. for privacy reasons).
42 void reset();
44 /**
45 * Clear the message buffer for a given window.
47 void resetWindow(in uint64_t windowInnerId);
51 %{ C++
52 #define NS_CONSOLESERVICE_CID \
53 { 0x7e3ff85c, 0x1dd2, 0x11b2, { 0x8d, 0x4b, 0xeb, 0x45, 0x2c, 0xb0, 0xff, 0x40 }}
55 #define NS_CONSOLESERVICE_CONTRACTID "@mozilla.org/consoleservice;1"