diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-01-29 21:13:15 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-01-29 21:13:15 +0100 |
commit | 36ce24454c2f51a6e84630e42141d75b21e259e2 (patch) | |
tree | 1a0963b32d4869973c8c8410ca46db83e8710033 | |
parent | bbf13590243866f1ca57a56ebd4be1d9bf04a56f (diff) | |
download | servo-36ce24454c2f51a6e84630e42141d75b21e259e2.tar.gz servo-36ce24454c2f51a6e84630e42141d75b21e259e2.zip |
Rename GetContext to get_context.
-rw-r--r-- | components/script/dom/bindings/callback.rs | 2 | ||||
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/bindings/callback.rs b/components/script/dom/bindings/callback.rs index 7d4cdc56802..24bdc815509 100644 --- a/components/script/dom/bindings/callback.rs +++ b/components/script/dom/bindings/callback.rs @@ -154,7 +154,7 @@ impl CallSetup { } /// Returns the `JSContext` used for the call. - pub fn GetContext(&self) -> *mut JSContext { + pub fn get_context(&self) -> *mut JSContext { self.cx } } diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 48b147c4ebe..257ab3b1675 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -4721,8 +4721,8 @@ class CGCallback(CGClass): # Record the names of all the arguments, so we can use them when we call # the private method. argnames = [arg.name for arg in args] - argnamesWithThis = ["s.GetContext()", "thisObjJS"] + argnames - argnamesWithoutThis = ["s.GetContext()", "ptr::null_mut()"] + argnames + argnamesWithThis = ["s.get_context()", "thisObjJS"] + argnames + argnamesWithoutThis = ["s.get_context()", "ptr::null_mut()"] + argnames # Now that we've recorded the argnames for our call to our private # method, insert our optional argument for deciding whether the # CallSetup should re-throw exceptions on aRv. @@ -4742,13 +4742,13 @@ class CGCallback(CGClass): argsWithoutThis.insert(0, Argument(None, "self")) 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" "}\n") bodyWithThis = string.Template( 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" " return Err(FailureUnknown);\n" "}\n" @@ -5000,7 +5000,7 @@ class CallbackMember(CGNativeMember): return "" return ( "CallSetup s(CallbackPreserveColor(), aRv, aExceptionHandling);\n" - "JSContext* cx = s.GetContext();\n" + "JSContext* cx = s.get_context();\n" "if (!cx) {\n" " return Err(FailureUnknown);\n" "}\n") |