зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1047777. Disallow the [CheckPermissions] extended attributeon things that are exposed in workers, since its implementation does not work correctly on workers. r=peterv
This commit is contained in:
Родитель
fa87ed9a17
Коммит
03d4120c1d
|
@ -1007,7 +1007,14 @@ class IDLInterface(IDLObjectWithScope):
|
||||||
|
|
||||||
if (self.getExtendedAttribute("Pref") and
|
if (self.getExtendedAttribute("Pref") and
|
||||||
self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
|
self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
|
||||||
raise WebIDLError("[Pref] used on an member that is not %s-only" %
|
raise WebIDLError("[Pref] used on an interface that is not %s-only" %
|
||||||
|
self.parentScope.primaryGlobalName,
|
||||||
|
[self.location])
|
||||||
|
|
||||||
|
if (self.getExtendedAttribute("CheckPermissions") and
|
||||||
|
self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
|
||||||
|
raise WebIDLError("[CheckPermissions] used on an interface that is "
|
||||||
|
"not %s-only" %
|
||||||
self.parentScope.primaryGlobalName,
|
self.parentScope.primaryGlobalName,
|
||||||
[self.location])
|
[self.location])
|
||||||
|
|
||||||
|
@ -3022,6 +3029,13 @@ class IDLInterfaceMember(IDLObjectWithIdentifier):
|
||||||
"%s-only" % self._scope.primaryGlobalName,
|
"%s-only" % self._scope.primaryGlobalName,
|
||||||
[self.location])
|
[self.location])
|
||||||
|
|
||||||
|
if (self.getExtendedAttribute("CheckPermissions") and
|
||||||
|
self.exposureSet != set([self._scope.primaryGlobalName])):
|
||||||
|
raise WebIDLError("[CheckPermissions] used on an interface member "
|
||||||
|
"that is not %s-only" %
|
||||||
|
self._scope.primaryGlobalName,
|
||||||
|
[self.location])
|
||||||
|
|
||||||
class IDLConst(IDLInterfaceMember):
|
class IDLConst(IDLInterfaceMember):
|
||||||
def __init__(self, location, identifier, type, value):
|
def __init__(self, location, identifier, type, value):
|
||||||
IDLInterfaceMember.__init__(self, location, identifier,
|
IDLInterfaceMember.__init__(self, location, identifier,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче