Permalink
Browse files

Resolves conflict between instance variable and function instance name

  • Loading branch information...
1 parent 15713e3 commit b992355f77cb207bd369dd4891d899bddc7dddc5 @c4milo committed May 3, 2012
Showing with 11 additions and 9 deletions.
  1. +5 −3 lib/console.js
  2. +2 −2 lib/inspector.js
  3. +2 −2 lib/page.js
  4. +2 −2 lib/profiler.js
View
@@ -1,15 +1,16 @@
function ConsoleAgent() {
- this.enable = false;
+ this._enable = false;
this.messages = [];
+ this.console = console;
}
(function() {
this.enable = function(params, sendResult) {
- sendResult({result: this.enable});
+ sendResult({result: this._enable});
};
this.disable = function(params, sendResult) {
- this.enable = false;
+ this._enable = false;
sendResult({});
};
@@ -25,6 +26,7 @@ function ConsoleAgent() {
this.addInspectedHeapObject = function(params, sendResult) {
sendResult({});
};
+
}).call(ConsoleAgent.prototype);
module.exports = new ConsoleAgent();
View
@@ -1,10 +1,10 @@
function InspectorAgent() {
- this.enable = false;
+ this._enable = false;
}
(function() {
this.enable = function(params, sendResult) {
- sendResult({result: this.enable});
+ sendResult({result: this._enable});
};
}).call(InspectorAgent.prototype);
View
@@ -1,10 +1,10 @@
function PageAgent() {
- this.enable = false;
+ this._enable = false;
}
(function() {
this.enable = function(params, sendResult) {
- sendResult({result: this.enable});
+ sendResult({result: this._enable});
};
this.canOverrideDeviceMetrics = function(params, sendResult) {
View
@@ -10,13 +10,13 @@ function ProfilerAgent() {
CPU: {}
};
- this.enable = false;
+ this._enable = false;
this.isProfilingCPU = false;
}
(function(){
this.enable = function(params, sendResult) {
- sendResult({result: this.enable});
+ sendResult({result: this._enable});
};
this.causesRecompilation = function(params, sendResult) {

0 comments on commit b992355

Please sign in to comment.