summaryrefslogtreecommitdiffstats
path: root/dom/bindings/nsScriptError.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-16 10:21:27 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:33 -0400
commit332c1c28ac6fdb66b6dc4ea6732d98be8d87749b (patch)
tree247953c3abb7a4034646f1858e6657a3be144554 /dom/bindings/nsScriptError.h
parent4a82fdad87107d369df20da0a4a0987b1bd821fd (diff)
downloadUXP-332c1c28ac6fdb66b6dc4ea6732d98be8d87749b.tar
UXP-332c1c28ac6fdb66b6dc4ea6732d98be8d87749b.tar.gz
UXP-332c1c28ac6fdb66b6dc4ea6732d98be8d87749b.tar.lz
UXP-332c1c28ac6fdb66b6dc4ea6732d98be8d87749b.tar.xz
UXP-332c1c28ac6fdb66b6dc4ea6732d98be8d87749b.zip
1283712 - Part 7: Add nsIScriptErrorNote and nsIScriptError.notes.
Diffstat (limited to 'dom/bindings/nsScriptError.h')
-rw-r--r--dom/bindings/nsScriptError.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/dom/bindings/nsScriptError.h b/dom/bindings/nsScriptError.h
index da59e3082..b8049d0a0 100644
--- a/dom/bindings/nsScriptError.h
+++ b/dom/bindings/nsScriptError.h
@@ -17,6 +17,26 @@
#include "nsIScriptError.h"
#include "nsString.h"
+class nsScriptErrorNote final : public nsIScriptErrorNote {
+ public:
+ nsScriptErrorNote();
+
+ NS_DECL_THREADSAFE_ISUPPORTS
+ NS_DECL_NSISCRIPTERRORNOTE
+
+ void Init(const nsAString& message, const nsAString& sourceName,
+ uint32_t lineNumber, uint32_t columnNumber);
+
+ private:
+ virtual ~nsScriptErrorNote();
+
+ nsString mMessage;
+ nsString mSourceName;
+ nsString mSourceLine;
+ uint32_t mLineNumber;
+ uint32_t mColumnNumber;
+};
+
// Definition of nsScriptError..
class nsScriptErrorBase : public nsIScriptError {
public:
@@ -25,12 +45,15 @@ public:
NS_DECL_NSICONSOLEMESSAGE
NS_DECL_NSISCRIPTERROR
+ void AddNote(nsIScriptErrorNote* note);
+
protected:
virtual ~nsScriptErrorBase();
void
InitializeOnMainThread();
+ nsCOMArray<nsIScriptErrorNote> mNotes;
nsString mMessage;
nsString mMessageName;
nsString mSourceName;