Introduce PendingScript

This moves scripts' loading results in Document, instead of maintaining them
behind a DOMRefCell in each HTMLScriptElement.
This commit is contained in:
Anthony Ramine 2017-01-11 14:13:15 +01:00
parent 965370c0bf
commit 30f0553ac7
8 changed files with 193 additions and 82 deletions

View file

@ -11,7 +11,7 @@ use style::thread_state;
///
/// This extends the API of `core::cell::RefCell` to allow unsafe access in
/// certain situations, with dynamic checking in debug builds.
#[derive(Clone, PartialEq, Debug, HeapSizeOf)]
#[derive(Clone, Debug, Default, HeapSizeOf, PartialEq)]
pub struct DOMRefCell<T> {
value: RefCell<T>,
}