Bug 1399997: Part 1 - Fix eval usage in Redux.jsm. r=Mossop
authorKris Maglione <maglione.k@gmail.com>
Thu, 14 Sep 2017 12:39:30 -0700
changeset 665164 81e5e9200b41b827addbecfe34736bfd13249ab9
parent 665163 c006eaf460bb5bf3120913fa154106ebaded8069
child 665165 216079d767e7fd9351abf09e605ae63c2948bd53
push id79943
push userbmo:tchiovoloni@mozilla.com
push dateThu, 14 Sep 2017 23:59:48 +0000
reviewersMossop
bugs1399997
milestone57.0a1
Bug 1399997: Part 1 - Fix eval usage in Redux.jsm. r=Mossop MozReview-Commit-ID: KHeTEy4Os6U
browser/extensions/activity-stream/vendor/Redux.jsm
--- a/browser/extensions/activity-stream/vendor/Redux.jsm
+++ b/browser/extensions/activity-stream/vendor/Redux.jsm
@@ -1,14 +1,20 @@
 /**
  * Redux v.3.6.0
  *
  * This file has been reformatted as a Javascript Core Module
  */
 this.EXPORTED_SYMBOLS = ["redux"];
+
+// Defining these prevents redux from using indirect eval or `new
+// Function()` to get its global object.
+const self = this;
+this.Object = Object;
+
 this.redux =
 /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
 
 /******/ 	// The require function
 /******/ 	function __webpack_require__(moduleId) {