Bug 91310 - Add test cases in Functional.cpp related to handling wrapping/unwrapping RefPtr and PassRefPtr.
Summary: Add test cases in Functional.cpp related to handling wrapping/unwrapping RefP...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 91222
Blocks: 91313
  Show dependency treegraph
 
Reported: 2012-07-13 22:07 PDT by Dongseong Hwang
Modified: 2012-08-13 02:03 PDT (History)
3 users (show)

See Also:


Attachments
Patch (7.18 KB, patch)
2012-07-13 22:12 PDT, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch (7.14 KB, patch)
2012-07-13 23:13 PDT, Dongseong Hwang
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dongseong Hwang 2012-07-13 22:07:37 PDT
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.
Comment 1 Dongseong Hwang 2012-07-13 22:12:27 PDT
Created attachment 152406 [details]
Patch
Comment 2 Dongseong Hwang 2012-07-13 22:12:59 PDT
r103726 is Bug 75266
Comment 3 Kwang Yul Seo 2012-07-13 22:45:38 PDT
Why does this bug have a dependency on Bug 91222? It seems this patch only tests RefPtr and PassRefPtr.
Comment 4 Kwang Yul Seo 2012-07-13 22:51:05 PDT
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.
Comment 5 Dongseong Hwang 2012-07-13 22:54:31 PDT
(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.
Comment 6 Dongseong Hwang 2012-07-13 22:55:01 PDT
(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.
Comment 7 Dongseong Hwang 2012-07-13 23:13:05 PDT
Created attachment 152410 [details]
Patch
Comment 8 Eric Seidel (no email) 2012-08-12 03:28:39 PDT
Comment on attachment 152410 [details]
Patch

Please re-upload a patch which applies so the EWS bots can test it.
Comment 9 Dongseong Hwang 2012-08-13 02:03:33 PDT
(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.