aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_runtime.rs
diff options
context:
space:
mode:
authorPyfisch <pyfisch@gmail.com>2018-11-06 20:38:02 +0100
committerPyfisch <pyfisch@gmail.com>2018-11-06 22:35:07 +0100
commit9e92eb205a2a12fe0be883e42cb7f82deebc9031 (patch)
tree48c1660b942d5dfffb289dc5d4110604caca54fb /components/script/script_runtime.rs
parent4a947dd7195c3ece1e4996a6bdf7c300bf6ec655 (diff)
downloadservo-9e92eb205a2a12fe0be883e42cb7f82deebc9031.tar.gz
servo-9e92eb205a2a12fe0be883e42cb7f82deebc9031.zip
Reorder imports
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r--components/script/script_runtime.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index 2625bb4d3ce..8647c48d1ce 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -9,12 +9,12 @@ use crate::dom::bindings::codegen::Bindings::PromiseBinding::PromiseJobCallback;
use crate::dom::bindings::conversions::get_dom_class;
use crate::dom::bindings::conversions::private_from_object;
use crate::dom::bindings::inheritance::Castable;
-use crate::dom::bindings::refcounted::{LiveDOMReferences, trace_refcounted_objects};
+use crate::dom::bindings::refcounted::{trace_refcounted_objects, LiveDOMReferences};
use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
use crate::dom::bindings::reflector::DomObject;
use crate::dom::bindings::root::trace_roots;
use crate::dom::bindings::settings_stack;
-use crate::dom::bindings::trace::{JSTraceable, trace_traceables};
+use crate::dom::bindings::trace::{trace_traceables, JSTraceable};
use crate::dom::bindings::utils::DOM_CALLBACKS;
use crate::dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
use crate::dom::eventtarget::EventTarget;
@@ -27,19 +27,21 @@ use crate::task::TaskBox;
use crate::task_source::{TaskSource, TaskSourceName};
use js::glue::CollectServoSizes;
use js::glue::SetBuildId;
+use js::jsapi::ContextOptionsRef;
use js::jsapi::{BuildIdCharVector, DisableIncrementalGC, GCDescription, GCProgress};
-use js::jsapi::{Heap, HandleObject};
+use js::jsapi::{HandleObject, Heap};
use js::jsapi::{JSContext, JSTracer, SetDOMCallbacks, SetGCSliceCallback};
use js::jsapi::{JSGCInvocationKind, JSGCStatus, JS_AddExtraGCRootsTracer, JS_SetGCCallback};
use js::jsapi::{JSGCMode, JSGCParamKey, JS_SetGCParameter, JS_SetGlobalJitCompilerOption};
-use js::jsapi::{JSJitCompilerOption, JS_SetOffthreadIonCompilationEnabled, JS_SetParallelParsingEnabled};
+use js::jsapi::{
+ JSJitCompilerOption, JS_SetOffthreadIonCompilationEnabled, JS_SetParallelParsingEnabled,
+};
use js::jsapi::{JSObject, PromiseRejectionHandlingState, SetPreserveWrapperCallback};
use js::jsapi::{SetBuildIdOp, SetEnqueuePromiseJobCallback, SetPromiseRejectionTrackerCallback};
-use js::jsapi::ContextOptionsRef;
use js::panic::wrap_panic;
+use js::rust::wrappers::{GetPromiseIsHandled, GetPromiseResult};
use js::rust::Handle;
use js::rust::Runtime as RustRuntime;
-use js::rust::wrappers::{GetPromiseIsHandled, GetPromiseResult};
use malloc_size_of::MallocSizeOfOps;
use msg::constellation_msg::PipelineId;
use profile_traits::mem::{Report, ReportKind, ReportsChan};
@@ -47,14 +49,14 @@ use servo_config::opts;
use servo_config::prefs::PREFS;
use std::cell::Cell;
use std::fmt;
-use std::io::{Write, stdout};
+use std::io::{stdout, Write};
use std::ops::Deref;
use std::os;
use std::os::raw::c_void;
use std::panic::AssertUnwindSafe;
use std::ptr;
use style::thread_state::{self, ThreadState};
-use time::{Tm, now};
+use time::{now, Tm};
/// Common messages used to control the event loops in both the script and the worker
pub enum CommonScriptMsg {
@@ -688,7 +690,7 @@ unsafe extern "C" fn servo_build_id(build_id: *mut BuildIdCharVector) -> bool {
#[allow(unsafe_code)]
#[cfg(feature = "debugmozjs")]
unsafe fn set_gc_zeal_options(cx: *mut JSContext) {
- use js::jsapi::{JS_DEFAULT_ZEAL_FREQ, JS_SetGCZeal};
+ use js::jsapi::{JS_SetGCZeal, JS_DEFAULT_ZEAL_FREQ};
let level = match PREFS.get("js.mem.gc.zeal.level").as_i64() {
Some(level @ 0...14) => level as u8,