Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Review fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcav committed Mar 30, 2015
1 parent 9bc57c3 commit a6618d7
Show file tree
Hide file tree
Showing 25 changed files with 265 additions and 166 deletions.
7 changes: 3 additions & 4 deletions Makefile
Expand Up @@ -127,10 +127,9 @@ endef

.PHONY: test-deps
test-deps: node_modules
-mkdir -p test-logs
-rm logic-inspector/test-logs
-ln -s '../test-logs' logic-inspector/test-logs
-cd logic-inspector; make; cd ..
-mkdir -p logic-inspector/test-logs
-ln -s logic-inspector/test-logs
-cd logic-inspector; make

# If our package.json has been updated, run npm install
node_modules: package.json
Expand Down
3 changes: 1 addition & 2 deletions js/activesync/account.js
Expand Up @@ -238,7 +238,7 @@ ActiveSyncAccount.prototype = {
_attachLoggerToConnection: function(conn) {
logic.defineScope(conn, 'ActiveSyncConnection',
{ connectionId: logic.uniqueId() });
if (logic.isCensored()) {
if (logic.isCensored) {
conn.onmessage = this._onmessage_dangerous.bind(this, conn);
} else {
conn.onmessage = this._onmessage_safe.bind(this, conn);
Expand Down Expand Up @@ -370,7 +370,6 @@ ActiveSyncAccount.prototype = {
},

shutdown: function asa_shutdown(callback) {
logic(this, 'die');
if (callback)
callback();
},
Expand Down
1 change: 0 additions & 1 deletion js/activesync/folder.js
Expand Up @@ -1482,7 +1482,6 @@ ActiveSyncFolderSyncer.prototype = {

shutdown: function() {
this.folderConn.shutdown();
logic(this, 'die');
}
};

Expand Down
4 changes: 2 additions & 2 deletions js/ext/axeshim-browserbox.js
Expand Up @@ -4,7 +4,7 @@
*/
define(function(require) {
var logic = require('logic');
var scope = logic.scope('Browserbox');
var scope = logic.scope('BrowserBox');

return {
/**
Expand All @@ -19,7 +19,7 @@ define(function(require) {
* logging slightly.
*/
debug: function(ignoredTag, msg) {
if (logic.isCensored()) {
if (!logic.isCensored) {
logic(scope, 'debug', { msg: msg });
}
},
Expand Down
2 changes: 1 addition & 1 deletion js/ext/axeshim-smtpclient.js
Expand Up @@ -9,7 +9,7 @@ define(function(require) {
return {
// see axeshim-browserbox's comment about '.debug'
debug: function(ignoredTag, msg) {
if (logic.isCensored()) {
if (!logic.isCensored) {
logic(scope, 'debug', { msg: msg });
}
},
Expand Down
2 changes: 1 addition & 1 deletion js/ext/browserbox.js
Expand Up @@ -2132,4 +2132,4 @@
}

return BrowserBox;
}));
}));
2 changes: 1 addition & 1 deletion js/ext/mailbuild.js
Expand Up @@ -727,4 +727,4 @@
};

return MimeNode;
}));
}));
2 changes: 1 addition & 1 deletion js/ext/mimefuncs.js
Expand Up @@ -1174,4 +1174,4 @@
}

return mimefuncs;
}));
}));
9 changes: 5 additions & 4 deletions js/imap/account.js
Expand Up @@ -673,6 +673,8 @@ var properties = {
folderPubsByPath[folderPub.path] = folderPub;
}

var syncScope = logic.scope('ImapFolderSync');

// - walk the boxes
function walkBoxes(boxLevel, pathDepth, parentId) {
boxLevel.forEach(function(box) {
Expand Down Expand Up @@ -703,7 +705,7 @@ var properties = {
meta.name = box.name;
meta.delim = delim;

logic(self, 'folder-sync:existing', {
logic(syncScope, 'folder-sync:existing', {
type: type,
name: box.name,
path: path,
Expand All @@ -715,7 +717,7 @@ var properties = {
}
// - new to us!
else {
logic(self, 'folder-sync:add', {
logic(syncScope, 'folder-sync:add', {
type: type,
name: box.name,
path: path,
Expand Down Expand Up @@ -743,7 +745,7 @@ var properties = {
// Never delete our localdrafts or outbox folder.
if ($mailslice.FolderStorage.isTypeLocalOnly(folderPub.type))
continue;
logic(self, 'delete-dead-folder', {
logic(syncScope, 'delete-dead-folder', {
folderType: folderPub.type,
folderId: folderPub.id
});
Expand Down Expand Up @@ -893,7 +895,6 @@ var properties = {
}
}

logic(this, 'die');
if (!liveConns && callback)
callback();
},
Expand Down
2 changes: 0 additions & 2 deletions js/imap/folder.js
Expand Up @@ -1016,7 +1016,6 @@ ImapFolderConn.prototype = {
},

shutdown: function() {
logic(this, 'die');
},
};

Expand Down Expand Up @@ -1514,7 +1513,6 @@ console.log("folder message count", folderMessageCount,

shutdown: function() {
this.folderConn.shutdown();
logic(this, 'die');
},
};

Expand Down

0 comments on commit a6618d7

Please sign in to comment.