You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/01/29 20:07:52 UTC

[10/37] js commit: [android] Remove uses of Function.prototype.bind.

[android] Remove uses of Function.prototype.bind.

Fixes cordova.js on Android 2.3


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/369d1ea4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/369d1ea4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/369d1ea4

Branch: refs/heads/symbolmapping
Commit: 369d1ea4f739e9446886c3060e2046a4cf1a986e
Parents: 1aa3643
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Jan 21 16:31:32 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Jan 21 16:31:32 2013 -0500

----------------------------------------------------------------------
 lib/common/modulemapper.js |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/369d1ea4/lib/common/modulemapper.js
----------------------------------------------------------------------
diff --git a/lib/common/modulemapper.js b/lib/common/modulemapper.js
index c539946..ab20588 100644
--- a/lib/common/modulemapper.js
+++ b/lib/common/modulemapper.js
@@ -38,9 +38,18 @@ function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
     }
 }
 
-exports.clobbers = addEntry.bind(null, 'c');
-exports.merges = addEntry.bind(null, 'm');
-exports.defaults = addEntry.bind(null, 'd');
+// Note: Android 2.3 does have Function.bind().
+exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
+};
 
 function prepareNamespace(symbolPath, context) {
     if (!symbolPath) {