Skip to content

Commit

Permalink
Undo window re-wrapping from #1258.
Browse files Browse the repository at this point in the history
I've done my best to test everything mentioned, and eval() and expandos work as expected in Firefox 3-7.

Fixes #1278
  • Loading branch information
Anthony Lieuallen committed Aug 29, 2011
1 parent b658b79 commit de35812
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/greasemonkey.js
Expand Up @@ -70,8 +70,7 @@ function createSandbox(
var unsafeWin = aContentWin.wrappedJSObject;
var sandbox = new Components.utils.Sandbox(aContentWin);

// Re-wrap, fixes eval(). See #1258
sandbox.__proto__ = new XPCNativeWrapper(unsafeWin);
sandbox.__proto__ = aContentWin;
sandbox.unsafeWindow = unsafeWin;
sandbox.XPathResult = Ci.nsIDOMXPathResult;

Expand Down

0 comments on commit de35812

Please sign in to comment.