mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
Bug 914748 - openURI and openURIInFrame should not throw exceptions in the OPEN_NEWTAB case when they didn't create a new browser. r=felipe
--HG-- extra : rebase_source : d165be0f58bf138bed3ef59559b74b81d5ed2a57
This commit is contained in:
parent
cf3e214203
commit
66bcb8dd1b
@ -4445,7 +4445,8 @@ nsBrowserAccess.prototype = {
|
||||
break;
|
||||
case Ci.nsIBrowserDOMWindow.OPEN_NEWTAB :
|
||||
let browser = this._openURIInNewTab(aURI, aOpener, isExternal);
|
||||
newWindow = browser.contentWindow;
|
||||
if (browser)
|
||||
newWindow = browser.contentWindow;
|
||||
break;
|
||||
default : // OPEN_CURRENTWINDOW or an illegal value
|
||||
newWindow = content;
|
||||
@ -4470,7 +4471,10 @@ nsBrowserAccess.prototype = {
|
||||
|
||||
var isExternal = (aContext == Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
|
||||
let browser = this._openURIInNewTab(aURI, aOpener, isExternal);
|
||||
return browser.QueryInterface(Ci.nsIFrameLoaderOwner);
|
||||
if (browser)
|
||||
return browser.QueryInterface(Ci.nsIFrameLoaderOwner);
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
isTabContentWindow: function (aWindow) {
|
||||
|
Loading…
Reference in New Issue
Block a user