[tbb-commits] [tor-browser/esr24] Bug 1005552 - Stop binding marquee event handlers. r=bz, a=abillings
mikeperry at torproject.org
mikeperry at torproject.org
Fri Aug 29 05:26:40 UTC 2014
commit 2b2b6fb7d05b3d69cb80552d215652f7a64c26db
Author: Bobby Holley <bobbyholley at gmail.com>
Date: Fri May 16 10:56:41 2014 -0700
Bug 1005552 - Stop binding marquee event handlers. r=bz, a=abillings
These functions get invoked as event listeners, so we'll automatically get the
proper |this|. The reason for the existing shenanigans was to work around
bug 872772, which has now been fixed.
---
layout/style/xbl-marquee/xbl-marquee.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/layout/style/xbl-marquee/xbl-marquee.xml b/layout/style/xbl-marquee/xbl-marquee.xml
index 50e9644..3e7e3a4 100644
--- a/layout/style/xbl-marquee/xbl-marquee.xml
+++ b/layout/style/xbl-marquee/xbl-marquee.xml
@@ -264,8 +264,7 @@
//
// NB: Make sure to wrap the constructor in parentheses to
// deal with the weird precedence of |new| in JS.
- var contentFn = new (XPCNativeWrapper.unwrap(window).Function)("event", aValue);
- this["_on" + aName] = function(e) { return contentFn.call(this, e); };
+ this["_on" + aName] = new (XPCNativeWrapper.unwrap(window.Function))("event", aValue);
}
catch(e) {
return false;
More information about the tbb-commits
mailing list