Bug 1277475 Part 2: Ignore marquee attribute event handlers when sandboxed scripts flag is set on its owning Document. r=bz, a=sylvestre
authorBob Owen <bobowencode@gmail.com>
Thu, 09 Jun 2016 11:22:22 +0100
changeset 339669 528cd3ea51b90b0d0be0a99ac80e66aa54e8bab6
parent 339668 c40ae6d6fb9938bc774d7d07fcf393e87aeb05dc
child 339670 df1161c9fc743c674d91607444a95254acd9d64b
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, sylvestre
bugs1277475
milestone49.0a2
Bug 1277475 Part 2: Ignore marquee attribute event handlers when sandboxed scripts flag is set on its owning Document. r=bz, a=sylvestre MozReview-Commit-ID: IvUAvkEQcSW
layout/style/xbl-marquee/xbl-marquee.xml
--- a/layout/style/xbl-marquee/xbl-marquee.xml
+++ b/layout/style/xbl-marquee/xbl-marquee.xml
@@ -273,16 +273,23 @@
       </method>
 
       <method name="_setEventListener">
         <parameter name="aName"/>
         <parameter name="aValue"/>
         <parameter name="aIgnoreNextCall"/>
         <body>
           <![CDATA[
+          // _setEventListener is only used for setting the attribute event
+          // handlers, which we want to ignore if our document is sandboxed
+          // without the allow-scripts keyword.
+          if (document.hasScriptsBlockedBySandbox) {
+            return true;
+          }
+
           if (this._ignoreNextCall) {
             return this._ignoreNextCall = false;
           }
 
           if (aIgnoreNextCall) {
             this._ignoreNextCall = true;
           }