Bug 1466128 part 1 - Rename ac.rs to ar.rs. r=jdm
authorJan de Mooij <jdemooij@mozilla.com>
Tue, 14 Aug 2018 14:24:22 +0200
changeset 432797 d814396399b3dc90603e72b01d4c610228ec299e
parent 432796 3de16fbc247bc1ca28ec12a776e468630407ea9e
child 432798 9cf35b96d52478037f6b0da91a6df7f8476b736e
push id106870
push userjandemooij@gmail.com
push dateWed, 22 Aug 2018 11:27:06 +0000
treeherdermozilla-inbound@9cf35b96d524 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs1466128
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1466128 part 1 - Rename ac.rs to ar.rs. r=jdm Differential Revision: https://phabricator.services.mozilla.com/D3324
js/rust/src/ac.rs
js/rust/src/ar.rs
js/rust/src/lib.rs
js/rust/src/rust.rs
js/rust/tests/callback.rs
js/rust/tests/panic.rs
js/rust/tests/rooting.rs
js/rust/tests/runtime.rs
js/rust/tests/typedarray.rs
js/rust/tests/vec_conversion.rs
rename from js/rust/src/ac.rs
rename to js/rust/src/ar.rs
--- a/js/rust/src/lib.rs
+++ b/js/rust/src/lib.rs
@@ -18,17 +18,17 @@ extern crate libc;
 extern crate log;
 #[allow(unused_extern_crates)]
 extern crate mozjs_sys;
 extern crate num_traits;
 
 #[macro_use]
 pub mod rust;
 
-pub mod ac;
+pub mod ar;
 pub mod conversions;
 pub mod error;
 pub mod glue;
 pub mod heap;
 pub mod jsval;
 pub mod panic;
 pub mod sc;
 pub mod typedarray;
--- a/js/rust/src/rust.rs
+++ b/js/rust/src/rust.rs
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! Rust wrappers around the raw JS apis
 
-use ac::AutoCompartment;
+use ar::AutoCompartment;
 use libc::c_uint;
 use std::cell::{Cell, UnsafeCell};
 use std::char;
 use std::ffi;
 use std::ptr;
 use std::slice;
 use std::mem;
 use std::u32;
--- a/js/rust/tests/callback.rs
+++ b/js/rust/tests/callback.rs
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #[macro_use]
 extern crate js;
 extern crate libc;
 
-use js::ac::AutoCompartment;
+use js::ar::AutoCompartment;
 use js::jsapi::root::JS::CallArgs;
 use js::jsapi::root::JS::RealmOptions;
 use js::jsapi::root::JSContext;
 use js::jsapi::root::JS_DefineFunction;
 use js::jsapi::root::JS_EncodeStringToUTF8;
 use js::jsapi::root::JS_NewGlobalObject;
 use js::jsapi::root::JS_ReportErrorASCII;
 use js::jsapi::root::JS::OnNewGlobalHookOption;
--- a/js/rust/tests/panic.rs
+++ b/js/rust/tests/panic.rs
@@ -20,17 +20,17 @@ fn panic() {
     let h_option = JS::OnNewGlobalHookOption::FireOnNewGlobalHook;
     let c_option = JS::RealmOptions::default();
 
     unsafe {
         let global = JS_NewGlobalObject(context, &SIMPLE_GLOBAL_CLASS,
                                         ptr::null_mut(), h_option, &c_option);
         rooted!(in(context) let global_root = global);
         let global = global_root.handle();
-        let _ac = js::ac::AutoCompartment::with_obj(context, global.get());
+        let _ac = js::ar::AutoCompartment::with_obj(context, global.get());
         let function = JS_DefineFunction(context, global,
                                          b"test\0".as_ptr() as *const _,
                                          Some(test), 0, 0);
         assert!(!function.is_null());
         rooted!(in(context) let mut rval = UndefinedValue());
         let _ = runtime.evaluate_script(global, "test();", "test.js", 0,
                                         rval.handle_mut());
     }
--- a/js/rust/tests/rooting.rs
+++ b/js/rust/tests/rooting.rs
@@ -24,17 +24,17 @@ fn rooting() {
         let h_option = JS::OnNewGlobalHookOption::FireOnNewGlobalHook;
         let c_option = JS::RealmOptions::default();
 
         rooted!(in(cx) let global = JS_NewGlobalObject(cx,
                                                        &SIMPLE_GLOBAL_CLASS,
                                                        ptr::null_mut(),
                                                        h_option,
                                                        &c_option));
-        let _ac = js::ac::AutoCompartment::with_obj(cx, global.get());
+        let _ac = js::ar::AutoCompartment::with_obj(cx, global.get());
         rooted!(in(cx) let prototype_proto = JS::GetRealmObjectPrototype(cx));
         rooted!(in(cx) let proto = JS_NewObjectWithUniqueType(cx,
                                                               &CLASS as *const _,
                                                               prototype_proto.handle()));
         define_methods(cx, proto.handle(), &METHODS[..]).unwrap();
     }
 }
 
