Follow to changes introduced by https://bugzilla.mozilla.org/show_bug.cgi?id=1058116
Return the current browser immediately if possible
Accept null input by getTabFromFrame().

This suppresses a crash error reported on https://bugzilla.mozilla.org/show_bug.cgi?id=1098688