[Pkg-mozext-commits] [greasemonkey] 12/21: Call menu command functions with undefined `this`.

David Prévot taffit at moszumanska.debian.org
Sun Sep 13 21:27:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit 0c1b253c48aba48b20c2581e13e4e5531f5c973e
Author: Anthony Lieuallen <arantius at gmail.com>
Date:   Wed Jul 15 15:38:00 2015 -0400

    Call menu command functions with undefined `this`.
    
    Just in case, so the command object cannot be changed.
---
 modules/menucommand.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/menucommand.js b/modules/menucommand.js
index 50279bc..d24f8ec 100644
--- a/modules/menucommand.js
+++ b/modules/menucommand.js
@@ -58,7 +58,7 @@ function MenuCommandSandbox(
     if (!command) {
       throw new Error('Could not run requested menu command!');
     } else {
-      command.commandFunc();
+      command.commandFunc.call();
     }
   }, true);
   // 4) Export the "register a command" API function to the sandbox scope.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list