diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-11-22 01:28:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-22 01:28:36 -0500 |
commit | c060f005354f6524e726cccab2bff065bd18cbc1 (patch) | |
tree | 34623065fb3f952c53cb82b16cd706978ea5236d /components/script/script_thread.rs | |
parent | 49f47ea09f33a0ba754ce11efe753ea361e8f404 (diff) | |
parent | a21c0bfd1a6463422f84b52b8781a5d6aee1c4d1 (diff) | |
download | servo-c060f005354f6524e726cccab2bff065bd18cbc1.tar.gz servo-c060f005354f6524e726cccab2bff065bd18cbc1.zip |
Auto merge of #24789 - gterzian:fix_unloading, r=jdm
Fix unloading, active BC, and clearing js runtime
<!-- Please describe your changes on the following line: -->
Do not set the window to be the currently active one for the windowproxy as part of `load`, as it will be done later when the document activity is set. And doing it later means that when unload runs, it is with the unloaded pipeline as the active window.
Only nullify the window proxy if it's not used by another (currently-active) window.
---
<!-- 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 #24591 (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. -->
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 81784d73a6c..a9ebd9eb46c 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -3125,7 +3125,8 @@ impl ScriptThread { opener: Option<BrowsingContextId>, ) -> DomRoot<WindowProxy> { if let Some(window_proxy) = self.window_proxies.borrow().get(&browsing_context_id) { - window_proxy.set_currently_active(&*window); + // Note: we do not set the window to be the currently-active one, + // this will be done instead when the script-thread handles the `SetDocumentActivity` msg. return DomRoot::from_ref(window_proxy); } let iframe = parent_info.and_then(|parent_id| { |