This commit is contained in:
Blake Kaplan 2009-04-17 12:41:42 +01:00
Родитель 3b5962c57e
Коммит 4c879cbdf2
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -2541,7 +2541,7 @@ private:
nsXPCWrappedJSClass(XPCCallContext& ccx, REFNSIID aIID,
nsIInterfaceInfo* aInfo);
JSObject* NewOutObject(JSContext* cx);
JSObject* NewOutObject(JSContext* cx, JSObject* scope);
JSBool IsReflectable(uint16 i) const
{return (JSBool)(mDescriptors[i/32] & (1 << (i%32)));}

Просмотреть файл

@ -1512,7 +1512,7 @@ nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS* wrapper, uint16 methodIndex,
if(param.IsOut())
{
// create an 'out' object
JSObject* out_obj = NewOutObject(cx);
JSObject* out_obj = NewOutObject(cx, obj);
if(!out_obj)
{
retval = NS_ERROR_OUT_OF_MEMORY;
@ -1869,9 +1869,9 @@ nsXPCWrappedJSClass::GetInterfaceName()
}
JSObject*
nsXPCWrappedJSClass::NewOutObject(JSContext* cx)
nsXPCWrappedJSClass::NewOutObject(JSContext* cx, JSObject* scope)
{
return JS_NewObject(cx, nsnull, nsnull, nsnull);
return JS_NewObject(cx, nsnull, nsnull, JS_GetGlobalForObject(cx, scope));
}