mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 05:39:41 +02:00
Differential Revision: https://phabricator.services.mozilla.com/D8389 --HG-- extra : moz-landing-system : lando
30 lines
690 B
JavaScript
30 lines
690 B
JavaScript
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
|
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
"use strict";
|
|
|
|
/* global DebuggerServer */
|
|
|
|
/**
|
|
* Test actor designed to check that clients are properly notified of errors when calling
|
|
* methods on old style actors.
|
|
*/
|
|
function ErrorActor(conn, tab) {
|
|
this.conn = conn;
|
|
this.tab = tab;
|
|
}
|
|
|
|
ErrorActor.prototype = {
|
|
actorPrefix: "error",
|
|
|
|
onError: function() {
|
|
throw new Error("error");
|
|
},
|
|
};
|
|
|
|
ErrorActor.prototype.requestTypes = {
|
|
"error": ErrorActor.prototype.onError,
|
|
};
|
|
exports.ErrorActor = ErrorActor;
|