Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/appSupport.js

Issue 29333177: Issue 3465 - Don`t access content document when opening new tab (Closed)
Patch Set: Created Jan. 4, 2016, 8:22 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/appSupport.js
===================================================================
--- a/lib/appSupport.js
+++ b/lib/appSupport.js
@@ -222,17 +222,17 @@ switch (application)
return (window.document.documentElement.getAttribute("windowtype") == "navigator:browser");
};
exports.getBrowser = (window) => window.gBrowser;
exports.addTab = function ff_addTab(window, url, event)
{
if (event)
- window.openNewTabWith(url, exports.getBrowser(window).contentDocument, null, event, false);
+ window.openNewTabWith(url, null, null, event, false);
else
window.gBrowser.loadOneTab(url, {inBackground: false});
};
exports.contentContextMenu = "contentAreaContextMenu";
exports.defaultToolbarPosition = {
parent: "nav-bar"
@@ -270,17 +270,17 @@ switch (application)
{
let type = window.document.documentElement.getAttribute("windowtype");
return (type == "navigator:browser" || type == "mail:3pane" || type == "mail:messageWindow");
};
exports.addTab = function sm_addTab(window, url, event)
{
if (event || !("gBrowser" in window))
- window.openNewTabWith(url, ("gBrowser" in window ? window.gBrowser.contentDocument : null), null, event, false);
+ window.openNewTabWith(url, null, null, event, false);
else
window.gBrowser.loadOneTab(url, {inBackground: false});
};
exports.getBrowser = function sm_getBrowser(window)
{
if ("gBrowser" in window)
return window.gBrowser;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld