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

Unified Diff: Source/devtools/scripts/jsdoc-validator/tests/this.js

Issue 199733011: DevTools: [JsDocValidator] Avoid false-positive function receiver-related errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/devtools/scripts/jsdoc-validator/tests/golden.dat ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/scripts/jsdoc-validator/tests/this.js
diff --git a/Source/devtools/scripts/jsdoc-validator/tests/this.js b/Source/devtools/scripts/jsdoc-validator/tests/this.js
index 165c165fcdc881c6372bfced0432730d77fb0e83..b769a2858c3a8f6eb438ef75fc07f9b5ab85afec 100644
--- a/Source/devtools/scripts/jsdoc-validator/tests/this.js
+++ b/Source/devtools/scripts/jsdoc-validator/tests/this.js
@@ -264,6 +264,20 @@ ReceiverTest.prototype = {
this.foo = 1;
}
object.callFunction(func, [], ignoredCallbackWithThis); // OK - ignored.
+
+ function callbackReferencingThisNotAnnotated()
+ {
+ this.foo = 2;
+ }
+ this.memberTwo(callbackReferencingThisNotAnnotated.bind(this)); // OK - No @this annotation, but references |this|.
+
+ /**
+ * @this {Object}
+ */
+ function callbackNotReferencingThisAnnotated()
+ {
+ }
+ this.memberTwo(callbackNotReferencingThisAnnotated); // OK - Has @this annotation, but does not reference |this|.
},
memberTwo: function(arg) {}
« no previous file with comments | « Source/devtools/scripts/jsdoc-validator/tests/golden.dat ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698