зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 7ae6a7b925be for landing with the wrong bug number.
This commit is contained in:
Родитель
73c0f36e2b
Коммит
ea171f0522
|
@ -10,7 +10,6 @@ const { Ci } = require("chrome");
|
|||
const Services = require("Services");
|
||||
const { ActorPool, appendExtraActors, createExtraActors } = require("devtools/server/actors/common");
|
||||
const { DebuggerServer } = require("devtools/server/main");
|
||||
const { dumpProtocolSpec } = require("devtools/server/protocol");
|
||||
|
||||
/* Root actor for the remote debugging protocol. */
|
||||
|
||||
|
@ -294,7 +293,9 @@ RootActor.prototype = {
|
|||
return JSON.parse(JSON.stringify(aRequest));
|
||||
},
|
||||
|
||||
onProtocolDescription: dumpProtocolSpec,
|
||||
onProtocolDescription: function (aRequest) {
|
||||
return protocol.dumpProtocolSpec()
|
||||
},
|
||||
|
||||
/* Support for DebuggerServer.addGlobalActor. */
|
||||
_createExtraActors: createExtraActors,
|
||||
|
|
|
@ -361,23 +361,3 @@ function executeSoon(aFunc) {
|
|||
run: DevToolsUtils.makeInfallible(aFunc)
|
||||
}, Ci.nsIThread.DISPATCH_NORMAL);
|
||||
}
|
||||
|
||||
// Create async version of the object where calling each method
|
||||
// is equivalent of calling it with asyncall. Mainly useful for
|
||||
// destructuring objects with methods that take callbacks.
|
||||
const Async = target => new Proxy(target, Async);
|
||||
Async.get = (target, name) =>
|
||||
typeof(target[name]) === "function" ? asyncall.bind(null, target[name], target) :
|
||||
target[name];
|
||||
|
||||
// Calls async function that takes callback and errorback and returns
|
||||
// returns promise representing result.
|
||||
const asyncall = (fn, self, ...args) =>
|
||||
new Promise((...etc) => fn.call(self, ...args, ...etc));
|
||||
|
||||
const Test = task => () => {
|
||||
add_task(task);
|
||||
run_next_test();
|
||||
};
|
||||
|
||||
const assert = do_check_true;
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
const run_test = Test(function*() {
|
||||
initTestDebuggerServer();
|
||||
const connection = DebuggerServer.connectPipe();
|
||||
const client = Async(new DebuggerClient(connection));
|
||||
|
||||
yield client.connect();
|
||||
|
||||
const response = yield client.request({
|
||||
to: "root",
|
||||
type: "protocolDescription"
|
||||
});
|
||||
|
||||
assert(response.from == "root");
|
||||
assert(typeof(response.types) === "object");
|
||||
|
||||
yield client.close();
|
||||
});
|
|
@ -198,5 +198,3 @@ reason = bug 820380
|
|||
[test_ignore_caught_exceptions.js]
|
||||
[test_requestTypes.js]
|
||||
reason = bug 937197
|
||||
[test_protocolSpec.js]
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче