mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Rename GetContext to get_context.
This commit is contained in:
parent
bbf1359024
commit
36ce24454c
2 changed files with 6 additions and 6 deletions
|
@ -154,7 +154,7 @@ impl CallSetup {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the `JSContext` used for the call.
|
/// Returns the `JSContext` used for the call.
|
||||||
pub fn GetContext(&self) -> *mut JSContext {
|
pub fn get_context(&self) -> *mut JSContext {
|
||||||
self.cx
|
self.cx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4721,8 +4721,8 @@ class CGCallback(CGClass):
|
||||||
# Record the names of all the arguments, so we can use them when we call
|
# Record the names of all the arguments, so we can use them when we call
|
||||||
# the private method.
|
# the private method.
|
||||||
argnames = [arg.name for arg in args]
|
argnames = [arg.name for arg in args]
|
||||||
argnamesWithThis = ["s.GetContext()", "thisObjJS"] + argnames
|
argnamesWithThis = ["s.get_context()", "thisObjJS"] + argnames
|
||||||
argnamesWithoutThis = ["s.GetContext()", "ptr::null_mut()"] + argnames
|
argnamesWithoutThis = ["s.get_context()", "ptr::null_mut()"] + argnames
|
||||||
# Now that we've recorded the argnames for our call to our private
|
# Now that we've recorded the argnames for our call to our private
|
||||||
# method, insert our optional argument for deciding whether the
|
# method, insert our optional argument for deciding whether the
|
||||||
# CallSetup should re-throw exceptions on aRv.
|
# CallSetup should re-throw exceptions on aRv.
|
||||||
|
@ -4742,13 +4742,13 @@ class CGCallback(CGClass):
|
||||||
argsWithoutThis.insert(0, Argument(None, "self"))
|
argsWithoutThis.insert(0, Argument(None, "self"))
|
||||||
|
|
||||||
setupCall = ("let s = CallSetup::new(self, aExceptionHandling);\n"
|
setupCall = ("let s = CallSetup::new(self, aExceptionHandling);\n"
|
||||||
"if s.GetContext().is_null() {\n"
|
"if s.get_context().is_null() {\n"
|
||||||
" return Err(FailureUnknown);\n"
|
" return Err(FailureUnknown);\n"
|
||||||
"}\n")
|
"}\n")
|
||||||
|
|
||||||
bodyWithThis = string.Template(
|
bodyWithThis = string.Template(
|
||||||
setupCall+
|
setupCall+
|
||||||
"let thisObjJS = wrap_call_this_object(s.GetContext(), thisObj);\n"
|
"let thisObjJS = wrap_call_this_object(s.get_context(), thisObj);\n"
|
||||||
"if thisObjJS.is_null() {\n"
|
"if thisObjJS.is_null() {\n"
|
||||||
" return Err(FailureUnknown);\n"
|
" return Err(FailureUnknown);\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
|
@ -5000,7 +5000,7 @@ class CallbackMember(CGNativeMember):
|
||||||
return ""
|
return ""
|
||||||
return (
|
return (
|
||||||
"CallSetup s(CallbackPreserveColor(), aRv, aExceptionHandling);\n"
|
"CallSetup s(CallbackPreserveColor(), aRv, aExceptionHandling);\n"
|
||||||
"JSContext* cx = s.GetContext();\n"
|
"JSContext* cx = s.get_context();\n"
|
||||||
"if (!cx) {\n"
|
"if (!cx) {\n"
|
||||||
" return Err(FailureUnknown);\n"
|
" return Err(FailureUnknown);\n"
|
||||||
"}\n")
|
"}\n")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue