Permalink
Browse files

Fix alert + setTimeout in grant none case.

Fixes #1620
Refs #1318
Refs #1350
  • Loading branch information...
1 parent e7d86d4 commit 139ce97b1ab44607003b33751210b7edf16744ce @arantius arantius committed Sep 6, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 components/greasemonkey.js
View
6 components/greasemonkey.js
@@ -122,6 +122,12 @@ function createSandbox(
Components.utils.evalInSandbox(
'const unsafeWindow = window;', contentSandbox);
+ if (GM_util.compareFirefoxVersion("16.0") < 0) {
+ // See #1350. The upstream bug was fixed in Firefox 16; apply workaround
+ // only in older versions.
+ contentSandbox.alert = alert;
+ }
+
return contentSandbox;
}

0 comments on commit 139ce97

Please sign in to comment.