Bug 986492, part 3 - Address review comments from peterv on part 2. Remove bogus extra semicolons from Codegen.py output. Fix a spelling error.

--HG--
extra : rebase_source : 0230a4f9bef4690d7382e5982670ccad3f607d0b
This commit is contained in:
Jason Orendorff 2014-04-25 11:50:34 -05:00
parent a207f2817f
commit 2059506e0e

View File

@ -3589,7 +3589,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
declType = CGGeneric("JSObject*") declType = CGGeneric("JSObject*")
declArgs = None declArgs = None
templateBody = "${declName} = &${val}.toObject();\n" templateBody = "${declName} = &${val}.toObject();\n"
setToNullCode = "${declName} = nullptr;;\n" # BOGUS extra semicolon setToNullCode = "${declName} = nullptr;\n"
template = wrapObjectTemplate(templateBody, type, setToNullCode, template = wrapObjectTemplate(templateBody, type, setToNullCode,
failureCode) failureCode)
return JSToNativeConversionInfo(template, declType=declType, return JSToNativeConversionInfo(template, declType=declType,
@ -4362,7 +4362,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
if defaultValue is not None: if defaultValue is not None:
if isinstance(defaultValue, IDLNullValue): if isinstance(defaultValue, IDLNullValue):
assert type.nullable() assert type.nullable()
template = handleDefault(template, setNull.rstrip() + ";\n") # BOGUS extra semicolon template = handleDefault(template, setNull)
else: else:
assert(defaultValue.type.tag() == IDLType.Tags.domstring) assert(defaultValue.type.tag() == IDLType.Tags.domstring)
template = handleDefault(template, template = handleDefault(template,
@ -8682,7 +8682,7 @@ class CGResolveOwnPropertyViaNewresolve(CGAbstractBindingMethod):
// underlying object first. That gives it a chance to // underlying object first. That gives it a chance to
// define properties on the actual object as needed, and // define properties on the actual object as needed, and
// then use the fact that it created the objects as a flag // then use the fact that it created the objects as a flag
// o avoid re-resolving the properties if someone deletes // to avoid re-resolving the properties if someone deletes
// them. // them.
JSAutoCompartment ac(cx, obj); JSAutoCompartment ac(cx, obj);
JS::Rooted<JSPropertyDescriptor> objDesc(cx); JS::Rooted<JSPropertyDescriptor> objDesc(cx);