зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1485671 - Expose and use TabClient.logInPage instead of sending request manually. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D6272 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0f4ffbd8c2
Коммит
036563e90b
|
@ -723,14 +723,7 @@ TabTarget.prototype = {
|
|||
logErrorInPage: function(text, category) {
|
||||
if (this.activeTab && this.activeTab.traits.logInPage) {
|
||||
const errorFlag = 0;
|
||||
const packet = {
|
||||
to: this.form.actor,
|
||||
type: "logInPage",
|
||||
flags: errorFlag,
|
||||
text,
|
||||
category,
|
||||
};
|
||||
this.client.request(packet);
|
||||
this.activeTab.logInPage(text, category, errorFlag);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -745,14 +738,7 @@ TabTarget.prototype = {
|
|||
logWarningInPage: function(text, category) {
|
||||
if (this.activeTab && this.activeTab.traits.logInPage) {
|
||||
const warningFlag = 1;
|
||||
const packet = {
|
||||
to: this.form.actor,
|
||||
type: "logInPage",
|
||||
flags: warningFlag,
|
||||
text,
|
||||
category,
|
||||
};
|
||||
this.client.request(packet);
|
||||
this.activeTab.logInPage(text, category, warningFlag);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -140,6 +140,13 @@ TabClient.prototype = {
|
|||
attachWorker: function(workerTargetActor) {
|
||||
return this.client.attachWorker(workerTargetActor);
|
||||
},
|
||||
|
||||
logInPage: DebuggerClient.requester({
|
||||
type: "logInPage",
|
||||
text: arg(0),
|
||||
category: arg(1),
|
||||
flags: arg(2),
|
||||
}),
|
||||
};
|
||||
|
||||
eventSource(TabClient.prototype);
|
||||
|
|
Загрузка…
Ссылка в новой задаче