[Pkg-mozext-commits] [greasemonkey] 05/13: Keep the `this` of GM_xhr callbacks set to the details object.

David Prévot taffit at moszumanska.debian.org
Thu Jul 17 20:10:00 UTC 2014


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

taffit pushed a commit to branch master
in repository greasemonkey.

commit 5dc3eb2a9916f9b875bf7140d80efe0016be362c
Author: Anthony Lieuallen <arantius at gmail.com>
Date:   Wed Jul 16 15:50:57 2014 -0400

    Keep the `this` of GM_xhr callbacks set to the details object.
    
    Refs #1937
---
 modules/xmlhttprequester.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/xmlhttprequester.js b/modules/xmlhttprequester.js
index 010cd28..95ab829 100644
--- a/modules/xmlhttprequester.js
+++ b/modules/xmlhttprequester.js
@@ -240,6 +240,6 @@ function(wrappedContentWin, req, event, details) {
     // otherwise details[event].apply can point to window.setTimeout, which
     // can be abused to get increased privileges.
     new XPCNativeWrapper(wrappedContentWin, "setTimeout()")
-      .setTimeout(function(){ eventCallback(responseState); }, 0);
+      .setTimeout(function(){ eventCallback.call(details, responseState); }, 0);
   }, false);
 };

-- 
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