|
|
DescriptionUpdate ParamStorageTraits to disallow raw pointers and Member<>
This CL removes ParamStorageTraits for pointers and add static_assert to
ban raw pointers and Member<>, so that WTF::bind and blink::threadSafeBind
start rejecting them.
BUG=597856
Committed: https://crrev.com/74736be3a74e419cbd88bf36e3855f375b913db5
Cr-Commit-Position: refs/heads/master@{#402113}
Patch Set 1 #Patch Set 2 : gcc fix #Patch Set 3 : rebase #
Total comments: 4
Patch Set 4 : mention wrap{,CrossThread}{,Weak}Persistent. ban WeakMember too. #
Total comments: 2
Patch Set 5 : typo fix #Messages
Total messages: 20 (10 generated)
Description was changed from ========== Update ParamStorageTraits to disallow raw pointers and Member<> BUG= ========== to ========== Update ParamStorageTraits to disallow raw pointers and Member<> TODO: PSA to blink-dev. BUG= ==========
tzik@chromium.org changed reviewers: + haraken@chromium.org, hiroshige@chromium.org, sigbjornf@opera.com
Description was changed from ========== Update ParamStorageTraits to disallow raw pointers and Member<> TODO: PSA to blink-dev. BUG= ========== to ========== Update ParamStorageTraits to disallow raw pointers and Member<> TODO: - PSA to blink-dev. - Description BUG=597856 ==========
Description was changed from ========== Update ParamStorageTraits to disallow raw pointers and Member<> TODO: - PSA to blink-dev. - Description BUG=597856 ========== to ========== Update ParamStorageTraits to disallow raw pointers and Member<> 123456789012345678901234567890123456789012345678901234567890123456789012 This CL removes ParamStorageTraits for pointers and add static_assert to ban raw pointers and Member<>, so that WTF::bind and blink::threadSafeBind start rejecting them. TODO: - PSA to blink-dev. BUG=597856 ==========
PTAL
https://codereview.chromium.org/2096623002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/wtf/Functional.h (right): https://codereview.chromium.org/2096623002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/wtf/Functional.h:219: static_assert(!std::is_pointer<T>::value, "Raw pointer is not allowed to bind into WTF::Function. Wrap it with either Persistent, WeakPersistent, CrossThreadPersistent, CrossThreadWeakPersistent, RefPtr or unretained."); Shouldn't the error message be mentioning wrapPersistent() et al? https://codereview.chromium.org/2096623002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/wtf/Functional.h:220: static_assert(!IsSubclassOfTemplate<T, blink::Member>::value, "Member is not allowed to bind into WTF::Function. Wrap it with either Persistent, WeakPersistent, CrossThreadPersistent or CrossThreadWeakPersistenst."); Add a case for WeakMember<>?
https://codereview.chromium.org/2096623002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/wtf/Functional.h (right): https://codereview.chromium.org/2096623002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/wtf/Functional.h:219: static_assert(!std::is_pointer<T>::value, "Raw pointer is not allowed to bind into WTF::Function. Wrap it with either Persistent, WeakPersistent, CrossThreadPersistent, CrossThreadWeakPersistent, RefPtr or unretained."); On 2016/06/24 11:37:19, sof wrote: > Shouldn't the error message be mentioning wrapPersistent() et al? OK, replaced them to wrap*. https://codereview.chromium.org/2096623002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/wtf/Functional.h:220: static_assert(!IsSubclassOfTemplate<T, blink::Member>::value, "Member is not allowed to bind into WTF::Function. Wrap it with either Persistent, WeakPersistent, CrossThreadPersistent or CrossThreadWeakPersistenst."); On 2016/06/24 11:37:19, sof wrote: > Add a case for WeakMember<>? Done.
lgtm
LGTM
Description was changed from ========== Update ParamStorageTraits to disallow raw pointers and Member<> 123456789012345678901234567890123456789012345678901234567890123456789012 This CL removes ParamStorageTraits for pointers and add static_assert to ban raw pointers and Member<>, so that WTF::bind and blink::threadSafeBind start rejecting them. TODO: - PSA to blink-dev. BUG=597856 ========== to ========== Update ParamStorageTraits to disallow raw pointers and Member<> This CL removes ParamStorageTraits for pointers and add static_assert to ban raw pointers and Member<>, so that WTF::bind and blink::threadSafeBind start rejecting them. TODO: - PSA to blink-dev. BUG=597856 ==========
lgtm with a nit. https://codereview.chromium.org/2096623002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/wtf/Functional.h (right): https://codereview.chromium.org/2096623002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/wtf/Functional.h:221: static_assert(!IsSubclassOfTemplate<T, blink::Member>::value && !IsSubclassOfTemplate<T, blink::WeakMember>::value, "Member and WeakMember are not allowed to bind into WTF::Function. Wrap it with either wrapPersistent, wrapWeakPersistent, wrapCrossThreadPersistent or wrapCrossThreadWeakPersistenst."); nit: s/wrapCrossThreadWeakPersistenst/wrapCrossThreadWeakPersistent/
https://codereview.chromium.org/2096623002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/wtf/Functional.h (right): https://codereview.chromium.org/2096623002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/wtf/Functional.h:221: static_assert(!IsSubclassOfTemplate<T, blink::Member>::value && !IsSubclassOfTemplate<T, blink::WeakMember>::value, "Member and WeakMember are not allowed to bind into WTF::Function. Wrap it with either wrapPersistent, wrapWeakPersistent, wrapCrossThreadPersistent or wrapCrossThreadWeakPersistenst."); On 2016/06/26 08:12:14, hiroshige (slow) wrote: > nit: s/wrapCrossThreadWeakPersistenst/wrapCrossThreadWeakPersistent/ ...! Fixed!
Description was changed from ========== Update ParamStorageTraits to disallow raw pointers and Member<> This CL removes ParamStorageTraits for pointers and add static_assert to ban raw pointers and Member<>, so that WTF::bind and blink::threadSafeBind start rejecting them. TODO: - PSA to blink-dev. BUG=597856 ========== to ========== Update ParamStorageTraits to disallow raw pointers and Member<> This CL removes ParamStorageTraits for pointers and add static_assert to ban raw pointers and Member<>, so that WTF::bind and blink::threadSafeBind start rejecting them. BUG=597856 ==========
The CQ bit was checked by tzik@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org, hiroshige@chromium.org, sigbjornf@opera.com Link to the patchset: https://codereview.chromium.org/2096623002/#ps80001 (title: "typo fix")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Update ParamStorageTraits to disallow raw pointers and Member<> This CL removes ParamStorageTraits for pointers and add static_assert to ban raw pointers and Member<>, so that WTF::bind and blink::threadSafeBind start rejecting them. BUG=597856 ========== to ========== Update ParamStorageTraits to disallow raw pointers and Member<> This CL removes ParamStorageTraits for pointers and add static_assert to ban raw pointers and Member<>, so that WTF::bind and blink::threadSafeBind start rejecting them. BUG=597856 ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== Update ParamStorageTraits to disallow raw pointers and Member<> This CL removes ParamStorageTraits for pointers and add static_assert to ban raw pointers and Member<>, so that WTF::bind and blink::threadSafeBind start rejecting them. BUG=597856 ========== to ========== Update ParamStorageTraits to disallow raw pointers and Member<> This CL removes ParamStorageTraits for pointers and add static_assert to ban raw pointers and Member<>, so that WTF::bind and blink::threadSafeBind start rejecting them. BUG=597856 Committed: https://crrev.com/74736be3a74e419cbd88bf36e3855f375b913db5 Cr-Commit-Position: refs/heads/master@{#402113} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/74736be3a74e419cbd88bf36e3855f375b913db5 Cr-Commit-Position: refs/heads/master@{#402113} |