зеркало из https://github.com/mozilla/gecko-dev.git
Change variable names to reflect the fact that objects are instances, not classes.
This commit is contained in:
Родитель
a04ee26f52
Коммит
61cc38e6ba
|
@ -141,9 +141,9 @@ sub getObject {
|
|||
# constructor call
|
||||
my $self = shift;
|
||||
my($name) = @_;
|
||||
foreach my $service (@{$self->objects}) {
|
||||
if ($service->objectProvides($name)) {
|
||||
return $service;
|
||||
foreach my $object (@{$self->objects}) {
|
||||
if ($object->objectProvides($name)) {
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
return undef;
|
||||
|
@ -173,13 +173,13 @@ sub getObjectList {
|
|||
# constructor call
|
||||
my $self = shift;
|
||||
my($name) = @_;
|
||||
my @services = ();
|
||||
foreach my $service (@{$self->objects}) {
|
||||
if ($service->objectProvides($name)) {
|
||||
push(@services, $service);
|
||||
my @objects = ();
|
||||
foreach my $object (@{$self->objects}) {
|
||||
if ($object->objectProvides($name)) {
|
||||
push(@objects, $object);
|
||||
}
|
||||
}
|
||||
return @services;
|
||||
return @objects;
|
||||
}
|
||||
|
||||
sub getCollectingServiceList {
|
||||
|
|
|
@ -45,10 +45,10 @@ sub provides {
|
|||
}
|
||||
|
||||
sub objectProvides {
|
||||
my $class = shift;
|
||||
my $self = shift;
|
||||
my($service) = @_;
|
||||
return ($service eq 'user.login.loggedOutUserHandle.http' or
|
||||
$class->SUPER::provides($service));
|
||||
$self->SUPER::provides($service));
|
||||
}
|
||||
|
||||
sub objectInit {
|
||||
|
|
|
@ -38,8 +38,8 @@ sub provides { return 0; } # stub
|
|||
|
||||
# what services the module provides as an object
|
||||
sub objectProvides {
|
||||
my $class = shift;
|
||||
return $class->provides(@_);
|
||||
my $self = shift;
|
||||
return $self->provides(@_);
|
||||
}
|
||||
|
||||
sub dispatch {
|
||||
|
|
|
@ -52,10 +52,10 @@ sub provides {
|
|||
}
|
||||
|
||||
sub objectProvides {
|
||||
my $class = shift;
|
||||
my $self = shift;
|
||||
my($service) = @_;
|
||||
return ($service eq 'dispatcher.commands' or
|
||||
$class->SUPER::objectProvides($service));
|
||||
$self->SUPER::objectProvides($service));
|
||||
}
|
||||
|
||||
# input.verify
|
||||
|
|
|
@ -34,9 +34,9 @@ use PLIF::Service;
|
|||
1;
|
||||
|
||||
sub objectProvides {
|
||||
my $class = shift;
|
||||
my $self = shift;
|
||||
my($service) = @_;
|
||||
return ($service eq 'session' or $class->SUPER::provides($service));
|
||||
return ($service eq 'session' or $self->SUPER::provides($service));
|
||||
}
|
||||
|
||||
sub objectInit {
|
||||
|
|
Загрузка…
Ссылка в новой задаче