mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
remove redundant extra scoping
This commit is contained in:
parent
87cc409579
commit
bf70decdd3
1 changed files with 1 additions and 8 deletions
|
@ -2901,7 +2901,7 @@ class CGCollectJSONAttributesMethod(CGAbstractMethod):
|
||||||
for m in interface.members:
|
for m in interface.members:
|
||||||
if m.isAttr() and not m.isStatic() and m.type.isJSONType():
|
if m.isAttr() and not m.isStatic() and m.type.isJSONType():
|
||||||
name = m.identifier.name
|
name = m.identifier.name
|
||||||
getAndDefine = fill(
|
ret += fill(
|
||||||
"""
|
"""
|
||||||
rooted!(in(*cx) let mut temp = UndefinedValue());
|
rooted!(in(*cx) let mut temp = UndefinedValue());
|
||||||
if !get_${name}(cx, obj, this, JSJitGetterCallArgs { _base: temp.handle_mut().into() }) {
|
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))
|
name=name, nameAsArray=str_to_const_array(name))
|
||||||
ret += fill(
|
|
||||||
"""
|
|
||||||
{ // scope for "temp"
|
|
||||||
$*{getAndDefine}
|
|
||||||
}
|
|
||||||
""",
|
|
||||||
getAndDefine=getAndDefine)
|
|
||||||
ret += 'return true;\n'
|
ret += 'return true;\n'
|
||||||
return CGGeneric(ret)
|
return CGGeneric(ret)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue