From 9a7113f7c8d89d27558942f42603c4edee779d20 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 9 Jun 2019 11:27:16 -0400 Subject: 1283712 - Part 1: Add JSErrorBase, JSErrorNotes, JSErrorNotes::Note, and JSErrorReport.{notes,freeNotes}. --- js/src/jscntxt.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'js/src/jscntxt.h') diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h index 0a2841242..c1e676f68 100644 --- a/js/src/jscntxt.h +++ b/js/src/jscntxt.h @@ -621,6 +621,13 @@ ExpandErrorArgumentsVA(ExclusiveContext* cx, JSErrorCallback callback, ErrorArgumentsType argumentsType, JSErrorReport* reportp, va_list ap); +extern bool +ExpandErrorArgumentsVA(JSContext* cx, JSErrorCallback callback, + void* userRef, const unsigned errorNumber, + const char16_t** messageArgs, + ErrorArgumentsType argumentsType, + JSErrorNotes::Note* notep, va_list ap); + /* |callee| requires a usage string provided by JS_DefineFunctionsWithHelp. */ extern void ReportUsageErrorASCII(JSContext* cx, HandleObject callee, const char* msg); -- cgit v1.2.3 From f4552af8bc9419c5f2860385de14e28a6805ea7e Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 9 Jun 2019 14:38:36 -0400 Subject: 1283712 - Part 5: Support notes in Debugger. --- js/src/jscntxt.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/src/jscntxt.h') diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h index c1e676f68..c949d18fd 100644 --- a/js/src/jscntxt.h +++ b/js/src/jscntxt.h @@ -685,6 +685,9 @@ ReportValueErrorFlags(JSContext* cx, unsigned flags, const unsigned errorNumber, ((void)ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, \ spindex, v, fallback, arg1, arg2)) +JSObject* +CreateErrorNotesArray(JSContext* cx, JSErrorReport* report); + } /* namespace js */ extern const JSErrorFormatString js_ErrorFormatString[JSErr_Limit]; -- cgit v1.2.3 From 04ac84ff56b9780335560319a8ecd3e8b510874e Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 21 Jul 2019 22:31:02 -0400 Subject: Issue #1195 - Fix errant use of JSContext in ErrorNotes We want to ensure that ErrorNotes stays on the main thread to prevent a race condition that was introduced in 1283712 - Part 1. This fixes #1195. --- js/src/jscntxt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src/jscntxt.h') diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h index c949d18fd..8be3376cf 100644 --- a/js/src/jscntxt.h +++ b/js/src/jscntxt.h @@ -622,7 +622,7 @@ ExpandErrorArgumentsVA(ExclusiveContext* cx, JSErrorCallback callback, JSErrorReport* reportp, va_list ap); extern bool -ExpandErrorArgumentsVA(JSContext* cx, JSErrorCallback callback, +ExpandErrorArgumentsVA(ExclusiveContext* cx, JSErrorCallback callback, void* userRef, const unsigned errorNumber, const char16_t** messageArgs, ErrorArgumentsType argumentsType, -- cgit v1.2.3