Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/compat.js

Issue 29372820: Issue 4795 - Avoid shorthand method syntax where prototype matters (Closed)
Patch Set: Created Jan. 23, 2017, 1:42 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compat.js
diff --git a/lib/compat.js b/lib/compat.js
index 21439f3d353d904341f2b54ac7fe7f14190ac3bd..dcb231da0f5c9c881212dbad1efeba5290273e6c 100644
--- a/lib/compat.js
+++ b/lib/compat.js
@@ -55,8 +55,13 @@ let Components =
interfaces:
{
nsIFile: {DIRECTORY_TYPE: 0},
- nsIFileURL() {},
- nsIHttpChannel() {},
+
+ // We don't use the method definition shorthand syntax for these functions
Sebastian Noack 2017/01/23 13:54:22 I had a hard time to understand what is going on h
kzar 2017/01/23 13:59:13 It surely could, I'm open to suggestions.
Sebastian Noack 2017/02/16 12:05:10 With our just established ESLint configuration thi
kzar 2017/02/17 09:40:28 Done.
+ // since that gives them the prototype of undefined which breaks instanceof
+ // checks.
+ nsIFileURL: function() {},
+ nsIHttpChannel: function() {},
+
nsITimer: {TYPE_REPEATING_SLACK: 0},
nsIInterfaceRequestor: null,
nsIChannelEventSink: null
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld