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

Issue 30013555: Issue 7294 - Pass necessary functions to strip-fetch-query-parameter (Closed)

Created:
Feb. 21, 2019, 8:13 a.m. by Manish Jethani
Modified:
Feb. 21, 2019, 12:46 p.m.
Reviewers:
a.giammarchi
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

We forgot to pass `toRegExp` and `regexEscape` to the injector.

Patch Set 1 #

Total comments: 5

Patch Set 2 : Simplify #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M lib/content/snippets.js View 1 1 chunk +5 lines, -2 lines 2 comments Download

Messages

Total messages: 13
Manish Jethani
Feb. 21, 2019, 8:13 a.m. (2019-02-21 08:13:11 UTC) #1
Manish Jethani
Patch Set 1 https://codereview.adblockplus.org/30013555/diff/30013556/lib/content/snippets.js File lib/content/snippets.js (right): https://codereview.adblockplus.org/30013555/diff/30013556/lib/content/snippets.js#newcode864 lib/content/snippets.js:864: if (typeof fetch_ != "function") Being ...
Feb. 21, 2019, 8:15 a.m. (2019-02-21 08:15:43 UTC) #2
a.giammarchi
One change is OK, but the other one is a bit useless and doesn't really ...
Feb. 21, 2019, 8:27 a.m. (2019-02-21 08:27:35 UTC) #3
a.giammarchi
like any other global function *
Feb. 21, 2019, 8:28 a.m. (2019-02-21 08:28:18 UTC) #4
Manish Jethani
https://codereview.adblockplus.org/30013555/diff/30013556/lib/content/snippets.js File lib/content/snippets.js (right): https://codereview.adblockplus.org/30013555/diff/30013556/lib/content/snippets.js#newcode879 lib/content/snippets.js:879: return (() => {}).apply.call(fetch_, this, args); On 2019/02/21 08:27:35, ...
Feb. 21, 2019, 8:57 a.m. (2019-02-21 08:57:16 UTC) #5
Manish Jethani
Patch Set 2 https://codereview.adblockplus.org/30013555/diff/30013556/lib/content/snippets.js File lib/content/snippets.js (right): https://codereview.adblockplus.org/30013555/diff/30013556/lib/content/snippets.js#newcode879 lib/content/snippets.js:879: return (() => {}).apply.call(fetch_, this, args); ...
Feb. 21, 2019, 9 a.m. (2019-02-21 09:00:37 UTC) #6
a.giammarchi
On 2019/02/21 08:57:16, Manish Jethani wrote: > What if the fetch on the page is ...
Feb. 21, 2019, 10:17 a.m. (2019-02-21 10:17:39 UTC) #7
a.giammarchi
last hint before giving the ok https://codereview.adblockplus.org/30013555/diff/30013561/lib/content/snippets.js File lib/content/snippets.js (left): https://codereview.adblockplus.org/30013555/diff/30013561/lib/content/snippets.js#oldcode875 lib/content/snippets.js:875: return fetch_.apply(this, args); ...
Feb. 21, 2019, 10:26 a.m. (2019-02-21 10:26:58 UTC) #8
Manish Jethani
https://codereview.adblockplus.org/30013555/diff/30013561/lib/content/snippets.js File lib/content/snippets.js (left): https://codereview.adblockplus.org/30013555/diff/30013561/lib/content/snippets.js#oldcode875 lib/content/snippets.js:875: return fetch_.apply(this, args); On 2019/02/21 10:26:58, a.giammarchi wrote: > ...
Feb. 21, 2019, 10:35 a.m. (2019-02-21 10:35:04 UTC) #9
a.giammarchi
On 2019/02/21 10:35:04, Manish Jethani wrote: > Anyway, since we decided not to make any ...
Feb. 21, 2019, 10:38 a.m. (2019-02-21 10:38:19 UTC) #10
a.giammarchi
On 2019/02/21 10:38:19, a.giammarchi wrote: > Any reason not to do that instead of a ...
Feb. 21, 2019, 10:42 a.m. (2019-02-21 10:42:38 UTC) #11
Manish Jethani
On 2019/02/21 10:42:38, a.giammarchi wrote: > On 2019/02/21 10:38:19, a.giammarchi wrote: > > Any reason ...
Feb. 21, 2019, 11:47 a.m. (2019-02-21 11:47:00 UTC) #12
a.giammarchi
Feb. 21, 2019, 11:59 a.m. (2019-02-21 11:59:35 UTC) #13
On 2019/02/21 11:47:00, Manish Jethani wrote:
> On 2019/02/21 10:42:38, a.giammarchi wrote:
> > On 2019/02/21 10:38:19, a.giammarchi wrote:
> > > Any reason not to do that instead of a runtime O(n) `(()=>{}).apply.call`
?
> > 
> > alternatively: wouldn't be at least cleaner and more efficient to do
instead:
> > 
> > ```
> > let {apply} = Function; // pass through the prototype anyway
> > return apply.call(fetch_, this, args);
> > ```
> > [...]
> 
> We could explore this, but let's do it outside this patch. The goal here was
> really to fix the bug.

LGTM then.

Powered by Google App Engine
This is Rietveld