Title: [255294] branches/safari-610.1.1-branch/Source/WebCore
- Revision
- 255294
- Author
- [email protected]
- Date
- 2020-01-28 13:49:34 -0800 (Tue, 28 Jan 2020)
Log Message
Cherry-pick r254951. rdar://problem/58713125
Make a Ref to WindowEventLoop when the timer to run tasks fires
https://bugs.webkit.org/show_bug.cgi?id=206568
Reviewed by Antti Koivisto.
Keep WindowEventLoop alive explicitly while invoking EventLoop::run.
* dom/WindowEventLoop.cpp:
(WebCore::WindowEventLoop::WindowEventLoop):
(WebCore::WindowEventLoop::didReachTimeToRun):
* dom/WindowEventLoop.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610.1.1-branch/Source/WebCore/ChangeLog (255293 => 255294)
--- branches/safari-610.1.1-branch/Source/WebCore/ChangeLog 2020-01-28 21:49:32 UTC (rev 255293)
+++ branches/safari-610.1.1-branch/Source/WebCore/ChangeLog 2020-01-28 21:49:34 UTC (rev 255294)
@@ -1,5 +1,38 @@
2020-01-28 Russell Epstein <[email protected]>
+ Cherry-pick r254951. rdar://problem/58713125
+
+ Make a Ref to WindowEventLoop when the timer to run tasks fires
+ https://bugs.webkit.org/show_bug.cgi?id=206568
+
+ Reviewed by Antti Koivisto.
+
+ Keep WindowEventLoop alive explicitly while invoking EventLoop::run.
+
+ * dom/WindowEventLoop.cpp:
+ (WebCore::WindowEventLoop::WindowEventLoop):
+ (WebCore::WindowEventLoop::didReachTimeToRun):
+ * dom/WindowEventLoop.h:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-01-21 Ryosuke Niwa <[email protected]>
+
+ Make a Ref to WindowEventLoop when the timer to run tasks fires
+ https://bugs.webkit.org/show_bug.cgi?id=206568
+
+ Reviewed by Antti Koivisto.
+
+ Keep WindowEventLoop alive explicitly while invoking EventLoop::run.
+
+ * dom/WindowEventLoop.cpp:
+ (WebCore::WindowEventLoop::WindowEventLoop):
+ (WebCore::WindowEventLoop::didReachTimeToRun):
+ * dom/WindowEventLoop.h:
+
+2020-01-28 Russell Epstein <[email protected]>
+
Cherry-pick r254841. rdar://problem/56568303
EXIF orientation is ignored for some CSS images
Modified: branches/safari-610.1.1-branch/Source/WebCore/dom/WindowEventLoop.cpp (255293 => 255294)
--- branches/safari-610.1.1-branch/Source/WebCore/dom/WindowEventLoop.cpp 2020-01-28 21:49:32 UTC (rev 255293)
+++ branches/safari-610.1.1-branch/Source/WebCore/dom/WindowEventLoop.cpp 2020-01-28 21:49:34 UTC (rev 255294)
@@ -82,7 +82,7 @@
inline WindowEventLoop::WindowEventLoop(const String& agentClusterKey)
: m_agentClusterKey(agentClusterKey)
- , m_timer(*this, &WindowEventLoop::run)
+ , m_timer(*this, &WindowEventLoop::didReachTimeToRun)
, m_perpetualTaskGroupForSimilarOriginWindowAgents(*this)
{
}
@@ -112,6 +112,12 @@
return *m_microtaskQueue;
}
+void WindowEventLoop::didReachTimeToRun()
+{
+ auto protectedThis = makeRef(*this); // Executing tasks may remove the last reference to this WindowEventLoop.
+ run();
+}
+
void WindowEventLoop::queueMutationObserverCompoundMicrotask()
{
if (m_mutationObserverCompoundMicrotaskQueuedFlag)
Modified: branches/safari-610.1.1-branch/Source/WebCore/dom/WindowEventLoop.h (255293 => 255294)
--- branches/safari-610.1.1-branch/Source/WebCore/dom/WindowEventLoop.h 2020-01-28 21:49:32 UTC (rev 255293)
+++ branches/safari-610.1.1-branch/Source/WebCore/dom/WindowEventLoop.h 2020-01-28 21:49:34 UTC (rev 255294)
@@ -61,6 +61,8 @@
bool isContextThread() const final;
MicrotaskQueue& microtaskQueue() final;
+ void didReachTimeToRun();
+
String m_agentClusterKey;
Timer m_timer;
std::unique_ptr<MicrotaskQueue> m_microtaskQueue;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes