diff options
Diffstat (limited to 'components/script_bindings')
-rw-r--r-- | components/script_bindings/constant.rs | 2 | ||||
-rw-r--r-- | components/script_bindings/conversions.rs | 10 | ||||
-rw-r--r-- | components/script_bindings/inheritance.rs | 2 | ||||
-rw-r--r-- | components/script_bindings/weakref.rs | 7 |
4 files changed, 10 insertions, 11 deletions
diff --git a/components/script_bindings/constant.rs b/components/script_bindings/constant.rs index 810c302fa8c..3e1be708b4f 100644 --- a/components/script_bindings/constant.rs +++ b/components/script_bindings/constant.rs @@ -9,8 +9,8 @@ use std::ffi::CStr; use js::jsapi::{JSPROP_ENUMERATE, JSPROP_PERMANENT, JSPROP_READONLY}; use js::jsval::{BooleanValue, DoubleValue, Int32Value, JSVal, NullValue, UInt32Value}; use js::rooted; -use js::rust::wrappers::JS_DefineProperty; use js::rust::HandleObject; +use js::rust::wrappers::JS_DefineProperty; use crate::script_runtime::JSContext; diff --git a/components/script_bindings/conversions.rs b/components/script_bindings/conversions.rs index 43754a61ab9..98998e170da 100644 --- a/components/script_bindings/conversions.rs +++ b/components/script_bindings/conversions.rs @@ -5,7 +5,7 @@ use std::{ptr, slice}; use js::conversions::{ - latin1_to_string, ConversionResult, FromJSValConvertible, ToJSValConvertible, + ConversionResult, FromJSValConvertible, ToJSValConvertible, latin1_to_string, }; use js::error::throw_type_error; use js::glue::{ @@ -13,13 +13,13 @@ use js::glue::{ JS_GetReservedSlot, UnwrapObjectDynamic, }; use js::jsapi::{ - JSContext, JSObject, JSString, JS_DeprecatedStringHasLatin1Chars, - JS_GetLatin1StringCharsAndLength, JS_GetTwoByteStringCharsAndLength, JS_NewStringCopyN, + JS_DeprecatedStringHasLatin1Chars, JS_GetLatin1StringCharsAndLength, + JS_GetTwoByteStringCharsAndLength, JS_NewStringCopyN, JSContext, JSObject, JSString, }; use js::jsval::{ObjectValue, StringValue, UndefinedValue}; use js::rust::{ - get_object_class, is_dom_class, is_dom_object, maybe_wrap_value, HandleValue, - MutableHandleValue, ToString, + HandleValue, MutableHandleValue, ToString, get_object_class, is_dom_class, is_dom_object, + maybe_wrap_value, }; use crate::inheritance::Castable; diff --git a/components/script_bindings/inheritance.rs b/components/script_bindings/inheritance.rs index d0ede1a42aa..5ddbf072215 100644 --- a/components/script_bindings/inheritance.rs +++ b/components/script_bindings/inheritance.rs @@ -6,7 +6,7 @@ use std::mem; -use crate::conversions::{get_dom_class, DerivedFrom, IDLInterface}; +use crate::conversions::{DerivedFrom, IDLInterface, get_dom_class}; use crate::reflector::DomObject; use crate::script_runtime::runtime_is_alive; diff --git a/components/script_bindings/weakref.rs b/components/script_bindings/weakref.rs index 9288ef5e589..38f4f709997 100644 --- a/components/script_bindings/weakref.rs +++ b/components/script_bindings/weakref.rs @@ -16,14 +16,14 @@ use std::ops::Drop; use std::{mem, ptr}; use js::glue::JS_GetReservedSlot; -use js::jsapi::{JSTracer, JS_SetReservedSlot}; +use js::jsapi::{JS_SetReservedSlot, JSTracer}; use js::jsval::{PrivateValue, UndefinedValue}; use libc::c_void; use malloc_size_of::{MallocSizeOf, MallocSizeOfOps}; +use crate::JSTraceable; use crate::reflector::DomObject; use crate::root::DomRoot; -use crate::JSTraceable; /// The index of the slot wherein a pointer to the weak holder cell is /// stored for weak-referenceable bindings. We use slot 1 for holding it, @@ -70,8 +70,7 @@ pub trait WeakReferenceable: DomObject + Sized { let new_count = box_.count.get() + 1; trace!( "Incrementing WeakBox refcount for {:p} to {}.", - self, - new_count + self, new_count ); box_.count.set(new_count); WeakRef { |