Skip to content

Commit

Permalink
Fix descriptor argument in CGCallGenerator.__init__
Browse files Browse the repository at this point in the history
It's a descriptor, not a descriptor provider.
  • Loading branch information
nox committed Sep 7, 2016
1 parent 7a942b1 commit 8ba0cf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/script/dom/bindings/codegen/CodegenRust.py
Expand Up @@ -3045,15 +3045,15 @@ class CGCallGenerator(CGThing):
exception from the native code, or None if no error reporting is needed.
"""
def __init__(self, errorResult, arguments, argsPre, returnType,
extendedAttributes, descriptorProvider, nativeMethodName,
extendedAttributes, descriptor, nativeMethodName,
static, object="this"):
CGThing.__init__(self)

assert errorResult is None or isinstance(errorResult, str)

isFallible = errorResult is not None

result = getRetvalDeclarationForType(returnType, descriptorProvider)
result = getRetvalDeclarationForType(returnType, descriptor)
if isFallible:
result = CGWrapper(result, pre="Result<", post=", Error>")

Expand All @@ -3074,7 +3074,7 @@ def __init__(self, errorResult, arguments, argsPre, returnType,

call = CGGeneric(nativeMethodName)
if static:
call = CGWrapper(call, pre="%s::" % descriptorProvider.interface.identifier.name)
call = CGWrapper(call, pre="%s::" % descriptor.interface.identifier.name)
else:
call = CGWrapper(call, pre="%s." % object)
call = CGList([call, CGWrapper(args, pre="(", post=")")])
Expand Down

0 comments on commit 8ba0cf3

Please sign in to comment.