WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
91313
Increase the readability of Functional related to handling wrapping/unwrapping RefPtr and PassRefPtr.
https://bugs.webkit.org/show_bug.cgi?id=91313
Summary
Increase the readability of Functional related to handling wrapping/unwrappin...
Dongseong Hwang
Reported
2012-07-13 23:48:00 PDT
There are two changes. 1. Partial template specialization of RefAndDeref on RefPtr and PassRefPtr. Currently, RefAndDeref<RefPtr<T>, true>::ref(m_p1) bounds RefAndDeref<T*, true>. "static void ref(T* t) { t->ref(); }" does work correctly because m_p1->ref() is legal, but it is hard to read. It is why this patch specialized on RefPtr and PassRefPtr also. 2. ParamStorageTraits<(RefPtr|PassRefPtr)<T> >::unref returns PassRefPtr instead of raw pointer. The raw pointer is eventually casted to PassRefPtr, so it is better to return PassRefPtr for both performance and readability.
Attachments
Patch
(2.83 KB, patch)
2012-07-13 23:55 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(5.17 KB, patch)
2012-07-14 00:26 PDT
,
Dongseong Hwang
eric
: review-
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Dongseong Hwang
Comment 1
2012-07-13 23:55:30 PDT
Created
attachment 152411
[details]
Patch
Dongseong Hwang
Comment 2
2012-07-13 23:57:28 PDT
This patch amended the code that had been implemented by only
Bug 75266
.
WebKit Review Bot
Comment 3
2012-07-14 00:01:19 PDT
Comment on
attachment 152411
[details]
Patch
Attachment 152411
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/13230468
Build Bot
Comment 4
2012-07-14 00:03:52 PDT
Comment on
attachment 152411
[details]
Patch
Attachment 152411
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/13241361
Dongseong Hwang
Comment 5
2012-07-14 00:11:25 PDT
(In reply to
comment #3
)
> (From update of
attachment 152411
[details]
) >
Attachment 152411
[details]
did not pass chromium-ews (chromium-xvfb): > Output:
http://queues.webkit.org/results/13230468
Chromium build failed because of the following code in Functional.cpp. static int multiplyNumberByTwo(Number* number) { return number->value() * 2; } TEST(FunctionalTest, RefCountedStorage) { RefPtr<Number> five = Number::create(5); Function<int ()> multiplyFiveByTwoFunction = bind(multiplyNumberByTwo, five); .... } I think above code is not correct because we can not call "multiplyNumberByTwo(five)" also. I fixed above code in
Bug 91310
, so this bug depends on
Bug 91310
.
Gustavo Noronha (kov)
Comment 6
2012-07-14 00:15:53 PDT
Comment on
attachment 152411
[details]
Patch
Attachment 152411
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/13237412
Build Bot
Comment 7
2012-07-14 00:19:17 PDT
Comment on
attachment 152411
[details]
Patch
Attachment 152411
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/13236402
Dongseong Hwang
Comment 8
2012-07-14 00:26:26 PDT
Created
attachment 152412
[details]
Patch
Dongseong Hwang
Comment 9
2012-07-14 00:30:50 PDT
(In reply to
comment #4
)
> (From update of
attachment 152411
[details]
) >
Attachment 152411
[details]
did not pass mac-ews (mac): > Output:
http://queues.webkit.org/results/13241361
WebProcessProxyMac used Functional like Functional.cpp that caused chromium build failed. I fixed next patch. Win and Gtk also failed in the same reason of chromium.
WebKit Review Bot
Comment 10
2012-07-14 00:32:57 PDT
Comment on
attachment 152412
[details]
Patch
Attachment 152412
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/13237415
Build Bot
Comment 11
2012-07-14 00:41:23 PDT
Comment on
attachment 152412
[details]
Patch
Attachment 152412
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/13221957
Build Bot
Comment 12
2012-07-14 00:51:55 PDT
Comment on
attachment 152412
[details]
Patch
Attachment 152412
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/13236411
Peter Beverloo (cr-android ews)
Comment 13
2012-08-09 23:53:55 PDT
Comment on
attachment 152412
[details]
Patch
Attachment 152412
[details]
did not pass cr-android-ews (chromium-android): Output:
http://queues.webkit.org/results/13471439
Eric Seidel (no email)
Comment 14
2012-08-12 03:28:03 PDT
This doesn't compile and thus can't be landed.
Dongseong Hwang
Comment 15
2012-08-13 02:04:10 PDT
(In reply to
comment #14
)
> This doesn't compile and thus can't be landed.
It is because this bug depends on
Bug 91222
and 91310. I'll re-upload a patch after landing
Bug 91222
and 91310
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug