1 /* vim: set ts=2 sw=2 sts=2 et tw=80: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 export class TestProcessActorParent extends JSProcessActorParent {
9 this.wrappedJSObject = this;
10 this.sawActorCreated = false;
14 this.sawActorCreated = true;
17 receiveMessage(aMessage) {
18 switch (aMessage.name) {
20 aMessage.data.initial = true;
21 this.sendAsyncMessage("toChild", aMessage.data);
24 aMessage.data.toParent = true;
25 this.sendAsyncMessage("done", aMessage.data);
28 let { a, b } = aMessage.data;
29 return { result: a * b };
36 return "TestProcessActorParent";