Stop pretending that CreateInterfaceObjects2 can return the interface object.

We do not currently support the case of a non-callback interface that doesn't
have an interface prototype object. (This case is not allowed by the WebIDL
specification; it was added to Gecko to allow feature-detecting the URL
interface. See <https://bugzilla.mozilla.org/show_bug.cgi?id=1026720>.)

It follows that, if we call CreateInterfaceObjects2 at all, we will call it
with a protoClass argument, so there is no reason to use a nullable pointer
type for that argument.

Moreover, if we had actually supported that case, the returned interface
object would have been stored in the interface prototype object cache, to ill
effect.
This commit is contained in:
Ms2ger 2014-06-18 11:53:07 +02:00
parent 9eff8b458f
commit d7c4f2ba93
2 changed files with 12 additions and 21 deletions

View file

@ -1902,14 +1902,13 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
return "Some(%s.as_slice())" % val
call = """return CreateInterfaceObjects2(aCx, aGlobal, aReceiver, parentProto,
%s, %s, %d,
&PrototypeClass, %s, %d,
%s,
%s,
%s,
%s,
%s,
%s);""" % (
"&PrototypeClass" if needInterfacePrototypeObject else "ptr::null()",
"Some(%s)" % constructHook if needInterfaceObject else "None",
constructArgs,
domClass,