зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1559819 - rename context to thread; r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D32849 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
cc00bf541b
Коммит
4e6d03ada7
|
@ -21,7 +21,7 @@ var WORKER_URL = "code_WorkerTargetActor.attachThread-worker.js";
|
|||
add_task(async function testWhilePaused() {
|
||||
const dbg = await initWorkerDebugger(TAB_URL, WORKER_URL);
|
||||
const { client, tab, workerTargetFront, toolbox } = dbg;
|
||||
const workerThreadFront = await workerTargetFront.getFront("context");
|
||||
const workerThreadFront = await workerTargetFront.getFront("thread");
|
||||
|
||||
// Execute some basic math to make sure evaluations are working.
|
||||
const jsterm = await getSplitConsole(toolbox);
|
||||
|
|
|
@ -39,7 +39,7 @@ const WorkerTargetActor = protocol.ActorClassWithSpec(workerTargetSpec, {
|
|||
const form = {
|
||||
actor: this.actorID,
|
||||
consoleActor: this._consoleActor,
|
||||
contextActor: this._threadActor,
|
||||
threadActor: this._threadActor,
|
||||
id: this._dbg.id,
|
||||
url: this._dbg.url,
|
||||
type: this._dbg.type,
|
||||
|
|
|
@ -413,7 +413,7 @@ async function attachTestTab(client, title) {
|
|||
// thread.
|
||||
async function attachTestThread(client, title, callback = () => {}) {
|
||||
const targetFront = await attachTestTab(client, title);
|
||||
const threadFront = await targetFront.getFront("context");
|
||||
const threadFront = await targetFront.getFront("thread");
|
||||
const onPaused = threadFront.once("paused");
|
||||
await targetFront.attachThread({
|
||||
autoBlackBox: true,
|
||||
|
|
|
@ -102,7 +102,7 @@ function TestTargetActor(connection, global) {
|
|||
this._attached = false;
|
||||
this._extraActors = {};
|
||||
// This is a hack in order to enable threadActor to be accessed from getFront
|
||||
this._extraActors.contextActor = this.threadActor;
|
||||
this._extraActors.threadActor = this.threadActor;
|
||||
this.makeDebugger = makeDebugger.bind(null, {
|
||||
findDebuggees: () => [this._global],
|
||||
shouldAddNewGlobalAsDebuggee: g => {
|
||||
|
|
|
@ -104,7 +104,7 @@ class BrowsingContextTargetFront extends TargetMixin(
|
|||
const response = await super.attach();
|
||||
|
||||
this._threadActor = response.threadActor;
|
||||
this.targetForm.contextActor = this._threadActor;
|
||||
this.targetForm.threadActor = this._threadActor;
|
||||
this.configureOptions.javascriptEnabled = response.javascriptEnabled;
|
||||
this.traits = response.traits || {};
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class ContentProcessTargetFront extends TargetMixin(
|
|||
// Save the full form for Target class usage.
|
||||
// Do not use `form` name to avoid colliding with protocol.js's `form` method
|
||||
this.targetForm = json;
|
||||
this.targetForm.contextActor = json.chromeDebugger;
|
||||
this.targetForm.threadActor = json.chromeDebugger;
|
||||
this._threadActor = json.chromeDebugger;
|
||||
}
|
||||
|
||||
|
|
|
@ -431,12 +431,12 @@ function TargetMixin(parentClass) {
|
|||
);
|
||||
}
|
||||
if (this.getTrait("hasThreadFront")) {
|
||||
this.threadFront = await this.getFront("context");
|
||||
this.threadFront = await this.getFront("thread");
|
||||
} else {
|
||||
// Backwards compat for Firefox 68
|
||||
// mimics behavior of a front
|
||||
this.threadFront = new ThreadClient(this._client, this._threadActor);
|
||||
this.fronts.set("context", this.threadFront);
|
||||
this.fronts.set("thread", this.threadFront);
|
||||
this.threadFront.actorID = this._threadActor;
|
||||
this.manage(this.threadFront);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ class WorkerTargetFront extends TargetMixin(
|
|||
// Set the console actor ID on the form to expose it to Target.attachConsole
|
||||
// Set the ThreadActor on the target form so it is accessible by getFront
|
||||
this.targetForm.consoleActor = connectResponse.consoleActor;
|
||||
this.targetForm.contextActor = connectResponse.threadActor;
|
||||
this.targetForm.threadActor = connectResponse.threadActor;
|
||||
this._threadActor = connectResponse.threadActor;
|
||||
|
||||
return this.attachConsole();
|
||||
|
|
|
@ -47,7 +47,7 @@ class ThreadFront extends FrontClassWithSpec(threadSpec) {
|
|||
this.before("resumed", this._beforeResumed);
|
||||
this.before("detached", this._beforeDetached);
|
||||
// Attribute name from which to retrieve the actorID out of the target actor's form
|
||||
this.formAttributeName = "contextActor";
|
||||
this.formAttributeName = "threadActor";
|
||||
}
|
||||
|
||||
get state() {
|
||||
|
|
|
@ -260,7 +260,7 @@ const Types = (exports.__TypesForTests = [
|
|||
front: "devtools/shared/fronts/targets/worker",
|
||||
},
|
||||
{
|
||||
types: ["context"],
|
||||
types: ["thread"],
|
||||
spec: "devtools/shared/specs/thread",
|
||||
front: "devtools/shared/fronts/thread",
|
||||
},
|
||||
|
|
|
@ -21,7 +21,7 @@ types.addDictType("available-breakpoint-event", {
|
|||
});
|
||||
|
||||
const threadSpec = generateActorSpec({
|
||||
typeName: "context",
|
||||
typeName: "thread",
|
||||
|
||||
events: {
|
||||
paused: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче