Skip to content

Commit

Permalink
Merge pull request #2097 from cramforce/saucy
Browse files Browse the repository at this point in the history
Be robust against promise callbacks running when window was already destroyed.
  • Loading branch information
cramforce committed Feb 18, 2016
2 parents 6d3ad24 + 96d96bf commit 3cda03b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/service/resources-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,11 @@ export class Resources {
log.fine(TAG_, 'runtime is off');
return;
}
// Sometimes in Safari these passes run after the document has already been
// destroyed. To avoid errors we bail out here.
if (!this.win.document) {
return;
}

const prevVisible = this.visible_;
this.visible_ = this.viewer_.isVisible();
Expand Down

0 comments on commit 3cda03b

Please sign in to comment.