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

Unified Diff: lib/requestNotifier.js

Issue 9251039: Get rid of nested functions declarations that are not on top level (causes strict mode warnings) (Closed)
Patch Set: Created Jan. 23, 2013, 12:52 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 | « lib/objectTabs.js ('k') | lib/synchronizer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/requestNotifier.js
===================================================================
--- a/lib/requestNotifier.js
+++ b/lib/requestNotifier.js
@@ -38,30 +38,30 @@ if (false)
}
else
{
// Fall back to user data
let dataSeed = Math.random();
let nodeDataProp = "abpNodeData" + dataSeed;
let windowStatsProp = "abpWindowStats" + dataSeed;
let windowSelectionProp = "abpWindowSelection" + dataSeed;
- function getProp(map)
+ let getProp = function(map)
{
switch (map)
{
case nodeData:
return nodeDataProp;
case windowStats:
return windowStatsProp;
case windowSelection:
return windowSelectionProp;
default:
return null;
}
- }
+ };
setEntry = function(map, key, value) key.setUserData(getProp(map), value, null);
hasEntry = function(map, key) key.getUserData(getProp(map));
getEntry = function(map, key) key.getUserData(getProp(map)) || undefined;
}
/**
* List of notifiers in use - these notifiers need to receive notifications on
« no previous file with comments | « lib/objectTabs.js ('k') | lib/synchronizer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld