Bug 1127475 - Remove unnecessary parent arguments. r=bz
This commit is contained in:
@@ -1991,7 +1991,8 @@ nsWindowSH::GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
|
||||
if (aWin->GetDoc()) {
|
||||
aWin->GetDoc()->WarnOnceAbout(nsIDocument::eWindow_Controllers);
|
||||
}
|
||||
JS::Rooted<JSObject*> shim(cx, JS_NewObject(cx, &ControllersShimClass, obj));
|
||||
MOZ_ASSERT(JS_IsGlobalObject(obj));
|
||||
JS::Rooted<JSObject*> shim(cx, JS_NewObject(cx, &ControllersShimClass));
|
||||
if (NS_WARN_IF(!shim)) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
@@ -400,9 +400,7 @@ WrapperAnswer::RecvCallOrConstruct(const ObjectId &objId,
|
||||
for (size_t i = 0; i < argv.Length(); i++) {
|
||||
if (argv[i].type() == JSParam::Tvoid_t) {
|
||||
// This is an outparam.
|
||||
JSCompartment *compartment = js::GetContextCompartment(cx);
|
||||
RootedObject global(cx, JS_GetGlobalForCompartmentOrNull(cx, compartment));
|
||||
RootedObject obj(cx, xpc::NewOutObject(cx, global));
|
||||
RootedObject obj(cx, xpc::NewOutObject(cx));
|
||||
if (!obj)
|
||||
return fail(cx, rs);
|
||||
if (!outobjects.append(ObjectValue(*obj)))
|
||||
|
||||
@@ -1124,7 +1124,7 @@ nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS* wrapper, uint16_t methodIndex,
|
||||
|
||||
if (param.IsOut() || param.IsDipper()) {
|
||||
// create an 'out' object
|
||||
RootedObject out_obj(cx, NewOutObject(cx, obj));
|
||||
RootedObject out_obj(cx, NewOutObject(cx));
|
||||
if (!out_obj) {
|
||||
retval = NS_ERROR_OUT_OF_MEMORY;
|
||||
goto pre_call_clean_up;
|
||||
@@ -1469,10 +1469,9 @@ xpc::IsOutObject(JSContext* cx, JSObject* obj)
|
||||
}
|
||||
|
||||
JSObject*
|
||||
xpc::NewOutObject(JSContext* cx, JSObject* scope)
|
||||
xpc::NewOutObject(JSContext* cx)
|
||||
{
|
||||
RootedObject global(cx, JS_GetGlobalForObject(cx, scope));
|
||||
return JS_NewObject(cx, nullptr, global);
|
||||
return JS_NewObject(cx, &XPCOutParamClass);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3753,7 +3753,7 @@ ObjectScope(JSObject *obj)
|
||||
return CompartmentPrivate::Get(obj)->scope;
|
||||
}
|
||||
|
||||
JSObject* NewOutObject(JSContext* cx, JSObject* scope);
|
||||
JSObject* NewOutObject(JSContext* cx);
|
||||
bool IsOutObject(JSContext* cx, JSObject* obj);
|
||||
|
||||
nsresult HasInstance(JSContext *cx, JS::HandleObject objArg, const nsID *iid, bool *bp);
|
||||
|
||||
Reference in New Issue
Block a user