[Webkit-unassigned] [Bug 47608] Add !SINGLE_THREADED guard.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 14 13:40:30 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=47608





--- Comment #4 from David Levin <levin at chromium.org>  2010-10-14 13:40:30 PST ---
(In reply to comment #3)
> There is already ThreadingNone.cpp - and since it's behind ENABLE(SINGLE_THREADED), I expect it to be present in your port. So, the explanation in ChangeLog is misleading.
> 
> The reason tryLock() in ThreadingNone.cpp returns false is that we have lots of assertions of this form: ASSERT(!m_databaseGuard.tryLock()).
> 
> So, even while yield() can just be added to ThreadingNone.cpp, changing tryLock() to support the logic in this function is more involved. Perhaps the approach in this patch is the right one. David, what do you think?

Sounds reasonable.

Basically, the simplest thing is to fix the ChangeLog, and that would be sufficent.


As a thought exercise, I wonder if the mutex would work PlatformMutex was "bool m_lockTaken".

void Mutex::lock() { m_lockTaken = true; }
bool Mutex::tryLock() 
{ 
    if (!m_lockTaken) 
        return true; 
    return false;
}
void Mutex::unlock() { m_lockTaken = false; }

Of course this means that there is an extra bool of memory consumed (and I little more code compiled). I don't know how much that is a factor.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list