From 0378fc7bf64b404df882d4cac2cbdd3a839c0067 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Fri, 16 May 2014 10:56:41 -0700 Subject: [PATCH] Bug 1005552 - Stop binding marquee event handlers. r=bz 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 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/layout/style/xbl-marquee/xbl-marquee.xml b/layout/style/xbl-marquee/xbl-marquee.xml index 35bccd8840a1..e15bf6be1af8 100644 --- a/layout/style/xbl-marquee/xbl-marquee.xml +++ b/layout/style/xbl-marquee/xbl-marquee.xml @@ -266,11 +266,7 @@ // call it (since XBL gets opaque non-callable wrappers to content). // * The fact that contentFn is transitively waived, which we need // in order to be able to invoke it. - // * Using the local |bind| to be sure that it does the right thing. - // Note that the underlying function still executes in the content - // scope. - var contentFn = new (XPCNativeWrapper.unwrap(window.Function))("event", aValue); - this["_on" + aName] = Function.prototype.bind.call(contentFn, this); + this["_on" + aName] = new (XPCNativeWrapper.unwrap(window.Function))("event", aValue); } catch(e) { return false;