|
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/. */ |
|
4 |
|
5 |
|
6 #include "nsISupports.idl" |
|
7 |
|
8 /** |
|
9 * For use by consumers in scripted languages (JavaScript, Java, Python, |
|
10 * Perl, ...). |
|
11 * |
|
12 * @note C/C++ consumers who are planning to use the nsIDebug interface with |
|
13 * the "@mozilla.org/xpcom;1" contract should use NS_DebugBreak from xpcom |
|
14 * glue instead. |
|
15 * |
|
16 */ |
|
17 |
|
18 [scriptable, uuid(3bf0c3d7-3bd9-4cf2-a971-33572c503e1e)] |
|
19 interface nsIDebug : nsISupports |
|
20 { |
|
21 /** |
|
22 * Show an assertion and trigger nsIDebug.break(). |
|
23 * |
|
24 * @param aStr assertion message |
|
25 * @param aExpr expression that failed |
|
26 * @param aFile file containing assertion |
|
27 * @param aLine line number of assertion |
|
28 * |
|
29 */ |
|
30 void assertion(in string aStr, |
|
31 in string aExpr, |
|
32 in string aFile, |
|
33 in long aLine); |
|
34 |
|
35 /** |
|
36 * Show a warning. |
|
37 * |
|
38 * @param aStr warning message |
|
39 * @param aFile file containing assertion |
|
40 * @param aLine line number of assertion |
|
41 */ |
|
42 void warning(in string aStr, |
|
43 in string aFile, |
|
44 in long aLine); |
|
45 |
|
46 /** |
|
47 * Request to break into a debugger. |
|
48 * |
|
49 * @param aFile file containing break request |
|
50 * @param aLine line number of break request |
|
51 */ |
|
52 void break(in string aFile, |
|
53 in long aLine); |
|
54 |
|
55 /** |
|
56 * Request the process to trigger a fatal abort. |
|
57 * |
|
58 * @param aFile file containing abort request |
|
59 * @param aLine line number of abort request |
|
60 */ |
|
61 void abort(in string aFile, |
|
62 in long aLine); |
|
63 }; |
|
64 |