Bug 792765. Part 0.5: Fix WebIDL codegen to avoid emitting QueryInterface when there is no interface prototype object. r=bz

--HG--
extra : rebase_source : 7e1df198548d8a4f1b2f2a045f637412a5fe8450
This commit is contained in:
Robert O'Callahan 2012-09-25 15:24:43 +12:00
parent cdaa07c5fd
commit d4da4172b2

View File

@ -1095,7 +1095,9 @@ class MethodDefiner(PropertyDefiner):
"flags": "JSPROP_ENUMERATE",
"pref": None })
if not descriptor.interface.parent and not static and descriptor.nativeOwnership == 'nsisupports':
if (not descriptor.interface.parent and not static and
descriptor.nativeOwnership == 'nsisupports' and
descriptor.interface.hasInterfacePrototypeObject()):
self.chrome.append({"name": 'QueryInterface',
"methodInfo": False,
"length": 1,