Skip to content
Permalink
Browse files
Unreviewed, reverting r279835.
Newly added assertions are wrong

Reverted changeset:

"Regression(r279601) ProcessAssertion may get destroyed on a
background thread"
https://bugs.webkit.org/show_bug.cgi?id=227875
https://commits.webkit.org/r279835

Canonical link: https://commits.webkit.org/239599@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
cdumez committed Jul 12, 2021
1 parent 7184aa1 commit 167aef82ea3470df6f8503f892a7e00878f4cdd2
Showing 3 changed files with 14 additions and 3 deletions.
@@ -1,3 +1,16 @@
2021-07-12 Chris Dumez <cdumez@apple.com>

Unreviewed, reverting r279835.

Newly added assertions are wrong

Reverted changeset:

"Regression(r279601) ProcessAssertion may get destroyed on a
background thread"
https://bugs.webkit.org/show_bug.cgi?id=227875
https://commits.webkit.org/r279835

2021-07-12 Chris Dumez <cdumez@apple.com>

Regression(r279601) ProcessAssertion may get destroyed on a background thread
@@ -54,7 +54,7 @@ enum class ProcessAssertionType {
FinishTaskUninterruptable,
};

class ProcessAssertion : public ThreadSafeRefCounted<ProcessAssertion, WTF::DestructionThread::MainRunLoop>, public CanMakeWeakPtr<ProcessAssertion, WeakPtrFactoryInitialization::Eager> {
class ProcessAssertion : public ThreadSafeRefCounted<ProcessAssertion>, public CanMakeWeakPtr<ProcessAssertion, WeakPtrFactoryInitialization::Eager> {
WTF_MAKE_FAST_ALLOCATED;
public:
enum class Mode : bool { Sync, Async };
@@ -321,7 +321,6 @@ - (void)assertion:(RBSAssertion *)assertion didInvalidateWithError:(NSError *)er
, m_pid(pid)
, m_reason(reason)
{
ASSERT(isMainRunLoop());
NSString *runningBoardAssertionName = runningBoardNameForAssertionType(assertionType);
ASSERT(runningBoardAssertionName);
if (!pid) {
@@ -366,7 +365,6 @@ - (void)assertion:(RBSAssertion *)assertion didInvalidateWithError:(NSError *)er

ProcessAssertion::~ProcessAssertion()
{
ASSERT(isMainRunLoop());
RELEASE_LOG(ProcessSuspension, "%p - ~ProcessAssertion: Releasing process assertion '%{public}s' for process with PID=%d", this, m_reason.utf8().data(), m_pid);

if (m_rbsAssertion) {

0 comments on commit 167aef8

Please sign in to comment.