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

Issue 30033574: Issue 7419 - Allow wrapping function for abort-on-property-* (Closed)

Created:
March 28, 2019, 8:39 p.m. by hub
Modified:
March 29, 2019, 4:02 p.m.
Reviewers:
Manish Jethani
CC:
a.giammarchi
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

Issue 7419 - Allow wrapping function for abort-on-property-*

Patch Set 1 #

Total comments: 9

Patch Set 2 : Adde more tests #

Patch Set 3 : Deal with function base property delayed creation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -2 lines) Patch
M lib/content/snippets.js View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M test/browser/snippets.js View 1 2 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 9
hub
March 28, 2019, 8:39 p.m. (2019-03-28 20:39:19 UTC) #1
Manish Jethani
https://codereview.adblockplus.org/30033574/diff/30033575/lib/content/snippets.js File lib/content/snippets.js (right): https://codereview.adblockplus.org/30033574/diff/30033575/lib/content/snippets.js#newcode729 lib/content/snippets.js:729: if (newValue && typeof newValue == "object") We should ...
March 29, 2019, 7:08 a.m. (2019-03-29 07:08:08 UTC) #2
Manish Jethani
There is already a commit with nearly the same summary. We could use "Issue 7419 ...
March 29, 2019, 7:10 a.m. (2019-03-29 07:10:33 UTC) #3
hub
updated patch https://codereview.adblockplus.org/30033574/diff/30033575/lib/content/snippets.js File lib/content/snippets.js (right): https://codereview.adblockplus.org/30033574/diff/30033575/lib/content/snippets.js#newcode729 lib/content/snippets.js:729: if (newValue && typeof newValue == "object") ...
March 29, 2019, 2:36 p.m. (2019-03-29 14:36:28 UTC) #4
Manish Jethani
https://codereview.adblockplus.org/30033574/diff/30033575/lib/content/snippets.js File lib/content/snippets.js (right): https://codereview.adblockplus.org/30033574/diff/30033575/lib/content/snippets.js#newcode729 lib/content/snippets.js:729: if (newValue && typeof newValue == "object") On 2019/03/29 ...
March 29, 2019, 2:57 p.m. (2019-03-29 14:57:10 UTC) #5
hub
updated patch https://codereview.adblockplus.org/30033574/diff/30033575/lib/content/snippets.js File lib/content/snippets.js (right): https://codereview.adblockplus.org/30033574/diff/30033575/lib/content/snippets.js#newcode729 lib/content/snippets.js:729: if (newValue && typeof newValue == "object") ...
March 29, 2019, 3:36 p.m. (2019-03-29 15:36:02 UTC) #6
Manish Jethani
LGTM https://codereview.adblockplus.org/30033574/diff/30033575/test/browser/snippets.js File test/browser/snippets.js (right): https://codereview.adblockplus.org/30033574/diff/30033575/test/browser/snippets.js#newcode114 test/browser/snippets.js:114: await runSnippet(test, "abort-on-property-read", "Object.keys"); On 2019/03/29 14:36:27, hub ...
March 29, 2019, 3:46 p.m. (2019-03-29 15:46:27 UTC) #7
hub
https://codereview.adblockplus.org/30033574/diff/30033575/test/browser/snippets.js File test/browser/snippets.js (right): https://codereview.adblockplus.org/30033574/diff/30033575/test/browser/snippets.js#newcode114 test/browser/snippets.js:114: await runSnippet(test, "abort-on-property-read", "Object.keys"); On 2019/03/29 15:46:27, Manish Jethani ...
March 29, 2019, 3:58 p.m. (2019-03-29 15:58:02 UTC) #8
Manish Jethani
March 29, 2019, 3:59 p.m. (2019-03-29 15:59:09 UTC) #9
https://codereview.adblockplus.org/30033574/diff/30033575/test/browser/snippe...
File test/browser/snippets.js (right):

https://codereview.adblockplus.org/30033574/diff/30033575/test/browser/snippe...
test/browser/snippets.js:114: await runSnippet(test, "abort-on-property-read",
"Object.keys");
On 2019/03/29 15:58:02, hub wrote:
> On 2019/03/29 15:46:27, Manish Jethani wrote:
> > On 2019/03/29 14:36:27, hub wrote:
> > > On 2019/03/29 07:08:07, Manish Jethani wrote:
> > > > In the interest of completeness we could add the following tests:
> > > >
> > > > [...]
> > >
> > > for the record, test 8 and 9 already pass. But that's fine. More coverage.
> > 
> > The reason I thought we should add these tests is that it makes it clear to
> > anyone else who comes by that this works with arrow functions and classes.
It
> > may not be immediately obvious to someone who is not a JS expert that a
class
> is
> > in fact just a function, for example (esp. if they are from a C++
background).
> > This makes the code friendlier to everyone.
> 
> I was not arguing against. I was just indicating that they already worked. The
> more. The merrier.

Acknowledged.

Powered by Google App Engine
This is Rietveld