Bug 868312 - Rooting fixes for dom r=bz

This commit is contained in:
David Zbarsky
2013-05-14 16:25:32 -07:00
parent baa2b4f661
commit d1e4e2d914
4 changed files with 20 additions and 14 deletions

View File

@@ -1211,7 +1211,8 @@ _getwindowobject(NPP npp)
// Using ::JS_GetGlobalObject(cx) is ok here since the window we
// want to return here is the outer window, *not* the inner (since
// we don't know what the plugin will do with it).
return nsJSObjWrapper::GetNewOrUsed(npp, cx, ::JS_GetGlobalObject(cx));
JS::Rooted<JSObject*> global(cx, ::JS_GetGlobalObject(cx));
return nsJSObjWrapper::GetNewOrUsed(npp, cx, global);
}
NPObject* NP_CALLBACK