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

Unified Diff: Source/devtools/front_end/CodeMirrorTextEditor.js

Issue 202623004: DevTools: [JSDoc] Fix function bind()-ing against their @this annotations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove unneeded code 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/front_end/CanvasProfileView.js ('k') | Source/devtools/front_end/ConsoleView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/CodeMirrorTextEditor.js
diff --git a/Source/devtools/front_end/CodeMirrorTextEditor.js b/Source/devtools/front_end/CodeMirrorTextEditor.js
index 5291705db389259b126159aa5ae34660ccac7cbf..8ad3b9edfe44f19f80e15f0ddef94cedfb7b8300 100644
--- a/Source/devtools/front_end/CodeMirrorTextEditor.js
+++ b/Source/devtools/front_end/CodeMirrorTextEditor.js
@@ -196,7 +196,7 @@ CodeMirror.commands.autocomplete = WebInspector.CodeMirrorTextEditor.autocomplet
CodeMirror.commands.smartNewlineAndIndent = function(codeMirror)
{
- codeMirror.operation(innerSmartNewlineAndIndent.bind(this, codeMirror));
+ codeMirror.operation(innerSmartNewlineAndIndent.bind(null, codeMirror));
function countIndent(line)
{
@@ -1526,11 +1526,11 @@ WebInspector.CodeMirrorTextEditor.FixWordMovement = function(codeMirror)
var leftKey = modifierKey + "-Left";
var rightKey = modifierKey + "-Right";
var keyMap = {};
- keyMap[leftKey] = moveLeft.bind(this, false);
- keyMap[rightKey] = moveRight.bind(this, false);
- keyMap["Shift-" + leftKey] = moveLeft.bind(this, true);
- keyMap["Shift-" + rightKey] = moveRight.bind(this, true);
- keyMap[modifierKey + "-Backspace"] = delWordBack.bind(this);
+ keyMap[leftKey] = moveLeft.bind(null, false);
+ keyMap[rightKey] = moveRight.bind(null, false);
+ keyMap["Shift-" + leftKey] = moveLeft.bind(null, true);
+ keyMap["Shift-" + rightKey] = moveRight.bind(null, true);
+ keyMap[modifierKey + "-Backspace"] = delWordBack;
codeMirror.addKeyMap(keyMap);
}
« no previous file with comments | « Source/devtools/front_end/CanvasProfileView.js ('k') | Source/devtools/front_end/ConsoleView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698