|
|
Created:
4 years, 11 months ago by sof Modified:
4 years, 11 months ago CC:
chromium-reviews, oilpan-reviews, Mads Ager (chromium), scheduler-bugs_chromium.org, blink-reviews, kinuko+watch, kouhei+heap_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionOilpan: provide a weak 'this' pointer abstraction for cancellable closures.
For CancellableTaskFactory objects owned by an Oilpan heap object, the
factory's closure maintain a weak reference back to its heap
object owner -- the closure must not invoke a method on that heap object
once the weak reference is cleared.
That latter check for a cleared weak reference wasn't in place; provide
it here. Due to wtf/ and platform/heap/ dependency constraints, we're
forced to do that indirectly by way of using a WeakPtr<>.
R=haraken
BUG=575272
Committed: https://crrev.com/88e7f2572537569a657d3e1b94f3cd1a221d1eb1
Cr-Commit-Position: refs/heads/master@{#368851}
Patch Set 1 #
Total comments: 2
Patch Set 2 : add comments + TODOs #
Messages
Total messages: 25 (11 generated)
The CQ bit was checked by sigbjornf@opera.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1573283004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1573283004/1
sigbjornf@opera.com changed reviewers: + oilpan-reviews@chromium.org
please take a look. Ad-hoc solution given that wtf/Functional.h cannot work over CrossThreadWeakPersistent<>.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
haraken@chromium.org changed reviewers: + haraken@chromium.org
LGTM https://codereview.chromium.org/1573283004/diff/1/third_party/WebKit/Source/p... File third_party/WebKit/Source/platform/heap/Handle.h (right): https://codereview.chromium.org/1573283004/diff/1/third_party/WebKit/Source/p... third_party/WebKit/Source/platform/heap/Handle.h:1572: struct ParamStorageTraits<blink::CrossThreadWeakPersistentThisPointer<T>> { CrossThreadWeakPersistentThisPointer => WeakPersistentForFunctionBind ?
https://codereview.chromium.org/1573283004/diff/1/third_party/WebKit/Source/p... File third_party/WebKit/Source/platform/heap/Handle.h (right): https://codereview.chromium.org/1573283004/diff/1/third_party/WebKit/Source/p... third_party/WebKit/Source/platform/heap/Handle.h:1572: struct ParamStorageTraits<blink::CrossThreadWeakPersistentThisPointer<T>> { On 2016/01/12 00:04:57, haraken wrote: > > CrossThreadWeakPersistentThisPointer => WeakPersistentForFunctionBind ? That name promises a little bit more than I want it to, WeakPersistentThisPointerForFunctionBind ? (i.e., we shouldn't support weak persistents elsewhere in closures until wtf/Functional.h can work with (CrossThread)(Weak)Persistents properly.)
On 2016/01/12 07:23:40, sof wrote: > https://codereview.chromium.org/1573283004/diff/1/third_party/WebKit/Source/p... > File third_party/WebKit/Source/platform/heap/Handle.h (right): > > https://codereview.chromium.org/1573283004/diff/1/third_party/WebKit/Source/p... > third_party/WebKit/Source/platform/heap/Handle.h:1572: struct > ParamStorageTraits<blink::CrossThreadWeakPersistentThisPointer<T>> { > On 2016/01/12 00:04:57, haraken wrote: > > > > CrossThreadWeakPersistentThisPointer => WeakPersistentForFunctionBind ? > > That name promises a little bit more than I want it to, > WeakPersistentThisPointerForFunctionBind ? > > (i.e., we shouldn't support weak persistents elsewhere in closures until > wtf/Functional.h can work with (CrossThread)(Weak)Persistents properly.) Ah, got it. CrossThreadWeakPersistentThisPointer sounds fine. Shall we add a comment and mention that this should not be used in other places?
On 2016/01/12 07:27:55, haraken wrote: > On 2016/01/12 07:23:40, sof wrote: > > > https://codereview.chromium.org/1573283004/diff/1/third_party/WebKit/Source/p... > > File third_party/WebKit/Source/platform/heap/Handle.h (right): > > > > > https://codereview.chromium.org/1573283004/diff/1/third_party/WebKit/Source/p... > > third_party/WebKit/Source/platform/heap/Handle.h:1572: struct > > ParamStorageTraits<blink::CrossThreadWeakPersistentThisPointer<T>> { > > On 2016/01/12 00:04:57, haraken wrote: > > > > > > CrossThreadWeakPersistentThisPointer => WeakPersistentForFunctionBind ? > > > > That name promises a little bit more than I want it to, > > WeakPersistentThisPointerForFunctionBind ? > > > > (i.e., we shouldn't support weak persistents elsewhere in closures until > > wtf/Functional.h can work with (CrossThread)(Weak)Persistents properly.) > > Ah, got it. CrossThreadWeakPersistentThisPointer sounds fine. > > Shall we add a comment and mention that this should not be used in other places? Will do, prominent TODO needed as well.
The CQ bit was checked by sigbjornf@opera.com to run a CQ dry run
On 2016/01/12 07:29:46, sof wrote: > On 2016/01/12 07:27:55, haraken wrote: > > On 2016/01/12 07:23:40, sof wrote: > > > > > > https://codereview.chromium.org/1573283004/diff/1/third_party/WebKit/Source/p... > > > File third_party/WebKit/Source/platform/heap/Handle.h (right): > > > > > > > > > https://codereview.chromium.org/1573283004/diff/1/third_party/WebKit/Source/p... > > > third_party/WebKit/Source/platform/heap/Handle.h:1572: struct > > > ParamStorageTraits<blink::CrossThreadWeakPersistentThisPointer<T>> { > > > On 2016/01/12 00:04:57, haraken wrote: > > > > > > > > CrossThreadWeakPersistentThisPointer => WeakPersistentForFunctionBind ? > > > > > > That name promises a little bit more than I want it to, > > > WeakPersistentThisPointerForFunctionBind ? > > > > > > (i.e., we shouldn't support weak persistents elsewhere in closures until > > > wtf/Functional.h can work with (CrossThread)(Weak)Persistents properly.) > > > > Ah, got it. CrossThreadWeakPersistentThisPointer sounds fine. > > > > Shall we add a comment and mention that this should not be used in other > places? > > Will do, prominent TODO needed as well. Done.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1573283004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1573283004/20001
Description was changed from ========== Oilpan: provide a weak 'this' pointer abstraction for cancellable closures. For CancellableTaskFactory objects owned by an Oilpan heap object, the factory's closure maintain a weak reference back to its heap object owner -- the closure must not invoke a method on that heap object once the weak reference is cleared. That latter check for a cleared weak reference wasn't in place; provide it here. Due to wtf/ and platform/heap/ dependency constraints, we're forced to do that indirectly by way of using a WeakPtr<>. R= BUG=575272 ========== to ========== Oilpan: provide a weak 'this' pointer abstraction for cancellable closures. For CancellableTaskFactory objects owned by an Oilpan heap object, the factory's closure maintain a weak reference back to its heap object owner -- the closure must not invoke a method on that heap object once the weak reference is cleared. That latter check for a cleared weak reference wasn't in place; provide it here. Due to wtf/ and platform/heap/ dependency constraints, we're forced to do that indirectly by way of using a WeakPtr<>. R=haraken BUG=575272 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
webkit_tests results looks fine on the Oilpan bot, landing.
The CQ bit was checked by sigbjornf@opera.com
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org Link to the patchset: https://codereview.chromium.org/1573283004/#ps20001 (title: "add comments + TODOs")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1573283004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1573283004/20001
Message was sent while issue was closed.
Description was changed from ========== Oilpan: provide a weak 'this' pointer abstraction for cancellable closures. For CancellableTaskFactory objects owned by an Oilpan heap object, the factory's closure maintain a weak reference back to its heap object owner -- the closure must not invoke a method on that heap object once the weak reference is cleared. That latter check for a cleared weak reference wasn't in place; provide it here. Due to wtf/ and platform/heap/ dependency constraints, we're forced to do that indirectly by way of using a WeakPtr<>. R=haraken BUG=575272 ========== to ========== Oilpan: provide a weak 'this' pointer abstraction for cancellable closures. For CancellableTaskFactory objects owned by an Oilpan heap object, the factory's closure maintain a weak reference back to its heap object owner -- the closure must not invoke a method on that heap object once the weak reference is cleared. That latter check for a cleared weak reference wasn't in place; provide it here. Due to wtf/ and platform/heap/ dependency constraints, we're forced to do that indirectly by way of using a WeakPtr<>. R=haraken BUG=575272 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Oilpan: provide a weak 'this' pointer abstraction for cancellable closures. For CancellableTaskFactory objects owned by an Oilpan heap object, the factory's closure maintain a weak reference back to its heap object owner -- the closure must not invoke a method on that heap object once the weak reference is cleared. That latter check for a cleared weak reference wasn't in place; provide it here. Due to wtf/ and platform/heap/ dependency constraints, we're forced to do that indirectly by way of using a WeakPtr<>. R=haraken BUG=575272 ========== to ========== Oilpan: provide a weak 'this' pointer abstraction for cancellable closures. For CancellableTaskFactory objects owned by an Oilpan heap object, the factory's closure maintain a weak reference back to its heap object owner -- the closure must not invoke a method on that heap object once the weak reference is cleared. That latter check for a cleared weak reference wasn't in place; provide it here. Due to wtf/ and platform/heap/ dependency constraints, we're forced to do that indirectly by way of using a WeakPtr<>. R=haraken BUG=575272 Committed: https://crrev.com/88e7f2572537569a657d3e1b94f3cd1a221d1eb1 Cr-Commit-Position: refs/heads/master@{#368851} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/88e7f2572537569a657d3e1b94f3cd1a221d1eb1 Cr-Commit-Position: refs/heads/master@{#368851} |