mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 13:58:40 +09:00
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.
This commit is contained in:
parent
e78a4b88e3
commit
367fc9432e
3 changed files with 6 additions and 6 deletions
|
|
@ -6326,7 +6326,7 @@ JSErrorNotes::~JSErrorNotes()
|
|||
}
|
||||
|
||||
static UniquePtr<JSErrorNotes::Note>
|
||||
CreateErrorNoteVA(JSContext* cx,
|
||||
CreateErrorNoteVA(ExclusiveContext* cx,
|
||||
const char* filename, unsigned lineno, unsigned column,
|
||||
JSErrorCallback errorCallback, void* userRef,
|
||||
const unsigned errorNumber,
|
||||
|
|
@ -6357,7 +6357,7 @@ JSErrorNotes::addNoteASCII(ExclusiveContext* cx,
|
|||
{
|
||||
va_list ap;
|
||||
va_start(ap, errorNumber);
|
||||
auto note = CreateErrorNoteVA(cx->asJSContext(), filename, lineno, column, errorCallback, userRef,
|
||||
auto note = CreateErrorNoteVA(cx, filename, lineno, column, errorCallback, userRef,
|
||||
errorNumber, ArgumentsAreASCII, ap);
|
||||
va_end(ap);
|
||||
|
||||
|
|
@ -6376,7 +6376,7 @@ JSErrorNotes::addNoteLatin1(ExclusiveContext* cx,
|
|||
{
|
||||
va_list ap;
|
||||
va_start(ap, errorNumber);
|
||||
auto note = CreateErrorNoteVA(cx->asJSContext(), filename, lineno, column, errorCallback, userRef,
|
||||
auto note = CreateErrorNoteVA(cx, filename, lineno, column, errorCallback, userRef,
|
||||
errorNumber, ArgumentsAreLatin1, ap);
|
||||
va_end(ap);
|
||||
|
||||
|
|
@ -6395,7 +6395,7 @@ JSErrorNotes::addNoteUTF8(ExclusiveContext* cx,
|
|||
{
|
||||
va_list ap;
|
||||
va_start(ap, errorNumber);
|
||||
auto note = CreateErrorNoteVA(cx->asJSContext(), filename, lineno, column, errorCallback, userRef,
|
||||
auto note = CreateErrorNoteVA(cx, filename, lineno, column, errorCallback, userRef,
|
||||
errorNumber, ArgumentsAreUTF8, ap);
|
||||
va_end(ap);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue