I have a bootstrapped add-on With TB 68 it looks like the
"mail-startup-done" event is sometimes fired before the startup()
function - such that you can observe and react upon it, and sometimes not.
The latter seems to happen if the startup cache is not deleted.
Is there a way to determine if "mail-startup-done" event has already
been fired?
Thanks,
Patrick
On 21/06/2019 09:14, Patrick Brunschwig wrote:
I have a bootstrapped add-on With TB 68 it looks like the
"mail-startup-done" event is sometimes fired before the startup()
function - such that you can observe and react upon it, and sometimes not.
The latter seems to happen if the startup cache is not deleted.
Is there a way to determine if "mail-startup-done" event has already
On 21.06.2019 10:16, Jörg Knobloch wrote:
On 21/06/2019 09:14, Patrick Brunschwig wrote:
I have a bootstrapped add-on With TB 68 it looks like the
"mail-startup-done" event is sometimes fired before the startup()
function - such that you can observe and react upon it, and sometimes
not.
The latter seems to happen if the startup cache is not deleted.
Is there a way to determine if "mail-startup-done" event has already
That's possible. I'll try if document.readyState == "complete"
works
for me.
-Patrick
We ran into similar problems when porting to Thunderbird 68.
I think the right fix is to delay
"mail-startup-done"
until Thunderbird is really done with startup.
Patrick Brunschwig wrote on 21.06.19 09:14:
I have a bootstrapped add-on With TB 68 it looks like the
"mail-startup-done" event is sometimes fired before the startup()
function - such that you can observe and react upon it, and sometimes not.
The latter seems to happen if the startup cache is not deleted.
Is there a way to determine if "mail-startup-done" event has already
been fired?
Thanks,
Patrick
Maildev mailing list
Maildev@lists.thunderbird.net
http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net
In fact, after checking, we had exactly the same problem in ExQuilla for TB 86.
We worked around it using <span class="s2">"mail-tabs-session-restored"</span>
instead of <span class="s2">"mail-<span class="idiff left right">startup-done</span>"</span><span class="p"></span>
.
Note that <span class="s2"><span class="s2">"mail-tabs-session-restored"</span></span>
only fires once per session rather than per window. But we needed it only once anyway, because we just needed to run our own startup code. Most her addons are probably in a similar situation: They just need to know when Thunderbird has started up properly to run their own startup.
However, this has obviously cost us some time finding the bug, investigating the cause, and finding a solution. Thus, it would be good to fix this in Thunderbird, to send <span class="s2">"mail-<span class="idiff left right">startup-done</span>" and </span>
<span class="s2"> <span class="s2">"mail-tabs-session-restored"</span> together at the same time (but per window and per session respectively).</span>
Ben
Ben Bucksch wrote on 21.06.19 14:04:
We ran into similar problems when porting to Thunderbird 68.
I think the right fix is to delay
"mail-startup-done"
until Thunderbird is really done with startup.
Patrick Brunschwig wrote on 21.06.19 09:14:
I have a bootstrapped add-on With TB 68 it looks like the
"mail-startup-done" event is sometimes fired before the startup()
function - such that you can observe and react upon it, and sometimes not.The latter seems to happen if the startup cache is not deleted.
Is there a way to determine if "mail-startup-done" event has already
been fired?Thanks,
Patrick_______________________________________________
Maildev mailing list
Maildev@lists.thunderbird.net
http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net
We cannot move the mail-startup-done notification. Too much built-in
code depends on it being where it is.
GL
On 22/06/19 00:19, Ben Bucksch wrote:
In fact, after checking, we had exactly the same problem in ExQuilla
for TB 86.
We worked around it using |"mail-tabs-session-restored"| instead of
|"mail-startup-done"|.
Note that ||"mail-tabs-session-restored"|| only fires once per session
rather than per window. But we needed it only once anyway, because we
just needed to run our own startup code. Most her addons are probably
in a similar situation: They just need to know when Thunderbird has
started up properly to run their own startup.
However, this has obviously cost us some time finding the bug,
investigating the cause, and finding a solution. Thus, it would be
good to fix this in Thunderbird, to send |"mail-startup-done" and |
||"mail-tabs-session-restored"| together at the same time (but per
window and per session respectively).|
Ben
Ben Bucksch wrote on 21.06.19 14:04:
We ran into similar problems when porting to Thunderbird 68.
I think the right fix is to delay
"mail-startup-done"
until Thunderbird is really done with startup.
Patrick Brunschwig wrote on 21.06.19 09:14:
I have a bootstrapped add-on With TB 68 it looks like the
"mail-startup-done" event is sometimes fired before the startup()
function - such that you can observe and react upon it, and
sometimes not.
The latter seems to happen if the startup cache is not deleted.
Is there a way to determine if "mail-startup-done" event has already
been fired?
Thanks,
Patrick
Maildev mailing list
Maildev@lists.thunderbird.net
http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net
Addendum:
We able to use the <span class="s2">"mail-<span class="idiff left right">startup-done</span>"</span>
notification only because we found that we were able to check the _restored
property on the session store manager (which is a private property!) to determine whether the notification had fired yet, in which case we just ran the startup code immediately as we knew that Thunderbird had already started up at that point.
So, it would be good to fix this.
Ben Bucksch wrote on 21.06.19 14:19:
In fact, after checking, we had exactly the same problem in ExQuilla for TB 86.
We worked around it using
<span class="s2">"mail-tabs-session-restored"</span>
instead of<span class="s2">"mail-<span class="idiff left right">startup-done</span>"</span><span class="p"></span>
.Note that
<span class="s2"><span class="s2">"mail-tabs-session-restored"</span></span>
only fires once per session rather than per window. But we needed it only once anyway, because we just needed to run our own startup code. Most her addons are probably in a similar situation: They just need to know when Thunderbird has started up properly to run their own startup.However, this has obviously cost us some time finding the bug, investigating the cause, and finding a solution. Thus, it would be good to fix this in Thunderbird, to send
<span class="s2">"mail-<span class="idiff left right">startup-done</span>" and </span>
<span class="s2"> <span class="s2">"mail-tabs-session-restored"</span> together at the same time (but per window and per session respectively).</span>
Ben
Ben Bucksch wrote on 21.06.19 14:04:
We ran into similar problems when porting to Thunderbird 68.
I think the right fix is to delay
"mail-startup-done"
until Thunderbird is really done with startup.
Patrick Brunschwig wrote on 21.06.19 09:14:
I have a bootstrapped add-on With TB 68 it looks like the
"mail-startup-done" event is sometimes fired before the startup()
function - such that you can observe and react upon it, and sometimes not.The latter seems to happen if the startup cache is not deleted.
Is there a way to determine if "mail-startup-done" event has already
been fired?Thanks,
Patrick_______________________________________________
Maildev mailing list
Maildev@lists.thunderbird.net
http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net
Actually, no built-in code should depend on it. Because the notification says "done", so if built-in code runs after that, it means we're not "done".
I think the right fix would be to have the built-in code use another notification name (it's a simple search/replace), and keep <span class="s2">"mail-<span class="idiff left right">startup-done</span>"</span><span class="p"> for addons.</span>
<span class="p"><br></br> </span>
Geoff Lankow wrote on 26.06.19 02:04:
We cannot move the mail-startup-done notification. Too much built-in code depends on it being where it is.
GL
On 22/06/19 00:19, Ben Bucksch wrote:
In fact, after checking, we had exactly the same problem in ExQuilla for TB 86.
We worked around it using
<span class="s2">"mail-tabs-session-restored"</span>
instead of<span class="s2">"mail-<span class="idiff left right">startup-done</span>"</span><span class="p"></span>
.Note that
<span class="s2"><span class="s2">"mail-tabs-session-restored"</span></span>
only fires once per session rather than per window. But we needed it only once anyway, because we just needed to run our own startup code. Most her addons are probably in a similar situation: They just need to know when Thunderbird has started up properly to run their own startup.However, this has obviously cost us some time finding the bug, investigating the cause, and finding a solution. Thus, it would be good to fix this in Thunderbird, to send
<span class="s2">"mail-<span class="idiff left right">startup-done</span>" and </span>
<span class="s2"> <span class="s2">"mail-tabs-session-restored"</span> together at the same time (but per window and per session respectively).</span>
Ben
Ben Bucksch wrote on 21.06.19 14:04:
We ran into similar problems when porting to Thunderbird 68.
I think the right fix is to delay
"mail-startup-done"
until Thunderbird is really done with startup.
Patrick Brunschwig wrote on 21.06.19 09:14:
I have a bootstrapped add-on With TB 68 it looks like the
"mail-startup-done" event is sometimes fired before the startup()
function - such that you can observe and react upon it, and sometimes not.The latter seems to happen if the startup cache is not deleted.
Is there a way to determine if "mail-startup-done" event has already
been fired?Thanks,
Patrick_______________________________________________
Maildev mailing list
Maildev@lists.thunderbird.net
http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net<pre class="moz-quote-pre" wrap="">_______________________________________________ Maildev mailing list <a class="moz-txt-link-abbreviated" href="mailto:Maildev@lists.thunderbird.net" moz-do-not-send="true">Maildev@lists.thunderbird.net</a> <a class="moz-txt-link-freetext" href="http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net" moz-do-not-send="true">http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net</a>
<pre class="moz-quote-pre" wrap="">_______________________________________________ Maildev mailing list <a class="moz-txt-link-abbreviated" href="mailto:Maildev@lists.thunderbird.net">Maildev@lists.thunderbird.net</a> <a class="moz-txt-link-freetext" href="http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net">http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net</a>