| Index: Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/ContextTrackingValidationCheck.java
|
| diff --git a/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/ContextTrackingValidationCheck.java b/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/ContextTrackingValidationCheck.java
|
| index 295772ed5db856b5d2ea407552adad6a9eac0575..1273cb2c20ae8be6f6a7cbf775a2bcac5984f022 100644
|
| --- a/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/ContextTrackingValidationCheck.java
|
| +++ b/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/ContextTrackingValidationCheck.java
|
| @@ -1,5 +1,6 @@
|
| package org.chromium.devtools.jsdoc.checks;
|
|
|
| +import com.google.javascript.jscomp.NodeUtil;
|
| import com.google.javascript.rhino.JSDocInfo;
|
| import com.google.javascript.rhino.Node;
|
| import com.google.javascript.rhino.Token;
|
| @@ -22,6 +23,7 @@ public class ContextTrackingValidationCheck extends ValidationCheck {
|
| registerClient(new ProtoFollowsExtendsChecker());
|
| registerClient(new MethodAnnotationChecker());
|
| registerClient(new FunctionReceiverChecker());
|
| + registerClient(new DisallowedGlobalPropertiesChecker());
|
| }
|
|
|
| @Override
|
| @@ -83,6 +85,7 @@ public class ContextTrackingValidationCheck extends ValidationCheck {
|
| FunctionRecord functionRecord = new FunctionRecord(
|
| node,
|
| functionName,
|
| + getFunctionParameterNames(node),
|
| parentType,
|
| state.getCurrentFunctionRecord());
|
| state.pushFunctionRecord(functionRecord);
|
| @@ -128,6 +131,17 @@ public class ContextTrackingValidationCheck extends ValidationCheck {
|
| return getNodeText(node);
|
| }
|
|
|
| + private List<String> getFunctionParameterNames(Node functionNode) {
|
| + List<String> parameterNames = new ArrayList<String>();
|
| + Node parametersNode = NodeUtil.getFunctionParameters(functionNode);
|
| + for (int i = 0, childCount = parametersNode.getChildCount(); i < childCount; ++i) {
|
| + Node paramNode = parametersNode.getChildAtIndex(i);
|
| + String paramName = state.getContext().getNodeText(paramNode);
|
| + parameterNames.add(paramName);
|
| + }
|
| + return parameterNames;
|
| + }
|
| +
|
| private boolean rememberTypeRecordIfNeeded(String typeName, JSDocInfo info) {
|
| if (info == null) {
|
| return false;
|
|
|