Bug 865947 - Force all string event handlers to be evaluated in the content scope. r=jaws,bz
authorBobby Holley <bobbyholley@gmail.com>
Mon, 29 Apr 2013 14:37:36 -0700
changeset 141227 e8d54f8328992c3e71d15350caa0e14663b4800b
parent 141226 90ba502ea1fba7b9980b93b1fb91f0828ae2a1ea
child 141228 26bb03784c3f2986a60e0fa17b58de92ae6b714f
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, bz
bugs865947
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 865947 - Force all string event handlers to be evaluated in the content scope. r=jaws,bz
layout/style/xbl-marquee/xbl-marquee.xml
--- a/layout/style/xbl-marquee/xbl-marquee.xml
+++ b/layout/style/xbl-marquee/xbl-marquee.xml
@@ -254,17 +254,17 @@
             case "function":
               this["_on" + aName] = aValue;
               this.addEventListener(aName, this["_on" + aName], false);
             break;
 
             case "string":
               if (!aIgnoreNextCall) {
                 try {
-                  this["_on" + aName] = new Function("event", aValue);
+                  this["_on" + aName] = new XPCNativeWrapper.unwrap(window).Function("event", aValue);
                 }
                 catch(e) {
                   return false;
                 }
                 this.addEventListener(aName, this["_on" + aName], false);
               }
               else {
                 this["_on" + aName] = aValue;