Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(458)

Issue 203443010: DevTools: [JsDocValidator] Fix checking of receivers specified as arguments (Closed)

Created:
6 years, 9 months ago by apavlov
Modified:
6 years, 9 months ago
Reviewers:
vsevik, aandrey, sergeyv
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, alph+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, aandrey+blink_chromium.org
Visibility:
Public.

Description

DevTools: [JsDocValidator] Fix checking of receivers specified as arguments r169450 has resulted in multiple failures of existing code where functions annotated with @this are passed as arguments along with their receivers. The cases include: - Array.prototype.forEach and other iteration-with-callback methods. - RemoteObject.prototype.callFunction[JSON], whose functionDeclaration can be evaluated on any Object (but expect a certain type thereof). - WebInspector.Object.prototype.{add,remove}EventListener, which accepts the callback receiver as its third argument. This patch introduces receiver specification detection in these cases, or resorts to IGNORE in ambiguous situations. R=aandrey, sergeyv, vsevik NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169549

Patch Set 1 #

Patch Set 2 : Use @suppressReceiverCheck annotation for whitelisted callbacks with @this but with no receiver #

Total comments: 4

Patch Set 3 : Comments addressed #

Total comments: 2

Patch Set 4 : Add a suppression hint message #

Unified diffs Side-by-side diffs Delta from patch set Stats (+210 lines, -46 lines) Patch
M Source/devtools/front_end/ElementsPanel.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/devtools/front_end/ElementsTreeOutline.js View 1 2 chunks +2 lines, -0 lines 0 comments Download
M Source/devtools/front_end/ObjectPropertiesSection.js View 1 3 chunks +6 lines, -1 line 0 comments Download
M Source/devtools/front_end/PropertiesSidebarPane.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/devtools/front_end/RemoteObject.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/devtools/front_end/RuntimeModel.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/devtools/scripts/compiler-runner/closure-runner.jar View 1 Binary file 0 comments Download
M Source/devtools/scripts/compiler-runner/src/org/chromium/devtools/compiler/Runner.java View 1 2 chunks +2 lines, -0 lines 0 comments Download
M Source/devtools/scripts/jsdoc-validator/hashes View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/devtools/scripts/jsdoc-validator/jsdoc-validator.jar View 1 2 3 Binary file 0 comments Download
M Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/AstUtil.java View 1 1 chunk +0 lines, -5 lines 0 comments Download
M Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/ContextTrackingChecker.java View 1 2 chunks +11 lines, -1 line 0 comments Download
M Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java View 1 2 3 6 chunks +123 lines, -33 lines 0 comments Download
M Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/RequiredThisAnnotationChecker.java View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/devtools/scripts/jsdoc-validator/tests/golden.dat View 1 2 3 2 chunks +22 lines, -2 lines 0 comments Download
M Source/devtools/scripts/jsdoc-validator/tests/this.js View 1 1 chunk +36 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
apavlov
6 years, 9 months ago (2014-03-19 11:12:28 UTC) #1
sergeyv
lgtm with nits https://codereview.chromium.org/203443010/diff/20001/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java File Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java (right): https://codereview.chromium.org/203443010/diff/20001/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java#newcode89 Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java:89: for (int i = 0; i ...
6 years, 9 months ago (2014-03-19 13:15:49 UTC) #2
apavlov
https://codereview.chromium.org/203443010/diff/20001/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java File Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java (right): https://codereview.chromium.org/203443010/diff/20001/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java#newcode89 Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java:89: for (int i = 0; i < argumentCount; ++i) ...
6 years, 9 months ago (2014-03-19 13:23:54 UTC) #3
apavlov
The CQ bit was checked by apavlov@chromium.org
6 years, 9 months ago (2014-03-19 13:24:49 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/apavlov@chromium.org/203443010/40001
6 years, 9 months ago (2014-03-19 13:24:55 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-19 13:24:57 UTC) #6
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
6 years, 9 months ago (2014-03-19 13:24:57 UTC) #7
aandrey
lgtm https://codereview.chromium.org/203443010/diff/40001/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java File Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java (right): https://codereview.chromium.org/203443010/diff/40001/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java#newcode200 Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java:200: "a receiver"); add: "This check can be disabled ...
6 years, 9 months ago (2014-03-19 13:31:47 UTC) #8
apavlov
On 2014/03/19 13:31:47, aandrey wrote: > lgtm > > https://codereview.chromium.org/203443010/diff/40001/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java > File > Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java > ...
6 years, 9 months ago (2014-03-19 13:39:37 UTC) #9
apavlov
The CQ bit was checked by apavlov@chromium.org
6 years, 9 months ago (2014-03-19 13:39:44 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/apavlov@chromium.org/203443010/60001
6 years, 9 months ago (2014-03-19 13:39:47 UTC) #11
commit-bot: I haz the power
6 years, 9 months ago (2014-03-19 13:46:04 UTC) #12
Message was sent while issue was closed.
Change committed as 169549

Powered by Google App Engine
This is Rietveld 408576698