mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Return Fallible from get_callable_property.
This commit is contained in:
parent
6b886e545d
commit
0607cd3fb5
2 changed files with 7 additions and 9 deletions
|
@ -5304,10 +5304,8 @@ class CallbackOperationBase(CallbackMethod):
|
|||
"methodName": self.methodName
|
||||
}
|
||||
getCallableFromProp = string.Template(
|
||||
'match self.parent.get_callable_property(cx, "${methodName}") {\n'
|
||||
' Err(_) => return Err(JSFailed),\n'
|
||||
' Ok(callable) => callable,\n'
|
||||
'}').substitute(replacements)
|
||||
'try!(self.parent.get_callable_property(cx, "${methodName}"))'
|
||||
).substitute(replacements)
|
||||
if not self.singleOperation:
|
||||
return 'JS::Rooted<JS::Value> callable(cx);\n' + getCallableFromProp
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue