Permalink
Browse files

May happen that originalTarget is not available for whatever reason

Real fix
  • Loading branch information...
1 parent 9cebeae commit 97026137cf852c8381b701604a116a34b8593263 @nmaier committed Mar 16, 2011
Showing with 8 additions and 5 deletions.
  1. +8 −5 browser.jsm
View
13 browser.jsm
@@ -248,14 +248,17 @@ function main(window) {
* Will check for failures and re-navigate if possible
*/
function loadPage(evt) {
- if (!evt.originalTarget || !evt.originalTarget.location) {
- return;
+ let loc;
+ try {
+ loc = evt.target.location.toString();
+ if (!(loc in known)) {
+ return;
+ }
}
- let loc = evt.originalTarget.location.toString();
- if (!(loc in known)) {
+ catch (ex) {
+ // location threw; might not be available
return;
}
-
let [num, browser] = known[loc];
delete known[loc];

0 comments on commit 9702613

Please sign in to comment.