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

Issue 29338491: Issue 3823 - Split up message responder code (Closed)

Created:
March 17, 2016, 2:04 p.m. by Sebastian Noack
Modified:
March 23, 2016, 1:33 p.m.
Reviewers:
kzar, Wladimir Palant
Visibility:
Public.

Description

Issue 3823 - Split up message responder code

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebased #

Total comments: 11

Patch Set 3 : Don't check for instance of Promise, avoid creating unnecessary arays #

Patch Set 4 : Implement getPort() #

Total comments: 8

Patch Set 5 : Implement Port.disconnect() #

Patch Set 6 : Use require() inline #

Patch Set 7 : Moved get-domain-enabled-state to whitelisting module #

Unified diffs Side-by-side diffs Delta from patch set Stats (+324 lines, -199 lines) Patch
M background.js View 1 2 3 4 5 6 3 chunks +73 lines, -154 lines 0 comments Download
M chrome/devtools.js View 1 chunk +13 lines, -7 lines 0 comments Download
M include.preload.js View 1 2 chunks +2 lines, -2 lines 0 comments Download
M lib/devtools.js View 3 chunks +11 lines, -1 line 0 comments Download
M lib/filterComposer.js View 3 chunks +60 lines, -20 lines 0 comments Download
A lib/messaging.js View 1 2 3 4 1 chunk +141 lines, -0 lines 0 comments Download
M lib/whitelisting.js View 1 2 3 4 5 6 4 chunks +13 lines, -0 lines 0 comments Download
M metadata.common View 1 chunk +1 line, -0 lines 0 comments Download
M popup.js View 1 2 3 4 5 4 chunks +9 lines, -14 lines 0 comments Download
M safari/include.youtube.js View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 20
Sebastian Noack
March 17, 2016, 2:04 p.m. (2016-03-17 14:04:39 UTC) #1
kzar
A lot of these changes seem to be unrelated renaming of event messages, are they ...
March 18, 2016, 3:04 p.m. (2016-03-18 15:04:07 UTC) #2
Sebastian Noack
Besides the renamed messages I'm not sure which supposedly unrelated changes you mean? As for ...
March 18, 2016, 3:08 p.m. (2016-03-18 15:08:57 UTC) #3
kzar
I think the new port API is really cool, looks much friendlier to use. I ...
March 18, 2016, 3:22 p.m. (2016-03-18 15:22:11 UTC) #4
Sebastian Noack
https://codereview.adblockplus.org/29338491/diff/29338492/lib/filterComposer.js File lib/filterComposer.js (left): https://codereview.adblockplus.org/29338491/diff/29338492/lib/filterComposer.js#oldcode69 lib/filterComposer.js:69: /** On 2016/03/18 15:22:10, kzar wrote: > Any reason ...
March 18, 2016, 3:26 p.m. (2016-03-18 15:26:22 UTC) #5
kzar
Otherwise LGTM https://codereview.adblockplus.org/29338491/diff/29338492/lib/filterComposer.js File lib/filterComposer.js (left): https://codereview.adblockplus.org/29338491/diff/29338492/lib/filterComposer.js#oldcode69 lib/filterComposer.js:69: /** On 2016/03/18 15:26:21, Sebastian Noack wrote: ...
March 18, 2016, 3:52 p.m. (2016-03-18 15:52:40 UTC) #6
Sebastian Noack
Rebased and moved changes related to renaming composer (aka "Block element") message types to https://codereview.adblockplus.org/29338503/ ...
March 19, 2016, 7:45 p.m. (2016-03-19 19:45:22 UTC) #7
kzar
LGTM (Sorry I didn't mean to slow things down by asking if Wladimir could double ...
March 20, 2016, 2:39 p.m. (2016-03-20 14:39:08 UTC) #8
Wladimir Palant
https://codereview.adblockplus.org/29338491/diff/29338742/lib/messaging.js File lib/messaging.js (right): https://codereview.adblockplus.org/29338491/diff/29338742/lib/messaging.js#newcode43 lib/messaging.js:43: if (response instanceof Promise) This is a bad idea. ...
March 21, 2016, 11:59 a.m. (2016-03-21 11:59:41 UTC) #9
Sebastian Noack
https://codereview.adblockplus.org/29338491/diff/29338742/lib/messaging.js File lib/messaging.js (right): https://codereview.adblockplus.org/29338491/diff/29338742/lib/messaging.js#newcode43 lib/messaging.js:43: if (response instanceof Promise) On 2016/03/21 11:59:40, Wladimir Palant ...
March 21, 2016, 1:26 p.m. (2016-03-21 13:26:03 UTC) #10
Wladimir Palant
https://codereview.adblockplus.org/29338491/diff/29338742/lib/messaging.js File lib/messaging.js (right): https://codereview.adblockplus.org/29338491/diff/29338742/lib/messaging.js#newcode84 lib/messaging.js:84: this._callbacks[name].push(callback); On 2016/03/21 13:26:02, Sebastian Noack wrote: > Actually, ...
March 21, 2016, 1:58 p.m. (2016-03-21 13:58:01 UTC) #11
Sebastian Noack
https://codereview.adblockplus.org/29338491/diff/29338742/popup.js File popup.js (right): https://codereview.adblockplus.org/29338491/diff/29338742/popup.js#newcode83 popup.js:83: port.off("composer.ready", onComposerReady); On 2016/03/21 13:58:01, Wladimir Palant wrote: > ...
March 21, 2016, 3:26 p.m. (2016-03-21 15:26:59 UTC) #12
Wladimir Palant
https://codereview.adblockplus.org/29338491/diff/29338828/background.js File background.js (right): https://codereview.adblockplus.org/29338491/diff/29338828/background.js#newcode43 background.js:43: var port = require("messaging").port; Arguably, this should use getPort() ...
March 21, 2016, 3:50 p.m. (2016-03-21 15:50:13 UTC) #13
Sebastian Noack
https://codereview.adblockplus.org/29338491/diff/29338828/background.js File background.js (right): https://codereview.adblockplus.org/29338491/diff/29338828/background.js#newcode43 background.js:43: var port = require("messaging").port; On 2016/03/21 15:50:12, Wladimir Palant ...
March 21, 2016, 5:15 p.m. (2016-03-21 17:15:42 UTC) #14
Wladimir Palant
https://codereview.adblockplus.org/29338491/diff/29338828/popup.js File popup.js (right): https://codereview.adblockplus.org/29338491/diff/29338828/popup.js#newcode26 popup.js:26: var getPort = require("messaging").getPort; On 2016/03/21 17:15:42, Sebastian Noack ...
March 21, 2016, 6:05 p.m. (2016-03-21 18:05:22 UTC) #15
Sebastian Noack
https://codereview.adblockplus.org/29338491/diff/29338828/popup.js File popup.js (right): https://codereview.adblockplus.org/29338491/diff/29338828/popup.js#newcode26 popup.js:26: var getPort = require("messaging").getPort; On 2016/03/21 18:05:22, Wladimir Palant ...
March 21, 2016, 7:54 p.m. (2016-03-21 19:54:13 UTC) #16
Wladimir Palant
I cannot say that I am happy with the current state, in particular port/getPort isn't ...
March 21, 2016, 8:46 p.m. (2016-03-21 20:46:57 UTC) #17
kzar
LGTM
March 21, 2016, 9:09 p.m. (2016-03-21 21:09:25 UTC) #18
Sebastian Noack
I also move get-domain-enabled-state out of background.js into the whitelisting module, and adapted the message ...
March 22, 2016, 8:25 a.m. (2016-03-22 08:25:47 UTC) #19
kzar
March 22, 2016, 1:41 p.m. (2016-03-22 13:41:47 UTC) #20
LGTM double plus

Powered by Google App Engine
This is Rietveld