aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-11-18 11:35:25 -0500
committerGitHub <noreply@github.com>2019-11-18 11:35:25 -0500
commit0d2c2045ccdce005eb6fc9235f3e7ca78da0db08 (patch)
tree002fe0bbee15b87c92f6df5af02762580843cb9a /components/script_traits/lib.rs
parent49ec49f637d0c5c39227425b2f29b7366dc90939 (diff)
parenta256f2fccefb0618e36550350224e2b07ebb5337 (diff)
downloadservo-0d2c2045ccdce005eb6fc9235f3e7ca78da0db08.tar.gz
servo-0d2c2045ccdce005eb6fc9235f3e7ca78da0db08.zip
Auto merge of #24664 - gterzian:fix_port_transfer, r=jdm
Fix loophole in messageport transfer <!-- Please describe your changes on the following line: --> --- <!-- 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 #24600 (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_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 1b1a0e80e65..0212ae021b6 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -1042,8 +1042,12 @@ pub struct PortMessageTask {
/// Messages for communication between the constellation and a global managing ports.
#[derive(Debug, Deserialize, Serialize)]
pub enum MessagePortMsg {
- /// Enables a port to catch-up on messages that were sent while the transfer was ongoing.
- CompleteTransfer(MessagePortId, VecDeque<PortMessageTask>),
+ /// Complete the transfer for a batch of ports.
+ CompleteTransfer(HashMap<MessagePortId, VecDeque<PortMessageTask>>),
+ /// Complete the transfer of a single port,
+ /// whose transfer was pending because it had been requested
+ /// while a previous failed transfer was being rolled-back.
+ CompletePendingTransfer(MessagePortId, VecDeque<PortMessageTask>),
/// Remove a port, the entangled one doesn't exists anymore.
RemoveMessagePort(MessagePortId),
/// Handle a new port-message-task.