Auto merge of #24661 - paulrouget:dedupehist, r=asajeffrey

Only updated history once

We get the `HistoryChanged` event twice in many situations. This should fix it.

@cbrewster do these change make sense?

---
<!-- 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 #24633 (GitHub issue number if applicable)

<!-- 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. -->
This commit is contained in:
bors-servo 2019-11-06 05:01:06 -05:00 committed by GitHub
commit a931a80cf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3995,7 +3995,6 @@ where
new_context_info.is_visible, new_context_info.is_visible,
); );
self.update_activity(change.new_pipeline_id); self.update_activity(change.new_pipeline_id);
self.notify_history_changed(change.top_level_browsing_context_id);
}, },
Some(old_pipeline_id) => { Some(old_pipeline_id) => {
if let Some(pipeline) = self.pipelines.get(&old_pipeline_id) { if let Some(pipeline) = self.pipelines.get(&old_pipeline_id) {
@ -4087,8 +4086,6 @@ where
); );
} }
} }
self.notify_history_changed(change.top_level_browsing_context_id);
}, },
} }