Bug 1874684 - Part 22: Compute the precise fraction in Duration.p.total and ZonedDate...
[gecko.git] / xpcom / base / nsIDebug2.idl
blobf60a8eafa50f7e55400f1a30a2c2099fa1c502b4
1 /* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */
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 /* interface to expose information about calls to NS_DebugBreak */
8 #include "nsISupports.idl"
10 /**
11 * @note C/C++ consumers who are planning to use the nsIDebug2 interface with
12 * the "@mozilla.org/xpcom;1" contract should use NS_DebugBreak from xpcom
13 * glue instead.
17 [builtinclass, scriptable, uuid(9641dc15-10fb-42e3-a285-18be90a5c10b)]
18 interface nsIDebug2 : nsISupports
20 /**
21 * Whether XPCOM was compiled with DEBUG defined. This often
22 * correlates to whether other code (e.g., Firefox, XULRunner) was
23 * compiled with DEBUG defined.
25 readonly attribute boolean isDebugBuild;
27 /**
28 * The number of assertions since process start.
30 readonly attribute long assertionCount;
32 /**
33 * Whether a debugger is currently attached.
34 * Supports Windows + Mac
36 readonly attribute boolean isDebuggerAttached;
38 /**
39 * Show an assertion and trigger nsIDebug2.break().
41 * @param aStr assertion message
42 * @param aExpr expression that failed
43 * @param aFile file containing assertion
44 * @param aLine line number of assertion
46 void assertion(in string aStr,
47 in string aExpr,
48 in string aFile,
49 in long aLine);
51 /**
52 * Show a warning.
54 * @param aStr warning message
55 * @param aFile file containing assertion
56 * @param aLine line number of assertion
58 void warning(in string aStr,
59 in string aFile,
60 in long aLine);
62 /**
63 * Request to break into a debugger.
65 * @param aFile file containing break request
66 * @param aLine line number of break request
68 void break(in string aFile,
69 in long aLine);
71 /**
72 * Request the process to trigger a fatal abort.
74 * @param aFile file containing abort request
75 * @param aLine line number of abort request
77 void abort(in string aFile,
78 in long aLine);
80 /**
81 * Request the process to trigger a fatal panic!() from Rust code.
83 * @param aMessage the string to pass to panic!().
85 void rustPanic(in string aMessage);
87 /**
88 * Request the process to log a message for a target and level from Rust code.
90 * @param aTarget the string representing the log target.
91 * @param aMessage the string representing the log message.
93 void rustLog(in string aTarget,
94 in string aMessage);
96 /**
97 * Cause an Out of Memory Crash.
99 void crashWithOOM();