This patch provides the tests related to r103726. Two kinds of tests are added. 1. Tracking the refCount of the instance of RefCounted. 2. Ensure ThreadSafeRefCounted works correctly in addition to RefCounted.
Created attachment 152406 [details] Patch
r103726 is Bug 75266
Why does this bug have a dependency on Bug 91222? It seems this patch only tests RefPtr and PassRefPtr.
Comment on attachment 152406 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152406&action=review > Tools/TestWebKitAPI/Tests/WTF/Functional.cpp:182 > +template<typename T> static int multiplyNumberByTwo(PassRefPtr<T> pass) If the argument is transferred to a RefPtr at the start of the function, the argument should be named with a "prp" prefix. Refer to http://www.webkit.org/coding/RefPtr.html for the naming guideline.
(In reply to comment #3) > Why does this bug have a dependency on Bug 91222? It seems this patch only tests RefPtr and PassRefPtr. Bug 91222 implemented "static int callFunctionObject(void* context)" and this patch uses it.
(In reply to comment #4) > (From update of attachment 152406 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=152406&action=review > > > Tools/TestWebKitAPI/Tests/WTF/Functional.cpp:182 > > +template<typename T> static int multiplyNumberByTwo(PassRefPtr<T> pass) > > If the argument is transferred to a RefPtr at the start of the function, the argument should be named with a "prp" prefix. > > Refer to http://www.webkit.org/coding/RefPtr.html for the naming guideline. Thank you for good information. I'll update.
Created attachment 152410 [details] Patch
Comment on attachment 152410 [details] Patch Please re-upload a patch which applies so the EWS bots can test it.
(In reply to comment #8) > (From update of attachment 152410 [details]) > Please re-upload a patch which applies so the EWS bots can test it. It is because this bug depends on Bug 91222. I'll re-upload a patch after landing Bug 91222.