Bug 867631 - GC: Fix rooting hazard in JSDebugger.cpp r=sfink

This commit is contained in:
Jon Coppeard 2013-05-02 10:22:55 +01:00
parent 2e0cd0171f
commit 3bfc2c8cb1

View File

@ -44,8 +44,8 @@ JSDebugger::AddClass(const JS::Value &global, JSContext* cx)
if (!global.isObject()) {
return NS_ERROR_INVALID_ARG;
}
JSObject* obj = &global.toObject();
JS::RootedObject obj(cx, &global.toObject());
obj = js::UncheckedUnwrap(obj, /* stopAtOuter = */ false);
if (!obj) {
return NS_ERROR_FAILURE;