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

Issue 29573735: Issue 4580 - Replace ext.backgroundPage.sendMessage with runtime.sendMessage (Closed)

Created:
Oct. 11, 2017, 3:37 p.m. by Manish Jethani
Modified:
Oct. 13, 2017, 3:07 a.m.
Base URL:
https://hg.adblockplus.org/adblockplusui/
Visibility:
Public.

Description

Issue 4580 - Replace ext.backgroundPage.sendMessage with runtime.sendMessage Related: https://codereview.adblockplus.org/29573726/

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -64 lines) Patch
M common.js View 2 chunks +2 lines, -2 lines 0 comments Download
M desktop-options.js View 10 chunks +25 lines, -25 lines 0 comments Download
M devtools-panel.js View 2 chunks +2 lines, -2 lines 0 comments Download
M ext/content.js View 1 chunk +29 lines, -23 lines 5 comments Download
M firstRun.js View 3 chunks +3 lines, -3 lines 0 comments Download
M i18n.js View 1 chunk +1 line, -1 line 0 comments Download
M mobile-options.js View 4 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 8
Manish Jethani
Oct. 11, 2017, 3:37 p.m. (2017-10-11 15:37:47 UTC) #1
Manish Jethani
Patch Set 1
Oct. 11, 2017, 3:39 p.m. (2017-10-11 15:39:06 UTC) #2
Manish Jethani
https://codereview.adblockplus.org/29573735/diff/29573736/ext/content.js File ext/content.js (left): https://codereview.adblockplus.org/29573735/diff/29573736/ext/content.js#oldcode32 ext/content.js:32: }, false); Not related but might as well. https://codereview.adblockplus.org/29573735/diff/29573736/ext/content.js ...
Oct. 11, 2017, 3:42 p.m. (2017-10-11 15:42:41 UTC) #3
Thomas Greiner
LGTM https://codereview.adblockplus.org/29573735/diff/29573736/ext/content.js File ext/content.js (right): https://codereview.adblockplus.org/29573735/diff/29573736/ext/content.js#newcode64 ext/content.js:64: if (!("runtime" in chrome)) Suggestion: `chrome` is defined ...
Oct. 11, 2017, 3:58 p.m. (2017-10-11 15:58:16 UTC) #4
Manish Jethani
https://codereview.adblockplus.org/29573735/diff/29573736/ext/content.js File ext/content.js (right): https://codereview.adblockplus.org/29573735/diff/29573736/ext/content.js#newcode64 ext/content.js:64: if (!("runtime" in chrome)) On 2017/10/11 15:58:16, Thomas Greiner ...
Oct. 11, 2017, 4:11 p.m. (2017-10-11 16:11:20 UTC) #5
Thomas Greiner
On 2017/10/11 16:11:20, Manish Jethani wrote: > Is that really necessary? The chrome object is ...
Oct. 11, 2017, 4:46 p.m. (2017-10-11 16:46:40 UTC) #6
Manish Jethani
On 2017/10/11 16:46:40, Thomas Greiner wrote: > On 2017/10/11 16:11:20, Manish Jethani wrote: > > ...
Oct. 11, 2017, 4:57 p.m. (2017-10-11 16:57:58 UTC) #7
Sebastian Noack
Oct. 13, 2017, 3:07 a.m. (2017-10-13 03:07:21 UTC) #8
Message was sent while issue was closed.
On 2017/10/11 16:57:58, Manish Jethani wrote:
> On 2017/10/11 16:46:40, Thomas Greiner wrote:
> > On 2017/10/11 16:11:20, Manish Jethani wrote:
> > > Is that really necessary? The chrome object is used all over the place,
> ESLint
> > > never complains about this, I think because we've turned on that option in
> the
> > > config.
> > 
> > No, not necessary. It was merely a suggestion because I noticed it being
used
> in
> > adblockplusui/common.js.
> 
> Acknowledged.
> 
> Thanks!

env.webextensions is set totrue in eslintrc.json, in order to let ESLint know
that the code is expected to run in a web extension context, where the "browser"
and/or "chrome" objects are globally available:
https://hg.adblockplus.org/adblockplusui/file/71690e7b23cc/.eslintrc.json#l6

Using /* global chrome */ is redundant and doesn't make any sense to me.

Powered by Google App Engine
This is Rietveld