fune/devtools/server/tests/mochitest/hello-actor.js
Fabien Casters 7b53fcdbb6 Bug 1325988 - Fix ESLint issues in devtools/server/tests/mochitest/ r=tromey
MozReview-Commit-ID: BFaOv5i5Tun

--HG--
extra : rebase_source : 5c2b5d1867eb5b48c56725b87d71dae72a83eb34
2017-03-13 21:15:44 +01:00

28 lines
625 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/* exported HelloActor */
"use strict";
const protocol = require("devtools/shared/protocol");
const helloSpec = protocol.generateActorSpec({
typeName: "helloActor",
methods: {
count: {
request: {},
response: {count: protocol.RetVal("number")}
}
}
});
var HelloActor = protocol.ActorClassWithSpec(helloSpec, {
initialize: function () {
protocol.Actor.prototype.initialize.apply(this, arguments);
this.counter = 0;
},
count: function () {
return ++this.counter;
}
});