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

Issue 29582716: Issue 4579 - Ignore runtime.lastError caused by wrapper (Closed)

Created:
Oct. 19, 2017, 1:56 a.m. by Manish Jethani
Modified:
Oct. 20, 2017, 2:11 p.m.
Base URL:
https://hg.adblockplus.org/adblockpluschrome/
Visibility:
Public.

Description

Issue 4579 - Ignore runtime.lastError caused by wrapper

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove unnecessary code #

Total comments: 7

Patch Set 3 : Use Set object for error list #

Patch Set 4 : Add old error message with typo #

Total comments: 2

Patch Set 5 : Use regex #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -1 line) Patch
M polyfill.js View 1 2 3 4 2 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 20
Manish Jethani
Oct. 19, 2017, 1:56 a.m. (2017-10-19 01:56:28 UTC) #1
Manish Jethani
Patch Set 1 Sometimes we have code like this: browser.runtime.sendMessage({type: "composer.ready"}); This causes an error ...
Oct. 19, 2017, 1:59 a.m. (2017-10-19 01:59:46 UTC) #2
Sebastian Noack
I just tested on Firefox, and it seems in order to achieve consistent behavior, the ...
Oct. 19, 2017, 3:30 a.m. (2017-10-19 03:30:49 UTC) #3
Manish Jethani
On 2017/10/19 03:30:49, Sebastian Noack wrote: > I just tested on Firefox, and it seems ...
Oct. 19, 2017, 10:13 a.m. (2017-10-19 10:13:03 UTC) #4
Manish Jethani
Patch Set 2: Remove unnecessary code https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js File polyfill.js (right): https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js#newcode46 polyfill.js:46: // Errors that ...
Oct. 19, 2017, 10:13 a.m. (2017-10-19 10:13:23 UTC) #5
kzar
https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js File polyfill.js (right): https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js#newcode46 polyfill.js:46: // Errors that occur only when we show an ...
Oct. 19, 2017, 10:17 a.m. (2017-10-19 10:17:49 UTC) #6
Manish Jethani
Ollie, can you help me figure out if this is appropriate for Edge? On Chrome ...
Oct. 19, 2017, 10:24 a.m. (2017-10-19 10:24:46 UTC) #7
Manish Jethani
Patch Set 3: Use Set object for error list https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js File polyfill.js (right): https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js#newcode46 polyfill.js:46: ...
Oct. 19, 2017, 10:30 a.m. (2017-10-19 10:30:32 UTC) #8
Sebastian Noack
https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js File polyfill.js (right): https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js#newcode46 polyfill.js:46: // Errors that occur only when we show an ...
Oct. 19, 2017, 6:30 p.m. (2017-10-19 18:30:19 UTC) #9
kzar
https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js File polyfill.js (right): https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js#newcode46 polyfill.js:46: // Errors that occur only when we show an ...
Oct. 19, 2017, 6:37 p.m. (2017-10-19 18:37:40 UTC) #10
Sebastian Noack
https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js File polyfill.js (right): https://codereview.adblockplus.org/29582716/diff/29583557/polyfill.js#newcode46 polyfill.js:46: // Errors that occur only when we show an ...
Oct. 19, 2017, 10:08 p.m. (2017-10-19 22:08:31 UTC) #11
Oleksandr
On 2017/10/19 10:24:46, Manish Jethani wrote: > Ollie, can you help me figure out if ...
Oct. 19, 2017, 10:13 p.m. (2017-10-19 22:13:32 UTC) #12
Manish Jethani
On 2017/10/19 22:13:32, Oleksandr wrote: > On 2017/10/19 10:24:46, Manish Jethani wrote: > > Ollie, ...
Oct. 19, 2017, 11:52 p.m. (2017-10-19 23:52:55 UTC) #13
Manish Jethani
Patch Set 4: Add old error message with typo I tested with Chrome 50, there's ...
Oct. 20, 2017, 1:13 a.m. (2017-10-20 01:13:07 UTC) #14
Manish Jethani
Here's where this is done: https://cs.chromium.org/chromium/src/extensions/renderer/resources/messaging.js?l=439&rcl=a7e11db759a5d16fdd641f79489ae060687572b3 This might be the only error of this kind, ...
Oct. 20, 2017, 1:19 a.m. (2017-10-20 01:19:04 UTC) #15
Sebastian Noack
https://codereview.adblockplus.org/29582716/diff/29583638/polyfill.js File polyfill.js (right): https://codereview.adblockplus.org/29582716/diff/29583638/polyfill.js#newcode53 polyfill.js:53: ]); Perhaps, we can just use a regexp to ...
Oct. 20, 2017, 1:26 a.m. (2017-10-20 01:26:31 UTC) #16
Manish Jethani
Patch Set 5: Rebase, use regex https://codereview.adblockplus.org/29582716/diff/29583638/polyfill.js File polyfill.js (right): https://codereview.adblockplus.org/29582716/diff/29583638/polyfill.js#newcode53 polyfill.js:53: ]); On 2017/10/20 ...
Oct. 20, 2017, 1:45 a.m. (2017-10-20 01:45:33 UTC) #17
Sebastian Noack
LGTM
Oct. 20, 2017, 1:47 a.m. (2017-10-20 01:47:31 UTC) #18
Oleksandr
On 2017/10/19 23:52:55, Manish Jethani wrote: > On 2017/10/19 22:13:32, Oleksandr wrote: > > On ...
Oct. 20, 2017, 8:43 a.m. (2017-10-20 08:43:37 UTC) #19
Manish Jethani
Oct. 20, 2017, 2:11 p.m. (2017-10-20 14:11:49 UTC) #20
Message was sent while issue was closed.
On 2017/10/20 08:43:37, Oleksandr wrote:
> [...]
>
> >{...]
> >
> > The reason I'm asking is that we have to be sure about how it behaves,
> > especially when there's a value message (like "compose.ready") but the
sender
> > just isn't interested in the response.

Sorry, that was a typo, I meant "valid" message. e.g. a message the background
page does listen for and returns true (asynchronous) in its runtime.onMessage
handler, but never sends any response for whatever reason. We may still see an
error like this in that case. But I realize that "composer.ready" is not such a
message.

> I think what I have posted above did just that - sent a message where there is
> no response. But to be sure, I have tried your suggestion and the callback
just
> isn't called, so nothing in console.

Thanks a lot, this really helps.

Let's assume this is how Edge behaves in all cases, and if there are any issues
(there probably will be one or two since this API wrapping is essentially a
hack) we can address them as we discover them.

I have closed this.

Powered by Google App Engine
This is Rietveld