Accept null input by getTabFromFrame().

This suppresses a crash error reported on https://bugzilla.mozilla.org/show_bug.cgi?id=1098688
This commit is contained in:
YUKI Hiroshi 2014-11-19 12:25:56 +09:00
parent 3663519efd
commit 66f16dde50

View File

@ -1112,6 +1112,8 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
// this is used only for obsolete API call on non-E10S windows // this is used only for obsolete API call on non-E10S windows
getTabFromFrame : function TSTBase_getTabFromFrame(aFrame, aTabBrowser) getTabFromFrame : function TSTBase_getTabFromFrame(aFrame, aTabBrowser)
{ {
if (!aFrame)
return null;
var b = aTabBrowser || this.browser; var b = aTabBrowser || this.browser;
var top = aFrame.top; var top = aFrame.top;
var tabs = this.getAllTabs(b); var tabs = this.getAllTabs(b);