summaryrefslogtreecommitdiffstats
path: root/js/src/jsapi.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-07-21 22:31:02 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-21 22:33:19 -0400
commit04ac84ff56b9780335560319a8ecd3e8b510874e (patch)
tree8190e36c47a4939c67db833230d01d13a3470bf1 /js/src/jsapi.cpp
parentf6a282023ec220c7cf181276e88a36be2821b132 (diff)
downloadUXP-04ac84ff56b9780335560319a8ecd3e8b510874e.tar
UXP-04ac84ff56b9780335560319a8ecd3e8b510874e.tar.gz
UXP-04ac84ff56b9780335560319a8ecd3e8b510874e.tar.lz
UXP-04ac84ff56b9780335560319a8ecd3e8b510874e.tar.xz
UXP-04ac84ff56b9780335560319a8ecd3e8b510874e.zip
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.
Diffstat (limited to 'js/src/jsapi.cpp')
-rw-r--r--js/src/jsapi.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
index 7cc7bd035..84a315587 100644
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -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);