remove redundant extra scoping

This commit is contained in:
Kagami Sascha Rosylight 2019-07-25 12:43:43 +09:00
parent 87cc409579
commit bf70decdd3

View file

@ -2901,7 +2901,7 @@ class CGCollectJSONAttributesMethod(CGAbstractMethod):
for m in interface.members:
if m.isAttr() and not m.isStatic() and m.type.isJSONType():
name = m.identifier.name
getAndDefine = fill(
ret += fill(
"""
rooted!(in(*cx) let mut temp = UndefinedValue());
if !get_${name}(cx, obj, this, JSJitGetterCallArgs { _base: temp.handle_mut().into() }) {
@ -2914,13 +2914,6 @@ class CGCollectJSONAttributesMethod(CGAbstractMethod):
}
""",
name=name, nameAsArray=str_to_const_array(name))
ret += fill(
"""
{ // scope for "temp"
$*{getAndDefine}
}
""",
getAndDefine=getAndDefine)
ret += 'return true;\n'
return CGGeneric(ret)