Fix for bug 14666 ("Running this JavaToJavaScript test causes

apprunner to crash."), fix contributed by
jeff.dyer@compilercompany.com, r=drapeau@eng.sun.com. Checks whether
there's a current valid context; if there's no context, don't bother
checking if an exception is pending on that context.
This commit is contained in:
drapeau%eng.sun.com 1999-12-01 00:44:08 +00:00
Родитель 6d00264a22
Коммит c1d36cf1ac
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -445,7 +445,7 @@ throw_any_pending_js_error_as_a_java_exception(JSJavaThreadState *jsj_env)
cx = jsj_env->cx;
/* Get the pending JS exception if it exists */
if (JS_IsExceptionPending(cx)) {
if (cx&&JS_IsExceptionPending(cx)) {
if (!JS_GetPendingException(cx, &pending_exception))
goto out_of_memory;