mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 708215 - Report errors from the safe JS context. r=bent
This commit is contained in:
parent
a2b9f740f0
commit
b25121961d
@ -206,6 +206,11 @@ static JSClass global_class = {
|
||||
JSCLASS_NO_OPTIONAL_MEMBERS
|
||||
};
|
||||
|
||||
// We just use the same reporter as the component loader
|
||||
// XXX #include angels cry.
|
||||
extern void
|
||||
mozJSLoaderErrorReporter(JSContext *cx, const char *message, JSErrorReport *rep);
|
||||
|
||||
/* attribute JSContext safeJSContext; */
|
||||
NS_IMETHODIMP
|
||||
XPCJSContextStack::GetSafeJSContext(JSContext * *aSafeJSContext)
|
||||
@ -238,6 +243,8 @@ XPCJSContextStack::GetSafeJSContext(JSContext * *aSafeJSContext)
|
||||
// scoped JS Request
|
||||
JSAutoRequest req(mSafeJSContext);
|
||||
|
||||
JS_SetErrorReporter(mSafeJSContext, mozJSLoaderErrorReporter);
|
||||
|
||||
// Because we can run off the main thread, we create an MT
|
||||
// global object. Our principal is the unique key.
|
||||
JSCompartment *compartment;
|
||||
|
Loading…
Reference in New Issue
Block a user