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:
Boris Zbarsky 2014-08-25 15:07:44 -04:00
parent 74e0ac6790
commit d76b15345b

View File

@ -1007,7 +1007,14 @@ class IDLInterface(IDLObjectWithScope):
if (self.getExtendedAttribute("Pref") and
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.location])
@ -3022,6 +3029,13 @@ class IDLInterfaceMember(IDLObjectWithIdentifier):
"%s-only" % self._scope.primaryGlobalName,
[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):
def __init__(self, location, identifier, type, value):
IDLInterfaceMember.__init__(self, location, identifier,