mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Rename GetCallableProperty to get_callable_property.
This commit is contained in:
parent
dac0190b6d
commit
cfbe464428
2 changed files with 3 additions and 2 deletions
|
@ -95,7 +95,8 @@ impl CallbackInterface {
|
||||||
/// Returns the property with the given `name`, if it is a callable object,
|
/// Returns the property with the given `name`, if it is a callable object,
|
||||||
/// or `Err(())` otherwise. If it returns `Err(())`, a JSAPI exception is
|
/// or `Err(())` otherwise. If it returns `Err(())`, a JSAPI exception is
|
||||||
/// pending.
|
/// pending.
|
||||||
pub fn GetCallableProperty(&self, cx: *mut JSContext, name: &str) -> Result<JSVal, ()> {
|
pub fn get_callable_property(&self, cx: *mut JSContext, name: &str)
|
||||||
|
-> Result<JSVal, ()> {
|
||||||
let mut callable = UndefinedValue();
|
let mut callable = UndefinedValue();
|
||||||
unsafe {
|
unsafe {
|
||||||
let name = CString::from_slice(name.as_bytes());
|
let name = CString::from_slice(name.as_bytes());
|
||||||
|
|
|
@ -5083,7 +5083,7 @@ class CallbackOperationBase(CallbackMethod):
|
||||||
"methodName": self.methodName
|
"methodName": self.methodName
|
||||||
}
|
}
|
||||||
getCallableFromProp = string.Template(
|
getCallableFromProp = string.Template(
|
||||||
'match self.parent.GetCallableProperty(cx, "${methodName}") {\n'
|
'match self.parent.get_callable_property(cx, "${methodName}") {\n'
|
||||||
' Err(_) => return Err(FailureUnknown),\n'
|
' Err(_) => return Err(FailureUnknown),\n'
|
||||||
' Ok(callable) => callable,\n'
|
' Ok(callable) => callable,\n'
|
||||||
'}').substitute(replacements)
|
'}').substitute(replacements)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue