Skip to content

Commit

Permalink
Rename ScriptContext to ClassicContext
Browse files Browse the repository at this point in the history
  • Loading branch information
CYBAI committed Sep 6, 2019
1 parent 47d8c57 commit 608c44f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/script/dom/htmlscriptelement.rs
Expand Up @@ -158,7 +158,7 @@ impl ClassicScript {
pub type ScriptResult = Result<ClassicScript, NetworkError>;

/// The context required for asynchronously loading an external script source.
struct ScriptContext {
struct ClassicContext {
/// The element that initiated the request.
elem: Trusted<HTMLScriptElement>,
/// The kind of external script.
Expand All @@ -178,7 +178,7 @@ struct ScriptContext {
resource_timing: ResourceFetchTiming,
}

impl FetchResponseListener for ScriptContext {
impl FetchResponseListener for ClassicContext {
fn process_request_body(&mut self) {} // TODO(KiChjang): Perhaps add custom steps to perform fetch here?

fn process_request_eof(&mut self) {} // TODO(KiChjang): Perhaps add custom steps to perform fetch here?
Expand Down Expand Up @@ -265,7 +265,7 @@ impl FetchResponseListener for ScriptContext {
}
}

impl ResourceTimingListener for ScriptContext {
impl ResourceTimingListener for ClassicContext {
fn resource_timing_information(&self) -> (InitiatorType, ServoUrl) {
let initiator_type = InitiatorType::LocalName(
self.elem
Expand All @@ -282,7 +282,7 @@ impl ResourceTimingListener for ScriptContext {
}
}

impl PreInvoke for ScriptContext {}
impl PreInvoke for ClassicContext {}

/// <https://html.spec.whatwg.org/multipage/#fetch-a-classic-script>
fn fetch_a_classic_script(
Expand Down Expand Up @@ -318,7 +318,7 @@ fn fetch_a_classic_script(

// TODO: Step 3, Add custom steps to perform fetch

let context = Arc::new(Mutex::new(ScriptContext {
let context = Arc::new(Mutex::new(ClassicContext {
elem: Trusted::new(script),
kind: kind,
character_encoding: character_encoding,
Expand Down

0 comments on commit 608c44f

Please sign in to comment.