From 27a234bfc8150a41704a142106356643b62d398c Mon Sep 17 00:00:00 2001 From: Max Li Date: Sun, 12 May 2013 15:18:37 -0400 Subject: [PATCH] Bug 767929 - Use Maybe instead of Optional for the holder object in new DOM binding code. r=bzbarsky --- dom/bindings/Codegen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index 6186db05a54..68bda2f1095 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -3553,8 +3553,8 @@ def instantiateJSToNativeConversion(info, replacements, argcAndIndex=None): originalHolderName = replacements["holderName"] if holderType is not None: if dealWithOptional: - replacements["holderName"] = "%s.Value()" % originalHolderName - holderType = CGTemplatedType("Optional", holderType) + replacements["holderName"] = "%s.ref()" % originalHolderName + holderType = CGTemplatedType("Maybe", holderType) holderCtorArgs = None elif holderArgs is not None: holderCtorArgs = CGWrapper(holderArgs, pre="(", post=")") @@ -3592,7 +3592,7 @@ def instantiateJSToNativeConversion(info, replacements, argcAndIndex=None): declArgs.define() if declArgs else ""))) if holderType is not None: holderConstruct = CGIndenter( - CGGeneric("%s.Construct(%s);" % + CGGeneric("%s.construct(%s);" % (originalHolderName, holderArgs.define() if holderArgs else ""))) else: