Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29355247: Noissue - fix according to coding style (Closed)

Created:
Sept. 29, 2016, 8:46 a.m. by sergei
Modified:
Sept. 29, 2016, 12:46 p.m.
Visibility:
Public.

Description

add 'use strict'; and we don't use Cu.import to import into global scope. #project abpcrawler

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -12 lines) Patch
M lib/commandLine.js View 1 chunk +3 lines, -2 lines 2 comments Download
M lib/crawler.js View 1 chunk +4 lines, -3 lines 2 comments Download
M lib/main.js View 2 chunks +7 lines, -7 lines 3 comments Download

Messages

Total messages: 4
sergei
Should it include something else, like change let to const?
Sept. 29, 2016, 9:56 a.m. (2016-09-29 09:56:39 UTC) #1
Wladimir Palant
On 2016/09/29 09:56:39, sergei wrote: > Should it include something else, like change let to ...
Sept. 29, 2016, 10:35 a.m. (2016-09-29 10:35:45 UTC) #2
Wladimir Palant
https://codereview.adblockplus.org/29355247/diff/29355248/lib/commandLine.js File lib/commandLine.js (right): https://codereview.adblockplus.org/29355247/diff/29355248/lib/commandLine.js#newcode7 lib/commandLine.js:7: 'use strict'; Double quotation marks please (same for the ...
Sept. 29, 2016, 10:36 a.m. (2016-09-29 10:36:10 UTC) #3
sergei
Sept. 29, 2016, 12:46 p.m. (2016-09-29 12:46:17 UTC) #4
I am closing this issue in favor of
-  29355276: Noissue - Remove usage of the deprecated Promises.jsm module.
- 29355271: Noissue - Don't import JavaScript modules into the global scope
(includes removing unused module).
- 29355266: Noissue - Add "use strict" to the JavaScript files.

https://codereview.adblockplus.org/29355247/diff/29355248/lib/commandLine.js
File lib/commandLine.js (right):

https://codereview.adblockplus.org/29355247/diff/29355248/lib/commandLine.js#...
lib/commandLine.js:7: 'use strict';
On 2016/09/29 10:36:10, Wladimir Palant wrote:
> Double quotation marks please (same for the other files).

Done in https://codereview.adblockplus.org/29355266/.

https://codereview.adblockplus.org/29355247/diff/29355248/lib/crawler.js
File lib/crawler.js (right):

https://codereview.adblockplus.org/29355247/diff/29355248/lib/crawler.js#newc...
lib/crawler.js:14: const {Task} = Cu.import("resource://gre/modules/Task.jsm");
On 2016/09/29 10:36:10, Wladimir Palant wrote:
> Please add the second parameter, otherwise it still add variables to global
> scope.

Done in https://codereview.adblockplus.org/29355271/

https://codereview.adblockplus.org/29355247/diff/29355248/lib/main.js
File lib/main.js (right):

https://codereview.adblockplus.org/29355247/diff/29355248/lib/main.js#newcode40
lib/main.js:40: return windowsRestored;
On 2016/09/29 10:36:10, Wladimir Palant wrote:
> This is not how the code should be structured - you should rather move
> everything into the callback:
> 
>   return new Promise((resolve, reject) =>
>   {
>     let observer = ...;
>     addObserver(...);
>     onShutdown.add(...);
>   });
> 
> Also, please don't leave out the reject parameter even though you aren't using
> it.

Done in https://codereview.adblockplus.org/29355271/

Powered by Google App Engine
This is Rietveld