aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-09-27 12:37:27 -0400
committerGitHub <noreply@github.com>2019-09-27 12:37:27 -0400
commit75c201f78e8bb5dc9a9722380b17461924d94ee6 (patch)
tree933b9aee37721658681cd1af36ed5d9837414148 /components/script/dom/htmliframeelement.rs
parent44ee9159ca826ecb9d59590d2b077728810b1a68 (diff)
parent45ec250b0a989643865880734ff898de4b15bd7d (diff)
downloadservo-75c201f78e8bb5dc9a9722380b17461924d94ee6.tar.gz
servo-75c201f78e8bb5dc9a9722380b17461924d94ee6.zip
Auto merge of #24143 - gterzian:improve_spec_comp_bc_discarding, r=asajeffrey
Improve spec compliance of discarding BCs <!-- Please describe your changes on the following line: --> Came-up at https://github.com/servo/servo/pull/23637#issuecomment-528254988 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24143) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index a3a246c4edc..f5a820458c2 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -668,15 +668,14 @@ impl VirtualMethods for HTMLIFrameElement {
// so we need to discard the browsing contexts now, rather than
// when the `PipelineExit` message arrives.
for exited_pipeline_id in exited_pipeline_ids {
+ // https://html.spec.whatwg.org/multipage/#a-browsing-context-is-discarded
if let Some(exited_document) = ScriptThread::find_document(exited_pipeline_id) {
debug!(
"Discarding browsing context for pipeline {}",
exited_pipeline_id
);
- exited_document
- .window()
- .window_proxy()
- .discard_browsing_context();
+ let exited_window = exited_document.window();
+ exited_window.discard_browsing_context();
for exited_iframe in exited_document.iter_iframes() {
debug!("Discarding nested browsing context");
exited_iframe.destroy_nested_browsing_context();