--- a/js/rust/tests/runtime.rs
+++ b/js/rust/tests/runtime.rs
@@ -19,17 +19,17 @@ fn runtime() {
         let h_option = JS::OnNewGlobalHookOption::FireOnNewGlobalHook;
         let c_option = JS::RealmOptions::default();
 
         rooted!(in(cx) let global = JS_NewGlobalObject(cx,
                                                        &SIMPLE_GLOBAL_CLASS,
                                                        ptr::null_mut(),
                                                        h_option,
                                                        &c_option));
-        let _ac = js::ac::AutoCompartment::with_obj(cx, global.get());
+        let _ac = js::ar::AutoCompartment::with_obj(cx, global.get());
         rooted!(in(cx) let _object = JS_NewObject(cx, &CLASS as *const _));
     }
 
     assert!(Runtime::new(false).is_err());
 }
 
 unsafe extern fn finalize(_fop: *mut JSFreeOp, _object: *mut JSObject) {
     assert!(!Runtime::get().is_null());
--- a/js/rust/tests/typedarray.rs
+++ b/js/rust/tests/typedarray.rs
@@ -19,17 +19,17 @@ fn typedarray() {
 
     unsafe {
         rooted!(in(cx) let global =
             JS_NewGlobalObject(cx, &SIMPLE_GLOBAL_CLASS, ptr::null_mut(),
                                JS::OnNewGlobalHookOption::FireOnNewGlobalHook,
                                &JS::RealmOptions::default())
         );
 
-        let _ac = js::ac::AutoCompartment::with_obj(cx, global.get());
+        let _ac = js::ar::AutoCompartment::with_obj(cx, global.get());
 
         rooted!(in(cx) let mut rval = UndefinedValue());
         assert!(rt.evaluate_script(global.handle(), "new Uint8Array([0, 2, 4])",
                                    "test", 1, rval.handle_mut()).is_ok());
         assert!(rval.is_object());
 
         typedarray!(in(cx) let array: Uint8Array = rval.to_object());
         assert_eq!(array.unwrap().as_slice(), &[0, 2, 4][..]);
@@ -77,15 +77,15 @@ fn typedarray_update_panic() {
 
     unsafe {
         rooted!(in(cx) let global =
             JS_NewGlobalObject(cx, &SIMPLE_GLOBAL_CLASS, ptr::null_mut(),
                                JS::OnNewGlobalHookOption::FireOnNewGlobalHook,
                                &JS::RealmOptions::default())
         );
 
-        let _ac = js::ac::AutoCompartment::with_obj(cx, global.get());
+        let _ac = js::ar::AutoCompartment::with_obj(cx, global.get());
         rooted!(in(cx) let mut rval = ptr::null_mut());
         let _ = Uint32Array::create(cx, CreateWith::Slice(&[1, 2, 3, 4, 5]), rval.handle_mut());
         typedarray!(in(cx) let mut array: Uint32Array = rval.get());
         array.as_mut().unwrap().update(&[0, 2, 4, 6, 8, 10]);
     }
 }
--- a/js/rust/tests/vec_conversion.rs
+++ b/js/rust/tests/vec_conversion.rs
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #[macro_use]
 extern crate js;
 
-use js::ac::AutoCompartment;
+use js::ar::AutoCompartment;
 use js::conversions::ConversionBehavior;
 use js::conversions::ConversionResult;
 use js::conversions::FromJSValConvertible;
 use js::conversions::ToJSValConvertible;
 use js::jsapi::root::JS::RealmOptions;
 use js::jsapi::root::JS::InitRealmStandardClasses;
 use js::jsapi::root::JS_NewGlobalObject;
 use js::jsapi::root::JS::OnNewGlobalHookOption;