Bug 1017424 part 8. Remove the annotation of Window as having XPConnect impls in codegen. r=peterv

This commit is contained in:
Boris Zbarsky 2014-09-05 14:28:45 -04:00
parent 7dd6d51191
commit 1f4c6b7396
2 changed files with 1 additions and 10 deletions

View File

@ -1596,7 +1596,6 @@ DOMInterfaces = {
'Window': {
'nativeType': 'nsGlobalWindow',
'hasXPConnectImpls': True,
'binaryNames': {
'postMessage': 'postMessageMoz',
},

View File

@ -2956,12 +2956,6 @@ def CreateBindingJSObject(descriptor, properties, parent):
js::SetReservedSlot(obj, DOM_OBJECT_SLOT, PRIVATE_TO_JSVAL(aObject));
""",
parent=parent)
if "Window" in descriptor.interface.identifier.name:
create = dedent("""
MOZ_ASSERT(false,
"Our current reserved slot situation is unsafe for globals. Fix "
"bug 760095!");
""") + create
create = objDecl + create
if descriptor.nativeOwnership == 'refcounted':
@ -7676,9 +7670,7 @@ class CGSpecializedGetter(CGAbstractStaticMethod):
nativeName = CGSpecializedGetter.makeNativeName(self.descriptor,
self.attr)
if self.attr.slotIndex is not None:
if (self.descriptor.hasXPConnectImpls and
(self.descriptor.interface.identifier.name != 'Window' or
self.attr.identifier.name != 'document')):
if self.descriptor.hasXPConnectImpls:
raise TypeError("Interface '%s' has XPConnect impls, so we "
"can't use our slot for property '%s'!" %
(self.descriptor.interface.identifier.name,