mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 636811 - Use JSSCRIPT_NO_SCRIPT_RVAL in js component loader, r=mrbkap
This commit is contained in:
parent
0e6972a633
commit
c445f6e656
@ -1071,11 +1071,9 @@ mozJSComponentLoader::GlobalForLocation(nsILocalFile *aComponentFile,
|
||||
// If |exception| is non-null, then our caller wants us to propagate
|
||||
// any exceptions out to our caller. Ensure that the engine doesn't
|
||||
// eagerly report the exception.
|
||||
uint32 oldopts = 0;
|
||||
if (exception) {
|
||||
oldopts = JS_GetOptions(cx);
|
||||
JS_SetOptions(cx, oldopts | JSOPTION_DONT_REPORT_UNCAUGHT);
|
||||
}
|
||||
uint32 oldopts = JS_GetOptions(cx);
|
||||
JS_SetOptions(cx, oldopts | JSOPTION_NO_SCRIPT_RVAL |
|
||||
(exception ? JSOPTION_DONT_REPORT_UNCAUGHT : 0));
|
||||
|
||||
if (realFile) {
|
||||
#ifdef HAVE_PR_MEMMAP
|
||||
@ -1189,12 +1187,10 @@ mozJSComponentLoader::GlobalForLocation(nsILocalFile *aComponentFile,
|
||||
// exception on this context.
|
||||
// NB: The caller must stick exception into a rooted slot (probably on
|
||||
// its context) as soon as possible to avoid GC hazards.
|
||||
if (exception) {
|
||||
JS_SetOptions(cx, oldopts);
|
||||
if (!script) {
|
||||
JS_GetPendingException(cx, exception);
|
||||
JS_ClearPendingException(cx);
|
||||
}
|
||||
JS_SetOptions(cx, oldopts);
|
||||
if (!script && exception) {
|
||||
JS_GetPendingException(cx, exception);
|
||||
JS_ClearPendingException(cx);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1241,8 +1237,7 @@ mozJSComponentLoader::GlobalForLocation(nsILocalFile *aComponentFile,
|
||||
// See bug 384168.
|
||||
*aGlobal = global;
|
||||
|
||||
jsval retval;
|
||||
if (!JS_ExecuteScriptVersion(cx, global, script, &retval, JSVERSION_LATEST)) {
|
||||
if (!JS_ExecuteScriptVersion(cx, global, script, NULL, JSVERSION_LATEST)) {
|
||||
#ifdef DEBUG_shaver_off
|
||||
fprintf(stderr, "mJCL: failed to execute %s\n", nativePath.get());
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user