For one-shot timers we move ownership of the ScheduledAction to a local RAII variable, so they'll survive until timer fire completes. However for interval timers the ScheduledAction remains owned by the DOMTimer, which could cancel itself from script. Change ownership model of ScheduledAction so even if the DOMTimer is cancelled the ScheduledAction won't be deleted mid execution.
Created attachment 237115 [details] Fix
Attachment 237115 [details] did not pass style-queue: ERROR: Source/WebCore/page/DOMTimer.h:35: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 237115 [details] Fix r=me
Something I said in person: Perhaps ScriptExecutionContext::m_timeouts should just be a map of RefPtr instead of raw pointer.
Created attachment 237154 [details] Alternative fix, address the problem for DOMTimer too.
Comment on attachment 237154 [details] Alternative fix, address the problem for DOMTimer too. r=me
Transmitting file data ...... Committed revision 172963.
Comment on attachment 237154 [details] Alternative fix, address the problem for DOMTimer too. View in context: https://bugs.webkit.org/attachment.cgi?id=237154&action=review > Source/WebCore/page/DOMTimer.h:31 > +#include <WTF/RefCounted.h> It broke the Linux (EFL,GTK) builds, because this kind of magic includes work only on Mac.
It seems, it isn't Linux issue, Apple Mac build is broken too. I assume, you need wtf/RefCounted.h instead of WTF/RefCounted.h .
Tim already fixed it in http://trac.webkit.org/changeset/172964, thanks.
Comment on attachment 237154 [details] Alternative fix, address the problem for DOMTimer too. View in context: https://bugs.webkit.org/attachment.cgi?id=237154&action=review >> Source/WebCore/page/DOMTimer.h:31 >> +#include <WTF/RefCounted.h> > > It broke the Linux (EFL,GTK) builds, because this kind of magic includes work only on Mac. Slightly incorrect analysis. It’s not about “magic includes”, but simply case sensitive file systems. The correct include is <wtf/RefCounted.h>. Using <WTF/RefCounted.h> instead breaks builds on Macs with case sensitive file systems too. However, the HFS case insensitive file system is the one that many of us have on our computers.
(In reply to comment #9) > It seems, it isn't Linux issue, Apple Mac build is broken too. > I assume, you need wtf/RefCounted.h instead of WTF/RefCounted.h . Oops, I see you figured this out. Sorry for the repetitive comment.