[Webkit-unassigned] [Bug 31639] Add asserts to RefCounted to make sure ref/deref happens on the right thread.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 7 12:23:36 PST 2009


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





--- Comment #6 from Dmitry Titov <dimich at chromium.org>  2009-12-07 12:23:35 PST ---
(In reply to comment #4)
> typo: hecks
> typo: calss
> s/then/than/

Fixed. 

> > diff --git a/JavaScriptCore/wtf/RefCounted.h b/JavaScriptCore/wtf/RefCounted.h
> > +#ifndef NDEBUG
> > +class ThreadVerifier {
> 
> This seems like it should be in its own file. (As a side benefit, the whole
> file can be ifndef NDEBUG include the wtf/Threading.h include.)

Moved to a new file, wtf/ThreadVerifier.h
This added a couple of build files and ForwardingHeaders to the patch.

> #endif // NDEBUG
> Since this is a long ifdef.

Added "// NDEBUG"

> > +#ifndef NDEBUG
> > +    void disableThreadVerification()
> > +    {
> 
> Personally, I'd prefer moving the ifndef inside of the method. This would still
> make the call a no-op when NDEBUG is defined, but every call site wouldn't need
> a ifndef NDEBUG around it.

Done.

Patch attached.

-- 
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