diff --git a/js/jsd/jsd_stak.cpp b/js/jsd/jsd_stak.cpp index 50e10fbe776..ad4089ffe94 100644 --- a/js/jsd/jsd_stak.cpp +++ b/js/jsd/jsd_stak.cpp @@ -544,11 +544,10 @@ JSDValue* jsd_GetException(JSDContext* jsdc, JSDThreadState* jsdthreadstate) { JSContext* cx; - JS::RootedValue val(cx); - if(!(cx = _getContextForThreadState(jsdc, jsdthreadstate))) return nullptr; + JS::RootedValue val(cx); if(JS_GetPendingException(cx, &val)) return jsd_NewValue(jsdc, val); return nullptr;