[Webkit-unassigned] [Bug 199857] [WTF] Thread::removeFromThreadGroup leaks weak pointers.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 7 22:50:47 PDT 2019


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

--- Comment #9 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 375612
  --> https://bugs.webkit.org/attachment.cgi?id=375612
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=375612&action=review

Some early comments. The code looks good to me.

> Tools/TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:156
> +    const int NumberOfThreads = 64;

Use `unsigned` to avoid gtest build failure.

> Tools/TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:162
> +    Vector<RefPtr<Thread>> threads;

Use `Ref`.

> Tools/TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:165
> +    for (int i = 0; i < NumberOfThreads; i++) {

Use `unsigned`.

> Tools/TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:166
> +        auto thread = Thread::create("ThreadGroupWorker", [&](void) {

`(void)` is not necessary.

> Tools/TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:167
> +            LockHolder locker(lock);

Use `auto locker = holdLock(lock)`.

> Tools/TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:168
> +            threadRunningCondition.wait(lock, [&](void) {

`(void)` is not necessary.

> Tools/TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:184
> +    for (int i = 0; i < NumberOfThreads; i++)

Use `unsigned`.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190808/47d54687/attachment-0001.html>


More information about the webkit-unassigned mailing list