mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Auto merge of #11480 - rafaqtro:local_b, r=emilio
rename <!-- Please describe your changes on the following line: --> rename of page_fetch_complete and handle_page_fetch_complete for page_headers_available and handle_page_headers_available . --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #11418 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11480) <!-- Reviewable:end -->
This commit is contained in:
commit
5d86b9b2ae
2 changed files with 8 additions and 8 deletions
|
@ -94,7 +94,7 @@ impl AsyncResponseListener for ParserContext {
|
||||||
Err(_) => None,
|
Err(_) => None,
|
||||||
};
|
};
|
||||||
let content_type = metadata.clone().and_then(|meta| meta.content_type);
|
let content_type = metadata.clone().and_then(|meta| meta.content_type);
|
||||||
let parser = match ScriptThread::page_fetch_complete(&self.id,
|
let parser = match ScriptThread::page_headers_available(&self.id,
|
||||||
self.subpage.as_ref(),
|
self.subpage.as_ref(),
|
||||||
metadata) {
|
metadata) {
|
||||||
Some(parser) => parser,
|
Some(parser) => parser,
|
||||||
|
|
|
@ -479,11 +479,11 @@ pub unsafe extern "C" fn shadow_check_callback(_cx: *mut JSContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ScriptThread {
|
impl ScriptThread {
|
||||||
pub fn page_fetch_complete(id: &PipelineId, subpage: Option<&SubpageId>, metadata: Option<Metadata>)
|
pub fn page_headers_available(id: &PipelineId, subpage: Option<&SubpageId>, metadata: Option<Metadata>)
|
||||||
-> Option<ParserRoot> {
|
-> Option<ParserRoot> {
|
||||||
SCRIPT_THREAD_ROOT.with(|root| {
|
SCRIPT_THREAD_ROOT.with(|root| {
|
||||||
let script_thread = unsafe { &*root.borrow().unwrap() };
|
let script_thread = unsafe { &*root.borrow().unwrap() };
|
||||||
script_thread.handle_page_fetch_complete(id, subpage, metadata)
|
script_thread.handle_page_headers_available(id, subpage, metadata)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1322,7 +1322,7 @@ impl ScriptThread {
|
||||||
|
|
||||||
/// We have received notification that the response associated with a load has completed.
|
/// We have received notification that the response associated with a load has completed.
|
||||||
/// Kick off the document and frame tree creation process using the result.
|
/// Kick off the document and frame tree creation process using the result.
|
||||||
fn handle_page_fetch_complete(&self, id: &PipelineId, subpage: Option<&SubpageId>,
|
fn handle_page_headers_available(&self, id: &PipelineId, subpage: Option<&SubpageId>,
|
||||||
metadata: Option<Metadata>) -> Option<ParserRoot> {
|
metadata: Option<Metadata>) -> Option<ParserRoot> {
|
||||||
let idx = self.incomplete_loads.borrow().iter().position(|load| {
|
let idx = self.incomplete_loads.borrow().iter().position(|load| {
|
||||||
load.pipeline_id == *id && load.parent_info.as_ref().map(|info| &info.1) == subpage
|
load.pipeline_id == *id && load.parent_info.as_ref().map(|info| &info.1) == subpage
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue