gecko/js/xpconnect/idl/nsIScriptError.idl
Ehsan Akhgari 0fd9123eac Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00

100 lines
3.5 KiB
Plaintext

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* nsIConsoleMessage subclass for representing JavaScript errors and warnings.
*/
#include "nsISupports.idl"
#include "nsIConsoleMessage.idl"
[scriptable, uuid(c6dd877a-87b6-47cc-968d-90f4514ec65f)]
interface nsIScriptError : nsIConsoleMessage
{
/** pseudo-flag for default case */
const unsigned long errorFlag = 0x0;
/** message is warning */
const unsigned long warningFlag = 0x1;
/** exception was thrown for this case - exception-aware hosts can ignore */
const unsigned long exceptionFlag = 0x2;
// XXX check how strict is implemented these days.
/** error or warning is due to strict option */
const unsigned long strictFlag = 0x4;
/**
* The error message without any context/line number information.
*
* @note nsIConsoleMessage.message will return the error formatted
* with file/line information.
*/
readonly attribute AString errorMessage;
readonly attribute AString sourceName;
readonly attribute AString sourceLine;
readonly attribute uint32_t lineNumber;
readonly attribute uint32_t columnNumber;
readonly attribute uint32_t flags;
/**
* Categories I know about -
* XUL javascript
* content javascript (both of these from nsDocShell, currently)
* component javascript (errors in JS components)
*/
readonly attribute string category;
/*
The time (in milliseconds from the Epoch) that the script error instance
was initialised, and thus the time when the error occurred.
Currently used to display date and time of the message in Error console.
The timestamp is initialized as JS_now/1000 so that it can be
compared to Date.now in Javascript.
*/
readonly attribute long long timeStamp;
/* Get the window id this was initialized with. Zero will be
returned if init() was used instead of initWithWindowID(). */
readonly attribute unsigned long long outerWindowID;
/* Get the inner window id this was initialized with. Zero will be
returned if init() was used instead of initWithWindowID(). */
readonly attribute unsigned long long innerWindowID;
void init(in wstring message,
in wstring sourceName,
in wstring sourceLine,
in uint32_t lineNumber,
in uint32_t columnNumber,
in uint32_t flags,
in string category);
/* This should be called instead of nsIScriptError.init to
initialize with a window id. The window id should be for the
inner window associated with this error. */
void initWithWindowID(in wstring message,
in wstring sourceName,
in wstring sourceLine,
in uint32_t lineNumber,
in uint32_t columnNumber,
in uint32_t flags,
in string category,
in unsigned long long innerWindowID);
AUTF8String toString();
};
%{ C++
#define NS_SCRIPTERROR_CLASSNAME "Script Error"
#define NS_SCRIPTERROR_CID \
{ 0xe38e53b9, 0x5bb0, 0x456a, { 0xb5, 0x53, 0x57, 0x93, 0x70, 0xcb, 0x15, 0x67 }}
#define NS_SCRIPTERROR_CONTRACTID "@mozilla.org/scripterror;1"
%}