mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 867631 - GC: Fix rooting hazard in JSDebugger.cpp r=sfink
This commit is contained in:
parent
2e0cd0171f
commit
3bfc2c8cb1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user