mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 790732 - Remove the aTarget parameter from AttachComponentsObject. r=mrbkap
I added this when I thought we'd be defining Components on an object on the XBL scope chain. At this point, it's not necessary anymore.
This commit is contained in:
parent
061514d5c1
commit
833b734f38
@ -4880,8 +4880,7 @@ ContentComponentsGetterOp(JSContext *cx, JSHandleObject obj, JSHandleId id,
|
||||
// static
|
||||
JSBool
|
||||
nsXPCComponents::AttachComponentsObject(XPCCallContext& ccx,
|
||||
XPCWrappedNativeScope* aScope,
|
||||
JSObject* aTarget)
|
||||
XPCWrappedNativeScope* aScope)
|
||||
{
|
||||
JSObject *components = aScope->GetComponentsJSObject(ccx);
|
||||
if (!components)
|
||||
@ -4889,13 +4888,11 @@ nsXPCComponents::AttachComponentsObject(XPCCallContext& ccx,
|
||||
|
||||
JSObject *global = aScope->GetGlobalJSObject();
|
||||
MOZ_ASSERT(js::IsObjectInContextCompartment(global, ccx));
|
||||
if (!aTarget)
|
||||
aTarget = global;
|
||||
|
||||
jsid id = ccx.GetRuntime()->GetStringID(XPCJSRuntime::IDX_COMPONENTS);
|
||||
JSPropertyOp getter = AccessCheck::isChrome(global) ? nullptr
|
||||
: &ContentComponentsGetterOp;
|
||||
return JS_DefinePropertyById(ccx, aTarget, id, js::ObjectValue(*components),
|
||||
return JS_DefinePropertyById(ccx, global, id, js::ObjectValue(*components),
|
||||
getter, nullptr, JSPROP_PERMANENT | JSPROP_READONLY);
|
||||
}
|
||||
|
||||
|
@ -3722,13 +3722,9 @@ public:
|
||||
NS_DECL_NSISECURITYCHECKEDCOMPONENT
|
||||
|
||||
public:
|
||||
// The target is the object upon which |Components| will be defined. If
|
||||
// aTarget is left null, a default object will be computed. This is usually
|
||||
// the right thing to do.
|
||||
static JSBool
|
||||
AttachComponentsObject(XPCCallContext& ccx,
|
||||
XPCWrappedNativeScope* aScope,
|
||||
JSObject* aTarget = NULL);
|
||||
XPCWrappedNativeScope* aScope);
|
||||
|
||||
void SystemIsBeingShutDown() {ClearMembers();}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user