1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/base/nsIDebug.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,64 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +/** 1.12 + * For use by consumers in scripted languages (JavaScript, Java, Python, 1.13 + * Perl, ...). 1.14 + * 1.15 + * @note C/C++ consumers who are planning to use the nsIDebug interface with 1.16 + * the "@mozilla.org/xpcom;1" contract should use NS_DebugBreak from xpcom 1.17 + * glue instead. 1.18 + * 1.19 + */ 1.20 + 1.21 +[scriptable, uuid(3bf0c3d7-3bd9-4cf2-a971-33572c503e1e)] 1.22 +interface nsIDebug : nsISupports 1.23 +{ 1.24 + /** 1.25 + * Show an assertion and trigger nsIDebug.break(). 1.26 + * 1.27 + * @param aStr assertion message 1.28 + * @param aExpr expression that failed 1.29 + * @param aFile file containing assertion 1.30 + * @param aLine line number of assertion 1.31 + * 1.32 + */ 1.33 + void assertion(in string aStr, 1.34 + in string aExpr, 1.35 + in string aFile, 1.36 + in long aLine); 1.37 + 1.38 + /** 1.39 + * Show a warning. 1.40 + * 1.41 + * @param aStr warning message 1.42 + * @param aFile file containing assertion 1.43 + * @param aLine line number of assertion 1.44 + */ 1.45 + void warning(in string aStr, 1.46 + in string aFile, 1.47 + in long aLine); 1.48 + 1.49 + /** 1.50 + * Request to break into a debugger. 1.51 + * 1.52 + * @param aFile file containing break request 1.53 + * @param aLine line number of break request 1.54 + */ 1.55 + void break(in string aFile, 1.56 + in long aLine); 1.57 + 1.58 + /** 1.59 + * Request the process to trigger a fatal abort. 1.60 + * 1.61 + * @param aFile file containing abort request 1.62 + * @param aLine line number of abort request 1.63 + */ 1.64 + void abort(in string aFile, 1.65 + in long aLine); 1.66 +}; 1.67 +