From a5f1415a342ecbf5c2c8ddccf8b7910be38160c0 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Fri, 23 Oct 2015 21:39:48 +0200 Subject: [PATCH] Fix uncaught ReferenceError sometimes when opening tabs Apparently, `setTimeout` is _sometimes_ available in frame scripts, sometimes not. `content.setTimeout` always is available, though. --- extension/bootstrap.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/bootstrap.coffee b/extension/bootstrap.coffee index 39a14d2..829510a 100644 --- a/extension/bootstrap.coffee +++ b/extension/bootstrap.coffee @@ -122,6 +122,6 @@ do (global = this) -> # When updating the add-on, the previous version is going to shut down at # the same time as the new version starts up. Add the shutdown listener in # the next tick to prevent the previous version from triggering it. - setTimeout((-> + content.setTimeout((-> require('./lib/message-manager').listenOnce('shutdown', shutdown) ), 0) -- 2.39.3