PMessagePort.ipdl (1207B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 include protocol PBackground; 6 7 include DOMTypes; 8 include ProtocolTypes; 9 10 namespace mozilla { 11 namespace dom { 12 13 // This protocol is used for the MessageChannel/MessagePort API 14 [ManualDealloc] 15 protocol PMessagePort 16 { 17 manager PBackground; 18 19 /* Many of these methods are used just for the shutdown sequence. The 20 correct sequence for the child actor is: 21 1. SendStopSendingData(); 22 2. RecvStopSendingDataConfirmed(); 23 3. SendClose(); 24 4. Recv__delete__(); */ 25 26 /* When the port is transferred the sequence is: 27 1. SendStopSendingData(); 28 2. RecvStopSendingDataConfirmed(); 29 3. SendDisentangle(); 30 4. Recv__delete__(); */ 31 32 parent: 33 async PostMessages(MessageData[] messages); 34 async Disentangle(MessageData[] messages); 35 async StopSendingData(); 36 async Close(); 37 38 child: 39 async Entangled(MessageData[] messages); 40 async ReceiveData(MessageData[] messages); 41 async StopSendingDataConfirmed(); 42 43 async __delete__(); 44 }; 45 46 } // namespace dom 47 } // namespace mozilla