After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742535 - Coverage AST walk does not detect MemberExpressions properly
Coverage AST walk does not detect MemberExpressions properly
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
1.43.x
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2015-01-07 17:01 UTC by Sam Spilsbury
Modified: 2015-01-18 21:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Handle other expression types too (18.78 KB, patch)
2015-01-16 03:11 UTC, Sam Spilsbury
committed Details | Review
Beautifications as suggested on downstream review (10.61 KB, patch)
2015-01-16 03:12 UTC, Sam Spilsbury
committed Details | Review
coverage: Fix typo (825 bytes, patch)
2015-01-16 07:01 UTC, Sam Spilsbury
committed Details | Review

Description Sam Spilsbury 2015-01-07 17:01:04 UTC
A function expression or definition can also be an object, so properties can be accessed on it while it is being defined. For instance:

    f = function(f) { }.bind(this)

This is parsed as "MemberExpression". coverage.js does not parse this, so when the function is executed, it is not detected and coverage.js asserts accordingly.
Comment 1 Sam Spilsbury 2015-01-16 03:11:18 UTC
Created attachment 294636 [details] [review]
Handle other expression types too
Comment 2 Sam Spilsbury 2015-01-16 03:12:00 UTC
Created attachment 294637 [details] [review]
Beautifications as suggested on downstream review
Comment 3 Sam Spilsbury 2015-01-16 07:01:48 UTC
Created attachment 294642 [details] [review]
coverage: Fix typo

This fixes a typo in the initial patch. Patches have already been applied downstream based on upstream maintainer review (Jasper, Cosimo), hence this patch is not rebased on to the initial patch to make downstream merging a little easier.