diff --git a/dom/xbl/nsXBLBinding.cpp b/dom/xbl/nsXBLBinding.cpp index 76ad62d2b55e..1825d49091cf 100644 --- a/dom/xbl/nsXBLBinding.cpp +++ b/dom/xbl/nsXBLBinding.cpp @@ -965,7 +965,7 @@ nsXBLBinding::DoInitJSClass(JSContext *cx, JS::Rooted parent_proto(cx); { JS::RootedObject wrapped(cx, obj); - JSAutoCompartment ac(cx, xblScope); + JSAutoRealm ar(cx, xblScope); if (!JS_WrapObject(cx, &wrapped)) { return NS_ERROR_FAILURE; }