From bc7691a8db625418be3ac97f351ef050183be38e Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 1 Feb 2018 14:21:14 -0500 Subject: [PATCH] Bug 1434686 part 2. Use IgnoreErrors() in dom/bindings. r=mystor MozReview-Commit-ID: G8vxR2s2qUJ --- dom/bindings/Codegen.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index 38b4ed348c3f..b13078a7f452 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -15891,7 +15891,7 @@ class CGCallback(CGClass): argsWithoutRv.insert(0, Argument("const T&", "thisVal")) 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 # 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 @@ -15902,7 +15902,7 @@ class CGCallback(CGClass): argnamesWithoutRv = [arg.name for arg in argsWithoutRv] # Note that we need to insert at rvIndex + 1, since we inserted a # thisVal arg at the start. - argnamesWithoutRv.insert(rvIndex + 1, "rv") + argnamesWithoutRv.insert(rvIndex + 1, "IgnoreErrors()") errorReturn = method.getDefaultRetval() @@ -15946,14 +15946,12 @@ class CGCallback(CGClass): callArgs=", ".join(argnamesWithoutThis)) bodyWithThisWithoutRv = fill( """ - IgnoredErrorResult rv; return ${methodName}(${callArgs}); """, methodName=method.name, callArgs=", ".join(argnamesWithoutRv)) bodyWithoutThisAndRv = fill( """ - IgnoredErrorResult rv; return ${methodName}(${callArgs}); """, methodName=method.name,