Bug 1232727 - Change variable name on WebConsoleConnectionProxy - owner to webConsoleFrame;r=bgrins

--HG--
extra : commitid : 7ccIfbXY7Yd
This commit is contained in:
Lin Clark 2015-12-17 15:52:42 -08:00
Родитель b01d37029e
Коммит 0eaec6b520
1 изменённых файлов: 31 добавлений и 31 удалений

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

@ -4917,14 +4917,14 @@ CommandController.prototype = {
* and the application we connect to through the remote debug protocol.
*
* @constructor
* @param object webConsole
* The Web Console instance that owns this connection proxy.
* @param object webConsoleFrame
* The WebConsoleFrame object that owns this connection proxy.
* @param RemoteTarget target
* 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._onPageError = this._onPageError.bind(this);
@ -4944,12 +4944,12 @@ function WebConsoleConnectionProxy(webConsole, target)
WebConsoleConnectionProxy.prototype = {
/**
* The owning Web Console instance.
* The owning Web Console Frame instance.
*
* @see WebConsoleFrame
* @type object
*/
owner: null,
webConsoleFrame: null,
/**
* The target that the console connects to.
@ -5052,7 +5052,7 @@ WebConsoleConnectionProxy.prototype = {
this._consoleActor = this.target.form.consoleActor;
if (this.target.isTabActor) {
let tab = this.target.form;
this.owner.onLocationChange(tab.url, tab.title);
this.webConsoleFrame.onLocationChange(tab.url, tab.title);
}
this._attachConsole();
@ -5113,7 +5113,7 @@ WebConsoleConnectionProxy.prototype = {
let msgs = ["PageError", "ConsoleAPI"];
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());
messages.sort((a, b) => a.timeStamp - b.timeStamp);
this.owner.displayCachedMessages(messages);
this.webConsoleFrame.displayCachedMessages(messages);
if (!this._hasNativeConsoleAPI) {
this.owner.logWarningAboutReplacedAPI();
this.webConsoleFrame.logWarningAboutReplacedAPI();
}
this.connected = true;
@ -5163,8 +5163,8 @@ WebConsoleConnectionProxy.prototype = {
*/
_onPageError: function WCCP__onPageError(type, packet)
{
if (this.owner && packet.from == this._consoleActor) {
this.owner.handlePageError(packet.pageError);
if (this.webConsoleFrame && packet.from == this._consoleActor) {
this.webConsoleFrame.handlePageError(packet.pageError);
}
},
@ -5180,8 +5180,8 @@ WebConsoleConnectionProxy.prototype = {
*/
_onLogMessage: function WCCP__onLogMessage(type, packet)
{
if (this.owner && packet.from == this._consoleActor) {
this.owner.handleLogMessage(packet);
if (this.webConsoleFrame && packet.from == this._consoleActor) {
this.webConsoleFrame.handleLogMessage(packet);
}
},
@ -5197,8 +5197,8 @@ WebConsoleConnectionProxy.prototype = {
*/
_onConsoleAPICall: function WCCP__onConsoleAPICall(type, packet)
{
if (this.owner && packet.from == this._consoleActor) {
this.owner.handleConsoleAPICall(packet.message);
if (this.webConsoleFrame && packet.from == this._consoleActor) {
this.webConsoleFrame.handleConsoleAPICall(packet.message);
}
},
@ -5214,8 +5214,8 @@ WebConsoleConnectionProxy.prototype = {
*/
_onNetworkEvent: function(type, networkInfo)
{
if (this.owner) {
this.owner.handleNetworkEvent(networkInfo);
if (this.webConsoleFrame) {
this.webConsoleFrame.handleNetworkEvent(networkInfo);
}
},
@ -5233,8 +5233,8 @@ WebConsoleConnectionProxy.prototype = {
*/
_onNetworkEventUpdate: function(type, { packet, networkInfo })
{
if (this.owner) {
this.owner.handleNetworkEventUpdate(networkInfo, packet);
if (this.webConsoleFrame) {
this.webConsoleFrame.handleNetworkEventUpdate(networkInfo, packet);
}
},
@ -5250,15 +5250,15 @@ WebConsoleConnectionProxy.prototype = {
*/
_onFileActivity: function WCCP__onFileActivity(type, packet)
{
if (this.owner && packet.from == this._consoleActor) {
this.owner.handleFileActivity(packet.uri);
if (this.webConsoleFrame && packet.from == this._consoleActor) {
this.webConsoleFrame.handleFileActivity(packet.uri);
}
},
_onReflowActivity: function WCCP__onReflowActivity(type, packet)
{
if (this.owner && packet.from == this._consoleActor) {
this.owner.handleReflowActivity(packet);
if (this.webConsoleFrame && packet.from == this._consoleActor) {
this.webConsoleFrame.handleReflowActivity(packet);
}
},
@ -5274,8 +5274,8 @@ WebConsoleConnectionProxy.prototype = {
*/
_onServerLogCall: function WCCP__onServerLogCall(type, packet)
{
if (this.owner && packet.from == this._consoleActor) {
this.owner.handleConsoleAPICall(packet.message);
if (this.webConsoleFrame && packet.from == this._consoleActor) {
this.webConsoleFrame.handleConsoleAPICall(packet.message);
}
},
@ -5292,8 +5292,8 @@ WebConsoleConnectionProxy.prototype = {
_onLastPrivateContextExited:
function WCCP__onLastPrivateContextExited(type, packet)
{
if (this.owner && packet.from == this._consoleActor) {
this.owner.jsterm.clearPrivateMessages();
if (this.webConsoleFrame && packet.from == this._consoleActor) {
this.webConsoleFrame.jsterm.clearPrivateMessages();
}
},
@ -5309,11 +5309,11 @@ WebConsoleConnectionProxy.prototype = {
*/
_onTabNavigated: function WCCP__onTabNavigated(event, packet)
{
if (!this.owner) {
if (!this.webConsoleFrame) {
return;
}
this.owner.handleTabNavigated(event, packet);
this.webConsoleFrame.handleTabNavigated(event, packet);
},
/**
@ -5364,7 +5364,7 @@ WebConsoleConnectionProxy.prototype = {
this.webConsoleClient = null;
this.target = null;
this.connected = false;
this.owner = null;
this.webConsoleFrame = null;
this._disconnecter.resolve(null);
return this._disconnecter.promise;