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

Unified Diff: third_party/WebKit/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java

Issue 2449173002: DevTools: fix jsdoc validator to recognize `this' usage within arrow functions (Closed)
Patch Set: review comments + moar tests Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java
diff --git a/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java b/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java
index 837b09cc9ca539c5fc63aa5954088fc89fa18bfd..21e8681173d6dde121007f68d2ec823f8dc0447e 100644
--- a/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java
+++ b/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionReceiverChecker.java
@@ -99,6 +99,9 @@ public final class FunctionReceiverChecker extends ContextTrackingChecker {
private void handleThis() {
FunctionRecord function = getState().getCurrentFunctionRecord();
+ while (function != null && function.functionNode.isArrowFunction()) {
+ function = function.enclosingFunctionRecord;
+ }
if (function == null) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698