aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/error.rs
diff options
context:
space:
mode:
authorSamson <16504129+sagudev@users.noreply.github.com>2023-09-11 21:16:54 +0200
committerGitHub <noreply@github.com>2023-09-11 19:16:54 +0000
commitaad2dccc9c9f6b89922c07933cfa7087a8cd1ec4 (patch)
tree68dec1a9d53f4ed564843a9580fba70bf90dbef1 /components/script/dom/bindings/error.rs
parent413da4ca69d3013528c09bbaf38629a72384372d (diff)
downloadservo-aad2dccc9c9f6b89922c07933cfa7087a8cd1ec4.tar.gz
servo-aad2dccc9c9f6b89922c07933cfa7087a8cd1ec4.zip
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting * Reformat all imports
Diffstat (limited to 'components/script/dom/bindings/error.rs')
-rw-r--r--components/script/dom/bindings/error.rs34
1 files changed, 16 insertions, 18 deletions
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs
index 87df14d0544..2e578b4d2f3 100644
--- a/components/script/dom/bindings/error.rs
+++ b/components/script/dom/bindings/error.rs
@@ -4,34 +4,32 @@
//! Utilities to throw exceptions from Rust bindings.
+use std::slice::from_raw_parts;
+
+#[cfg(feature = "js_backtrace")]
+use backtrace::Backtrace;
+use js::error::{throw_range_error, throw_type_error};
+#[cfg(feature = "js_backtrace")]
+use js::jsapi::StackFormat as JSStackFormat;
+use js::jsapi::{
+ ExceptionStackBehavior, JSContext, JS_ClearPendingException, JS_IsExceptionPending,
+};
+use js::jsval::UndefinedValue;
+use js::rust::wrappers::{JS_ErrorFromException, JS_GetPendingException, JS_SetPendingException};
+use js::rust::{HandleObject, HandleValue, MutableHandleValue};
+use libc::c_uint;
+
#[cfg(feature = "js_backtrace")]
use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::PrototypeList::proto_id_to_name;
-use crate::dom::bindings::conversions::root_from_object;
use crate::dom::bindings::conversions::{
- ConversionResult, FromJSValConvertible, ToJSValConvertible,
+ root_from_object, ConversionResult, FromJSValConvertible, ToJSValConvertible,
};
use crate::dom::bindings::str::USVString;
use crate::dom::domexception::{DOMErrorName, DOMException};
use crate::dom::globalscope::GlobalScope;
use crate::realms::InRealm;
use crate::script_runtime::JSContext as SafeJSContext;
-#[cfg(feature = "js_backtrace")]
-use backtrace::Backtrace;
-use js::error::{throw_range_error, throw_type_error};
-use js::jsapi::ExceptionStackBehavior;
-use js::jsapi::JSContext;
-use js::jsapi::JS_ClearPendingException;
-use js::jsapi::JS_IsExceptionPending;
-#[cfg(feature = "js_backtrace")]
-use js::jsapi::StackFormat as JSStackFormat;
-use js::jsval::UndefinedValue;
-use js::rust::wrappers::JS_ErrorFromException;
-use js::rust::wrappers::JS_GetPendingException;
-use js::rust::wrappers::JS_SetPendingException;
-use js::rust::{HandleObject, HandleValue, MutableHandleValue};
-use libc::c_uint;
-use std::slice::from_raw_parts;
#[cfg(feature = "js_backtrace")]
thread_local! {