зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1232727 - Change variable name on WebConsoleConnectionProxy - owner to webConsoleFrame;r=bgrins
--HG-- extra : commitid : 7ccIfbXY7Yd
This commit is contained in:
Родитель
b01d37029e
Коммит
0eaec6b520
|
@ -4917,14 +4917,14 @@ CommandController.prototype = {
|
||||||
* and the application we connect to through the remote debug protocol.
|
* and the application we connect to through the remote debug protocol.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param object webConsole
|
* @param object webConsoleFrame
|
||||||
* The Web Console instance that owns this connection proxy.
|
* The WebConsoleFrame object that owns this connection proxy.
|
||||||
* @param RemoteTarget target
|
* @param RemoteTarget target
|
||||||
* The target that the console will connect to.
|
* The target that the console will connect to.
|
||||||
*/
|
*/
|
||||||
function WebConsoleConnectionProxy(webConsole, target)
|
function WebConsoleConnectionProxy(webConsoleFrame, target)
|
||||||
{
|
{
|
||||||
this.owner = webConsole;
|
this.webConsoleFrame = webConsoleFrame;
|
||||||
this.target = target;
|
this.target = target;
|
||||||
|
|
||||||
this._onPageError = this._onPageError.bind(this);
|
this._onPageError = this._onPageError.bind(this);
|
||||||
|
@ -4944,12 +4944,12 @@ function WebConsoleConnectionProxy(webConsole, target)
|
||||||
|
|
||||||
WebConsoleConnectionProxy.prototype = {
|
WebConsoleConnectionProxy.prototype = {
|
||||||
/**
|
/**
|
||||||
* The owning Web Console instance.
|
* The owning Web Console Frame instance.
|
||||||
*
|
*
|
||||||
* @see WebConsoleFrame
|
* @see WebConsoleFrame
|
||||||
* @type object
|
* @type object
|
||||||
*/
|
*/
|
||||||
owner: null,
|
webConsoleFrame: null,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The target that the console connects to.
|
* The target that the console connects to.
|
||||||
|
@ -5052,7 +5052,7 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
this._consoleActor = this.target.form.consoleActor;
|
this._consoleActor = this.target.form.consoleActor;
|
||||||
if (this.target.isTabActor) {
|
if (this.target.isTabActor) {
|
||||||
let tab = this.target.form;
|
let tab = this.target.form;
|
||||||
this.owner.onLocationChange(tab.url, tab.title);
|
this.webConsoleFrame.onLocationChange(tab.url, tab.title);
|
||||||
}
|
}
|
||||||
this._attachConsole();
|
this._attachConsole();
|
||||||
|
|
||||||
|
@ -5113,7 +5113,7 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
let msgs = ["PageError", "ConsoleAPI"];
|
let msgs = ["PageError", "ConsoleAPI"];
|
||||||
this.webConsoleClient.getCachedMessages(msgs, this._onCachedMessages);
|
this.webConsoleClient.getCachedMessages(msgs, this._onCachedMessages);
|
||||||
|
|
||||||
this.owner._onUpdateListeners();
|
this.webConsoleFrame._onUpdateListeners();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5141,10 +5141,10 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
let messages = response.messages.concat(...this.webConsoleClient.getNetworkEvents());
|
let messages = response.messages.concat(...this.webConsoleClient.getNetworkEvents());
|
||||||
messages.sort((a, b) => a.timeStamp - b.timeStamp);
|
messages.sort((a, b) => a.timeStamp - b.timeStamp);
|
||||||
|
|
||||||
this.owner.displayCachedMessages(messages);
|
this.webConsoleFrame.displayCachedMessages(messages);
|
||||||
|
|
||||||
if (!this._hasNativeConsoleAPI) {
|
if (!this._hasNativeConsoleAPI) {
|
||||||
this.owner.logWarningAboutReplacedAPI();
|
this.webConsoleFrame.logWarningAboutReplacedAPI();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.connected = true;
|
this.connected = true;
|
||||||
|
@ -5163,8 +5163,8 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
*/
|
*/
|
||||||
_onPageError: function WCCP__onPageError(type, packet)
|
_onPageError: function WCCP__onPageError(type, packet)
|
||||||
{
|
{
|
||||||
if (this.owner && packet.from == this._consoleActor) {
|
if (this.webConsoleFrame && packet.from == this._consoleActor) {
|
||||||
this.owner.handlePageError(packet.pageError);
|
this.webConsoleFrame.handlePageError(packet.pageError);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -5180,8 +5180,8 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
*/
|
*/
|
||||||
_onLogMessage: function WCCP__onLogMessage(type, packet)
|
_onLogMessage: function WCCP__onLogMessage(type, packet)
|
||||||
{
|
{
|
||||||
if (this.owner && packet.from == this._consoleActor) {
|
if (this.webConsoleFrame && packet.from == this._consoleActor) {
|
||||||
this.owner.handleLogMessage(packet);
|
this.webConsoleFrame.handleLogMessage(packet);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -5197,8 +5197,8 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
*/
|
*/
|
||||||
_onConsoleAPICall: function WCCP__onConsoleAPICall(type, packet)
|
_onConsoleAPICall: function WCCP__onConsoleAPICall(type, packet)
|
||||||
{
|
{
|
||||||
if (this.owner && packet.from == this._consoleActor) {
|
if (this.webConsoleFrame && packet.from == this._consoleActor) {
|
||||||
this.owner.handleConsoleAPICall(packet.message);
|
this.webConsoleFrame.handleConsoleAPICall(packet.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -5214,8 +5214,8 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
*/
|
*/
|
||||||
_onNetworkEvent: function(type, networkInfo)
|
_onNetworkEvent: function(type, networkInfo)
|
||||||
{
|
{
|
||||||
if (this.owner) {
|
if (this.webConsoleFrame) {
|
||||||
this.owner.handleNetworkEvent(networkInfo);
|
this.webConsoleFrame.handleNetworkEvent(networkInfo);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -5233,8 +5233,8 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
*/
|
*/
|
||||||
_onNetworkEventUpdate: function(type, { packet, networkInfo })
|
_onNetworkEventUpdate: function(type, { packet, networkInfo })
|
||||||
{
|
{
|
||||||
if (this.owner) {
|
if (this.webConsoleFrame) {
|
||||||
this.owner.handleNetworkEventUpdate(networkInfo, packet);
|
this.webConsoleFrame.handleNetworkEventUpdate(networkInfo, packet);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -5250,15 +5250,15 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
*/
|
*/
|
||||||
_onFileActivity: function WCCP__onFileActivity(type, packet)
|
_onFileActivity: function WCCP__onFileActivity(type, packet)
|
||||||
{
|
{
|
||||||
if (this.owner && packet.from == this._consoleActor) {
|
if (this.webConsoleFrame && packet.from == this._consoleActor) {
|
||||||
this.owner.handleFileActivity(packet.uri);
|
this.webConsoleFrame.handleFileActivity(packet.uri);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onReflowActivity: function WCCP__onReflowActivity(type, packet)
|
_onReflowActivity: function WCCP__onReflowActivity(type, packet)
|
||||||
{
|
{
|
||||||
if (this.owner && packet.from == this._consoleActor) {
|
if (this.webConsoleFrame && packet.from == this._consoleActor) {
|
||||||
this.owner.handleReflowActivity(packet);
|
this.webConsoleFrame.handleReflowActivity(packet);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -5274,8 +5274,8 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
*/
|
*/
|
||||||
_onServerLogCall: function WCCP__onServerLogCall(type, packet)
|
_onServerLogCall: function WCCP__onServerLogCall(type, packet)
|
||||||
{
|
{
|
||||||
if (this.owner && packet.from == this._consoleActor) {
|
if (this.webConsoleFrame && packet.from == this._consoleActor) {
|
||||||
this.owner.handleConsoleAPICall(packet.message);
|
this.webConsoleFrame.handleConsoleAPICall(packet.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -5292,8 +5292,8 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
_onLastPrivateContextExited:
|
_onLastPrivateContextExited:
|
||||||
function WCCP__onLastPrivateContextExited(type, packet)
|
function WCCP__onLastPrivateContextExited(type, packet)
|
||||||
{
|
{
|
||||||
if (this.owner && packet.from == this._consoleActor) {
|
if (this.webConsoleFrame && packet.from == this._consoleActor) {
|
||||||
this.owner.jsterm.clearPrivateMessages();
|
this.webConsoleFrame.jsterm.clearPrivateMessages();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -5309,11 +5309,11 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
*/
|
*/
|
||||||
_onTabNavigated: function WCCP__onTabNavigated(event, packet)
|
_onTabNavigated: function WCCP__onTabNavigated(event, packet)
|
||||||
{
|
{
|
||||||
if (!this.owner) {
|
if (!this.webConsoleFrame) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.owner.handleTabNavigated(event, packet);
|
this.webConsoleFrame.handleTabNavigated(event, packet);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5364,7 +5364,7 @@ WebConsoleConnectionProxy.prototype = {
|
||||||
this.webConsoleClient = null;
|
this.webConsoleClient = null;
|
||||||
this.target = null;
|
this.target = null;
|
||||||
this.connected = false;
|
this.connected = false;
|
||||||
this.owner = null;
|
this.webConsoleFrame = null;
|
||||||
this._disconnecter.resolve(null);
|
this._disconnecter.resolve(null);
|
||||||
|
|
||||||
return this._disconnecter.promise;
|
return this._disconnecter.promise;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче