mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Remove most RootedReference uses
We can replace all uses of RootedReference for Option<T> by Option::deref calls.
This commit is contained in:
parent
7bdfad92a5
commit
5fe5e5d6de
34 changed files with 186 additions and 185 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue