Remove most RootedReference uses

We can replace all uses of RootedReference for Option<T> by Option::deref calls.
This commit is contained in:
Anthony Ramine 2019-03-10 13:20:07 +01:00
parent 7bdfad92a5
commit 5fe5e5d6de
34 changed files with 186 additions and 185 deletions

View file

@ -7250,8 +7250,10 @@ def camel_to_upper_snake(s):
def process_arg(expr, arg):
if arg.type.isGeckoInterface() and not arg.type.unroll().inner.isCallback():
if arg.type.nullable() or arg.type.isSequence() or arg.optional:
if arg.variadic or arg.type.isSequence() or arg.type.nullable() and arg.optional:
expr += ".r()"
elif arg.type.nullable() or arg.optional:
expr += ".deref()"
else:
expr = "&" + expr
elif isinstance(arg.type, IDLPromiseType):