Backed out changeset 7ae6a7b925be for landing with the wrong bug number.

This commit is contained in:
Ryan VanderMeulen 2014-05-07 14:18:52 -04:00
Родитель 73c0f36e2b
Коммит ea171f0522
4 изменённых файлов: 3 добавлений и 41 удалений

Просмотреть файл

@ -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]