Title: [233957] branches/safari-606-branch/Source/WebCore
- Revision
- 233957
- Author
- bshaf...@apple.com
- Date
- 2018-07-18 19:00:06 -0700 (Wed, 18 Jul 2018)
Log Message
Cherry-pick r233879. rdar://problem/42345389
Release assert in ~TimerBase is getting hit in WK1 apps which uses JSC API directly
https://bugs.webkit.org/show_bug.cgi?id=187713
<rdar://problem/41759548>
Reviewed by Simon Fraser.
Turn this into a debug assertion in WebKit1 on iOS since JSC API doesn't grab the web thread lock,
which means that Timer can get destroyed without the web thread lock in the main thread.
* platform/Timer.cpp:
(WebCore::TimerBase::~TimerBase):
(WebCore::TimerBase::setNextFireTime):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-606-branch/Source/WebCore/ChangeLog (233956 => 233957)
--- branches/safari-606-branch/Source/WebCore/ChangeLog 2018-07-19 02:00:04 UTC (rev 233956)
+++ branches/safari-606-branch/Source/WebCore/ChangeLog 2018-07-19 02:00:06 UTC (rev 233957)
@@ -1,5 +1,40 @@
2018-07-18 Babak Shafiei <bshaf...@apple.com>
+ Cherry-pick r233879. rdar://problem/42345389
+
+ Release assert in ~TimerBase is getting hit in WK1 apps which uses JSC API directly
+ https://bugs.webkit.org/show_bug.cgi?id=187713
+ <rdar://problem/41759548>
+
+ Reviewed by Simon Fraser.
+
+ Turn this into a debug assertion in WebKit1 on iOS since JSC API doesn't grab the web thread lock,
+ which means that Timer can get destroyed without the web thread lock in the main thread.
+
+ * platform/Timer.cpp:
+ (WebCore::TimerBase::~TimerBase):
+ (WebCore::TimerBase::setNextFireTime):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2018-07-16 Ryosuke Niwa <rn...@webkit.org>
+
+ Release assert in ~TimerBase is getting hit in WK1 apps which uses JSC API directly
+ https://bugs.webkit.org/show_bug.cgi?id=187713
+ <rdar://problem/41759548>
+
+ Reviewed by Simon Fraser.
+
+ Turn this into a debug assertion in WebKit1 on iOS since JSC API doesn't grab the web thread lock,
+ which means that Timer can get destroyed without the web thread lock in the main thread.
+
+ * platform/Timer.cpp:
+ (WebCore::TimerBase::~TimerBase):
+ (WebCore::TimerBase::setNextFireTime):
+
+2018-07-18 Babak Shafiei <bshaf...@apple.com>
+
Cherry-pick r233877. rdar://problem/42344047
Add color filter for transforming colors in Dark Mode
Modified: branches/safari-606-branch/Source/WebCore/platform/Timer.cpp (233956 => 233957)
--- branches/safari-606-branch/Source/WebCore/platform/Timer.cpp 2018-07-19 02:00:04 UTC (rev 233956)
+++ branches/safari-606-branch/Source/WebCore/platform/Timer.cpp 2018-07-19 02:00:06 UTC (rev 233957)
@@ -190,7 +190,12 @@
TimerBase::~TimerBase()
{
- RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(canAccessThreadLocalDataForThread(m_thread.get()));
+#if USE(WEB_THREAD)
+ ASSERT(canAccessThreadLocalDataForThread(m_thread.get()));
+ RELEASE_ASSERT(WebThreadIsEnabled() || canAccessThreadLocalDataForThread(m_thread.get()));
+#else
+ RELEASE_ASSERT(canAccessThreadLocalDataForThread(m_thread.get()));
+#endif
stop();
ASSERT(!inHeap());
m_wasDeleted = true;
@@ -357,7 +362,12 @@
void TimerBase::setNextFireTime(MonotonicTime newTime)
{
+#if USE(WEB_THREAD)
+ ASSERT(canAccessThreadLocalDataForThread(m_thread.get()));
+ RELEASE_ASSERT(WebThreadIsEnabled() || canAccessThreadLocalDataForThread(m_thread.get()));
+#else
RELEASE_ASSERT(canAccessThreadLocalDataForThread(m_thread.get()));
+#endif
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_wasDeleted);
if (m_unalignedNextFireTime != newTime)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes