diff --git a/js/jsd/jsd_val.cpp b/js/jsd/jsd_val.cpp index 20249cc2cbd..a8cad6d005a 100644 --- a/js/jsd/jsd_val.cpp +++ b/js/jsd/jsd_val.cpp @@ -323,6 +323,7 @@ jsd_GetValueWrappedJSVal(JSDContext* jsdc, JSDValue* jsdval) jsval val = jsdval->val; if (!JSVAL_IS_PRIMITIVE(val)) { cx = JSD_GetDefaultJSContext(jsdc); + JSAutoCompartment ac(cx, JSVAL_TO_OBJECT(val)); obj = JS_ObjectToOuterObject(cx, JSVAL_TO_OBJECT(val)); if (!obj) {