diff options
author | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-13 23:47:06 +0000 |
---|---|---|
committer | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-13 23:47:06 +0000 |
commit | 3ed462685a542d3a9625d8fa24a5755a283530ae (patch) | |
tree | 72b60d41d6294059527a5120df595eb7c73f48ab /chrome/renderer/resources | |
parent | baa88b42ff4fe68d8bd096b2c4c28a4ebdac6910 (diff) | |
download | chromium_src-3ed462685a542d3a9625d8fa24a5755a283530ae.zip chromium_src-3ed462685a542d3a9625d8fa24a5755a283530ae.tar.gz chromium_src-3ed462685a542d3a9625d8fa24a5755a283530ae.tar.bz2 |
DOMUI etc. Use the built in bind method of Function now that V8 supports it.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/3308030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/resources')
-rw-r--r-- | chrome/renderer/resources/extension_process_bindings.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js index 0c40e08..8106782 100644 --- a/chrome/renderer/resources/extension_process_bindings.js +++ b/chrome/renderer/resources/extension_process_bindings.js @@ -199,12 +199,6 @@ var chrome = chrome || {}; request.callback ? true : false); } - function bind(obj, func) { - return function() { - return func.apply(obj, arguments); - }; - } - // Helper function for positioning pop-up windows relative to DOM objects. // Returns the absolute position of the given element relative to the hosting // browser frame. @@ -346,7 +340,7 @@ var chrome = chrome || {}; apiFunction.name = apiDef.namespace + "." + functionDef.name; apiFunctions[apiFunction.name] = apiFunction; - module[functionDef.name] = bind(apiFunction, function() { + module[functionDef.name] = (function() { var args = arguments; if (this.updateArguments) { // Functions whose signature has changed can define an @@ -375,7 +369,7 @@ var chrome = chrome || {}; chromeHidden.validate([retval], [this.definition.returns]); } return retval; - }); + }).bind(apiFunction); }); } |