Simplify CallSetup.

This commit is contained in:
Ms2ger 2017-01-05 13:55:10 +01:00
parent 143dfc879e
commit 8d633fec42
2 changed files with 14 additions and 21 deletions

View file

@ -6270,11 +6270,7 @@ class CGCallback(CGClass):
args.insert(0, Argument(None, "&self"))
argsWithoutThis.insert(0, Argument(None, "&self"))
setupCall = ("let mut s_ec = RootedObject::new_unrooted(ptr::null_mut());\n"
"let s = CallSetup::new(&mut s_ec, self, aExceptionHandling);\n"
"if s.get_context().is_null() {\n"
" return Err(JSFailed);\n"
"}\n")
setupCall = "let s = CallSetup::new(self, aExceptionHandling);\n"
bodyWithThis = string.Template(
setupCall +