mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Assign to 'this' immediately in CGAbstractBindingMethod.
This makes the generated code a bit more rustic.
This commit is contained in:
parent
a6a06e0ffc
commit
de8f123b1d
1 changed files with 1 additions and 2 deletions
|
@ -2502,8 +2502,7 @@ class CGAbstractBindingMethod(CGAbstractExternMethod):
|
||||||
" return false as JSBool;\n"
|
" return false as JSBool;\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"\n"
|
"\n"
|
||||||
"let this: JS<%s>;\n"
|
"let this: JS<%s> = %s;\n" % (self.descriptor.concreteType, unwrapThis)))
|
||||||
"this = %s;\n" % (self.descriptor.concreteType, unwrapThis)))
|
|
||||||
return CGList([ unwrapThis, self.generate_code() ], "\n").define()
|
return CGList([ unwrapThis, self.generate_code() ], "\n").define()
|
||||||
|
|
||||||
def generate_code(self):
|
def generate_code(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue