Skip to content

Commit

Permalink
Assign GM_openInTab staright to sandbox -- it returns complex values.
Browse files Browse the repository at this point in the history
Fixes #1444
  • Loading branch information
Anthony Lieuallen committed Oct 14, 2011
1 parent 7ed47f9 commit dc6458e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/greasemonkey.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ function createSandbox(
var imp = sandbox.importFunction;
imp(function(css) { GM_addStyle(aContentWin.document, css); }, 'GM_addStyle');
imp(GM_util.hitch(new GM_ScriptLogger(aScript), 'log'), 'GM_log');
imp(GM_util.hitch(null, openInTab, aContentWin, aChromeWin), 'GM_openInTab');
imp(GM_util.hitch(null, registerMenuCommand, aContentWin, aChromeWin, aScript),
'GM_registerMenuCommand');

Expand All @@ -106,7 +105,9 @@ function createSandbox(

// The .importMethod() is safe because it can't return object values (I
// think?) -- but sometimes we want to, so in that case do a straight assign.
// TODO: When minVer=4 check if this is still necessary.
sandbox.GM_listValues = GM_util.hitch(scriptStorage, 'listValues');
sandbox.GM_openInTab = GM_util.hitch(null, openInTab, aContentWin, aChromeWin);
sandbox.GM_xmlhttpRequest = GM_util.hitch(
new GM_xmlhttpRequester(aContentWin, aChromeWin, aUrl),
'contentStartRequest');
Expand Down

0 comments on commit dc6458e

Please sign in to comment.