Bug 1434686 part 2. Use IgnoreErrors() in dom/bindings. r=mystor

MozReview-Commit-ID: G8vxR2s2qUJ
This commit is contained in:
Boris Zbarsky 2018-02-01 14:21:14 -05:00
Родитель f7f6285330
Коммит bc7691a8db
1 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -15891,7 +15891,7 @@ class CGCallback(CGClass):
argsWithoutRv.insert(0, Argument("const T&", "thisVal")) argsWithoutRv.insert(0, Argument("const T&", "thisVal"))
argnamesWithoutThisAndRv = [arg.name for arg in argsWithoutThisAndRv] argnamesWithoutThisAndRv = [arg.name for arg in argsWithoutThisAndRv]
argnamesWithoutThisAndRv.insert(rvIndex, "rv"); argnamesWithoutThisAndRv.insert(rvIndex, "IgnoreErrors()");
# If we just leave things like that, and have no actual arguments in the # If we just leave things like that, and have no actual arguments in the
# IDL, we will end up trying to call the templated "without rv" overload # IDL, we will end up trying to call the templated "without rv" overload
# with "rv" as the thisVal. That's no good. So explicitly append the # with "rv" as the thisVal. That's no good. So explicitly append the
@ -15902,7 +15902,7 @@ class CGCallback(CGClass):
argnamesWithoutRv = [arg.name for arg in argsWithoutRv] argnamesWithoutRv = [arg.name for arg in argsWithoutRv]
# Note that we need to insert at rvIndex + 1, since we inserted a # Note that we need to insert at rvIndex + 1, since we inserted a
# thisVal arg at the start. # thisVal arg at the start.
argnamesWithoutRv.insert(rvIndex + 1, "rv") argnamesWithoutRv.insert(rvIndex + 1, "IgnoreErrors()")
errorReturn = method.getDefaultRetval() errorReturn = method.getDefaultRetval()
@ -15946,14 +15946,12 @@ class CGCallback(CGClass):
callArgs=", ".join(argnamesWithoutThis)) callArgs=", ".join(argnamesWithoutThis))
bodyWithThisWithoutRv = fill( bodyWithThisWithoutRv = fill(
""" """
IgnoredErrorResult rv;
return ${methodName}(${callArgs}); return ${methodName}(${callArgs});
""", """,
methodName=method.name, methodName=method.name,
callArgs=", ".join(argnamesWithoutRv)) callArgs=", ".join(argnamesWithoutRv))
bodyWithoutThisAndRv = fill( bodyWithoutThisAndRv = fill(
""" """
IgnoredErrorResult rv;
return ${methodName}(${callArgs}); return ${methodName}(${callArgs});
""", """,
methodName=method.name, methodName=method.name,